u-boot/arch
Pali Rohár 4a82fca8e3 arm: a37xx: pci: Fix a3700_fdt_fix_pcie_regions() function
Current version of this function uses a lot of incorrect assumptions about
the `ranges` DT property:

 * parent(#address-cells) == 2
 * #size-cells == 2
 * number of entries == 2
 * address size of first entry == 0x1000000
 * second child address entry == base + 0x1000000

Trying to increase PCIe MEM space to more than 16 MiB leads to an overlap
with PCIe IO space, and trying to define additional MEM space (as a third
entry in the `ranges` DT property) causes U-Boot to crash when booting the
kernel.

  ## Flattened Device Tree blob at 04f00000
     Booting using the fdt blob at 0x4f00000
     Loading Device Tree to 000000001fb01000, end 000000001fb08f12 ... OK
  ERROR: board-specific fdt fixup failed: <unknown error>
   - must RESET the board to recover.

Fix a3700_fdt_fix_pcie_regions() to properly parse and update all addresses
in the `ranges` property according to
https://elinux.org/Device_Tree_Usage#PCI_Address_Translation

Now it is possible to increase PCIe MEM space from 16 MiB to maximal value
of 127 MiB.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Fixes: cb2ddb291e ("arm64: mvebu: a37xx: add device-tree fixer for PCIe regions")
Reviewed-by: Stefan Roese <sr@denx.de>
2021-06-04 11:32:41 +02:00
..
arc lmb: move CONFIG_LMB in Kconfig 2021-04-22 14:09:45 -04:00
arm arm: a37xx: pci: Fix a3700_fdt_fix_pcie_regions() function 2021-06-04 11:32:41 +02:00
m68k allow opting out of WATCHDOG_RESET() from timer interrupt 2021-04-28 10:05:13 +02:00
microblaze lmb: move CONFIG_LMB in Kconfig 2021-04-22 14:09:45 -04:00
mips MIPS: remove deprecated qemu_mips board 2021-05-25 15:35:06 +02:00
nds32 treewide: Convert macro and uses of __section(foo) to __section("foo") 2021-05-24 14:21:30 -04:00
nios2 common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
powerpc powerpc: fix regression in arch_initr_trap() 2021-05-26 17:26:07 -04:00
riscv riscv: cpu: fu740: clear feature disable CSR 2021-05-31 16:35:55 +08:00
sandbox sandbox: make LTO available 2021-05-24 14:21:30 -04:00
sh lmb: move CONFIG_LMB in Kconfig 2021-04-22 14:09:45 -04:00
x86 treewide: Convert macro and uses of __section(foo) to __section("foo") 2021-05-24 14:21:30 -04:00
xtensa treewide: Convert macro and uses of __section(foo) to __section("foo") 2021-05-24 14:21:30 -04:00
.gitignore
Kconfig ARM: make LTO available 2021-05-24 14:21:30 -04:00
u-boot-elf.lds arch: Add explicit linker script for u-boot-elf 2020-04-03 11:52:55 -04:00