PCI: iproc: Convert to use the new ECAM constants
authorKrzysztof Wilczyński <kw@linux.com>
Sun, 29 Nov 2020 23:07:41 +0000 (23:07 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 10 Dec 2020 20:56:03 +0000 (14:56 -0600)
commit63eab4944e4f33f69a6a72427490c4d5f8d3f072
tree03698bcd3430b3887d0da61a3b9a86267fb3e7ea
parent31a8cdb7ef8042a63fcb2ae3856df28af15abc8f
PCI: iproc: Convert to use the new ECAM constants

Change interface of the function iproc_pcie_map_ep_cfg_reg() so that use
of PCI_SLOT() and PCI_FUNC() macros and most of the local ECAM-specific
constants can be dropped, and the new PCIE_ECAM_OFFSET() macro can be
used instead.  Use the ALIGN_DOWN() macro to ensure that PCI Express
ECAM offset is always 32 bit aligned.

Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20201129230743.3006978-4-kw@linux.com
Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/controller/pcie-iproc.c