Files
u-boot/drivers
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
..
2021-12-20 17:12:04 -05:00
2022-01-13 07:57:49 -05:00
2021-09-25 09:46:15 -06:00
2021-10-05 08:50:15 -04:00
2021-11-07 18:36:56 +01:00
2022-01-13 07:57:49 -05:00
2022-01-13 07:57:49 -05:00
2021-12-27 08:41:38 -05:00
2021-12-05 09:26:26 -07:00
2021-10-31 08:46:44 -04:00
2022-01-13 07:57:49 -05:00
2022-01-13 07:57:49 -05:00
2022-01-13 07:57:49 -05:00
2021-11-18 20:18:34 -05:00
2022-01-13 07:57:49 -05:00
2021-11-09 11:57:22 +09:00
2022-01-13 07:57:49 -05:00
2021-09-04 12:26:02 -04:00
2022-01-13 09:13:41 -07:00
2021-11-30 14:11:05 +02:00
2021-09-13 18:23:13 -04:00
2021-10-01 21:08:18 -04:00
2021-10-31 08:46:44 -04:00
2021-10-31 08:46:44 -04:00