diff options
author | Ray Jui <rjui@broadcom.com> | 2015-12-04 09:34:59 -0800 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-12-07 10:35:29 -0600 |
commit | 943ebae781f519ecfecbfa1b997f15f59116e41d (patch) | |
tree | c8a23f7d62d7faff13e2266f521413e3333cd6b6 /drivers/pci/host/pcie-iproc.h | |
parent | e8b8318de645c04f8600cb5af6f6773a1878ee9d (diff) | |
download | linux-943ebae781f519ecfecbfa1b997f15f59116e41d.tar.bz2 |
PCI: iproc: Add PAXC interface support
Traditionally, all iProc PCIe root complexes use PAXB-based wrapper, with
an integrated on-chip Serdes to support external endpoint devices. On
newer iProc platforms, a PAXC-based wrapper is introduced, for connection
with internally emulated PCIe endpoint devices in the ASIC.
Add support for PAXC-based iProc PCIe root complex in the iProc PCIe core
driver. This change factors out common logic between PAXB and PAXC, and
uses tables to store register offsets that are different between PAXB and
PAXC. This allows the driver to be scaled to support subsequent PAXC
revisions in the future.
Signed-off-by: Ray Jui <rjui@broadcom.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
Diffstat (limited to 'drivers/pci/host/pcie-iproc.h')
-rw-r--r-- | drivers/pci/host/pcie-iproc.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/pci/host/pcie-iproc.h b/drivers/pci/host/pcie-iproc.h index d3dc940f773a..a38e96ae156d 100644 --- a/drivers/pci/host/pcie-iproc.h +++ b/drivers/pci/host/pcie-iproc.h @@ -15,6 +15,20 @@ #define _PCIE_IPROC_H /** + * iProc PCIe interface type + * + * PAXB is the wrapper used in root complex that can be connected to an + * external endpoint device. + * + * PAXC is the wrapper used in root complex dedicated for internal emulated + * endpoint devices. + */ +enum iproc_pcie_type { + IPROC_PCIE_PAXB = 0, + IPROC_PCIE_PAXC, +}; + +/** * iProc PCIe outbound mapping * @set_oarr_size: indicates the OARR size bit needs to be set * @axi_offset: offset from the AXI address to the internal address used by @@ -29,7 +43,10 @@ struct iproc_pcie_ob { /** * iProc PCIe device + * * @dev: pointer to device data structure + * @type: iProc PCIe interface type + * @reg_offsets: register offsets * @base: PCIe host controller I/O register base * @sysdata: Per PCI controller data (ARM-specific) * @root_bus: pointer to root bus @@ -41,6 +58,8 @@ struct iproc_pcie_ob { */ struct iproc_pcie { struct device *dev; + enum iproc_pcie_type type; + const u16 *reg_offsets; void __iomem *base; #ifdef CONFIG_ARM struct pci_sys_data sysdata; |