u-boot/arch
Pali Rohár 537b0142b0 pci: pci_mvebu: Fix PCIe MEM and IO resources assignment and mbus mapping
Do not call pci_set_region() for resources which were not properly mapped.
This prevents U-Boot to access unmapped memory space.

Update MBUS_PCI_MEM_SIZE and MBUS_PCI_IO_SIZE macros to cover all PCIe MEM
and IO ranges. Previously these macros covered only address ranges for the
first PCIe port. Between MBUS_PCI_IO_BASE and MBUS_PCI_MEM_BASE there is
space for six 128 MB long address ranges. So set MBUS_PCI_MEM_SIZE to value
of 6*128 MB. Similarly set MBUS_PCI_IO_SIZE to 6*64 KB.

Function resource_size() returns zero when start address is 0 and end
address is -1. So set invalid resources to these values to indicate that
resource has no mapping.

Split global PCIe MEM and IO resources (defined by MBUS_PCI_*_* macros)
into PCIe ports in mvebu_pcie_bind() function which allocates per-port
based struct mvebu_pcie, instead of using global state variables
mvebu_pcie_membase and mvebu_pcie_iobase. This makes pci_mvebu.c driver
independent of global static variables (which store the state of
allocation) and allows to bind and unbind the driver more times.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
2022-01-14 07:47:57 +01:00
..
arc Finish conversion of CONFIG_SYS_CLK_FREQ to Kconfig 2021-12-27 16:20:18 -05:00
arm pci: pci_mvebu: Fix PCIe MEM and IO resources assignment and mbus mapping 2022-01-14 07:47:57 +01:00
m68k m68k: mcf5445x: pci: Use PCI_CONF1_ADDRESS() macro 2022-01-12 14:21:24 -05:00
microblaze image: Drop IMAGE_ENABLE_OF_LIBFDT 2021-10-08 15:53:26 -04:00
mips Convert CONFIG_USB_EHCI_IS_TDI to Kconfig 2021-10-15 09:42:22 -04:00
nds32 Finish conversion of CONFIG_SYS_CLK_FREQ to Kconfig 2021-12-27 16:20:18 -05:00
nios2 lmb: nios2: Add arch_lmb_reserve() 2021-09-23 14:15:32 -04:00
powerpc ppc: mpc83xx: Remove unused CONFIG symbols 2021-12-27 16:20:18 -05:00
riscv riscv: qemu: Split devicetree files for qemu_riscv32/64 2021-12-23 10:24:39 -05:00
sandbox sandbox: compatibility of os_get_filesize() 2022-01-13 09:13:41 -07:00
sh Convert CONFIG_CPU_SH7751 to Kconfig 2021-12-27 16:20:19 -05:00
x86 bloblist: Rename the SPL tag 2022-01-13 09:13:41 -07:00
xtensa Finish conversion of CONFIG_SYS_CLK_FREQ to Kconfig 2021-12-27 16:20:18 -05:00
.gitignore
Kconfig Convert CONFIG_ARCH_MAP_SYSMEM to Kconfig 2021-12-27 16:20:18 -05:00
u-boot-elf.lds arch: Add explicit linker script for u-boot-elf 2020-04-03 11:52:55 -04:00