summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/pnv-pci.h
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2016-05-20 16:41:38 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2016-06-21 15:30:57 +1000
commitebe2253127395b884e1ace5fb48598e1eb4de689 (patch)
treee22754849112bdbf079ea697e19fe677648238a9 /arch/powerpc/include/asm/pnv-pci.h
parent8cc7581cdb84a232468c41bc417183a423dfbb07 (diff)
downloadblackbird-op-linux-ebe2253127395b884e1ace5fb48598e1eb4de689.tar.gz
blackbird-op-linux-ebe2253127395b884e1ace5fb48598e1eb4de689.zip
powerpc/powernv: Support PCI slot ID
The reset and poll functionality from (OPAL) firmware supports PHB and PCI slot at same time. They are identified by ID. This supports PCI slot ID by: * Rename the argument name for opal_pci_reset() and opal_pci_poll() accordingly * Rename pnv_eeh_phb_poll() to pnv_eeh_poll() and adjust its argument name. * One macro is added to produce PCI slot ID. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/pnv-pci.h')
-rw-r--r--arch/powerpc/include/asm/pnv-pci.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/pnv-pci.h b/arch/powerpc/include/asm/pnv-pci.h
index 6f77f71ee964..c607902c5477 100644
--- a/arch/powerpc/include/asm/pnv-pci.h
+++ b/arch/powerpc/include/asm/pnv-pci.h
@@ -13,6 +13,10 @@
#include <linux/pci.h>
#include <misc/cxl-base.h>
+#define PCI_SLOT_ID_PREFIX 0x8000000000000000
+#define PCI_SLOT_ID(phb_id, bdfn) \
+ (PCI_SLOT_ID_PREFIX | ((uint64_t)(bdfn) << 16) | (phb_id))
+
int pnv_phb_to_cxl_mode(struct pci_dev *dev, uint64_t mode);
int pnv_cxl_ioda_msi_setup(struct pci_dev *dev, unsigned int hwirq,
unsigned int virq);
OpenPOWER on IntegriCloud