[PATCH v3] pci-host-ecam-generic: access config space independent of system-wide bus id

Priyanka Jain (OSS) priyanka.jain at oss.nxp.com
Mon Mar 30 13:30:38 CEST 2020


>-----Original Message-----
>From: U-Boot <u-boot-bounces at lists.denx.de> On Behalf Of Vladimir Oltean
>Sent: Friday, March 13, 2020 8:23 PM
>To: bmeng.cn at gmail.com; sjg at chromium.org; tuomas.tynkkynen at iki.fi;
>Alexandru Marginean <alexandru.marginean at nxp.com>; u-
>boot at lists.denx.de
>Subject: [PATCH v3] pci-host-ecam-generic: access config space independent of
>system-wide bus id
>
>From: Vladimir Oltean <vladimir.oltean at nxp.com>
>
>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: 3675cb044e68 ("PCI: Add driver for a 'pci-host-ecam-generic' host
>controller")
>Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
>Reviewed-by: Alex Marginean <alexandru.marginean at nxp.com>
>---
Applied to u-boot-fsl-qoriq after fixing checkpatch warning. Waiting upstream

Thanks
Priyanka


More information about the U-Boot mailing list