summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPali Rohár <[email protected]>2021-11-03 01:01:05 +0100
committerTom Rini <[email protected]>2021-11-17 17:04:58 -0500
commita4bc38da27dfc170e87b5849115cc8faedb6ae90 (patch)
treee5006b98769297c7825a2d9111ee25cea3462ae9 /include/linux
parentb814e0007e060b5cce314edcf5c0507a67cafd73 (diff)
pci: Add standard PCIe ECAM macros
Lot of PCIe controllers are using ECAM addressing. So add common ECAM macros into U-Boot's pci.h header file which can be suitable for most PCI controller drivers. Replace custom ECAM address macros in every PCI controller driver by new ECAM macros from U-Boot's pci.h header file. Similar macros are defined also in Linux kernel. There is a small difference between Linux and these new U-Boot macros. U-Boot's PCIE_ECAM_OFFSET() takes device and function numbers in separate arguments. Linux's PCIE_ECAM_OFFSET() takes device and function numbers encoded in one argument. The reason is that U-Boot's PCI_DEVFN() macro is different than Linux's PCI_SLOT() macro. So having device and function numbers in separate arguments makes code more straightforward. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions