]> git.baikalelectronics.ru Git - uboot.git/commit
pci-host-ecam-generic: access config space independent of system-wide bus id
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 13 Mar 2020 14:53:06 +0000 (16:53 +0200)
committerPriyanka Jain <priyanka.jain@nxp.com>
Mon, 30 Mar 2020 02:41:56 +0000 (08:11 +0530)
commit3dfcc17c4e4434b4687d4d954b46c24a483e8e12
treec147c7e9e9a2391f059fdead24fc68f6cb48c341
parentdd0797fc4be8b67c27b9469a17f2f9bd9a55c994
pci-host-ecam-generic: access config space independent of system-wide bus id

The pci-host-ecam-generic code assumes that the ECAM is the first PCI
bus in the system to be probed. Therefore, the system-wide bus number
allocated by U-Boot in sequence for it is going to be zero, which
corresponds to the memory-mapped config spaces found within it.

Reuse the logic from other PCI bus drivers, and assume that U-Boot will
allocate bus numbers in sequence for all buses within the current ECAM.
So the base number of the bus needs to be subtracted when indexing the
correct config space.

Fixes: b6e04ee2eacf ("PCI: Add driver for a 'pci-host-ecam-generic' host controller")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
drivers/pci/pcie_ecam_generic.c