diff options
author | Jayachandran C <jchandra@broadcom.com> | 2013-12-21 16:52:27 +0530 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-01-24 22:39:49 +0100 |
commit | b6ba1c5294c3f51fd4cf8b0d60de4ba82ef2a1c9 (patch) | |
tree | f7d2f610de3852e8ded2d485c24bb52327039dea /arch/mips/include/asm/netlogic | |
parent | 98d4884ca55883e8b16180bd969a8bccaa885c80 (diff) | |
download | linux-b6ba1c5294c3f51fd4cf8b0d60de4ba82ef2a1c9.tar.bz2 |
MIPS: PCI: Netlogic XLP9XX support
Add PCI support for Netlogic XLP9XX. The PCI registers and
SoC bus numbers have changed in XLP9XX.
Also skip a few (bus,dev,fn) combinations which have issues when
read.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6284/
Diffstat (limited to 'arch/mips/include/asm/netlogic')
-rw-r--r-- | arch/mips/include/asm/netlogic/xlp-hal/pcibus.h | 10 | ||||
-rw-r--r-- | arch/mips/include/asm/netlogic/xlp-hal/xlp.h | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h b/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h index 0fac32b1d8ba..d4deb87ad069 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h @@ -63,6 +63,12 @@ #define PCIE_INT_EN0 0x261 #define PCIE_INT_EN1 0x262 +/* XLP9XX has basic changes */ +#define PCIE_9XX_BYTE_SWAP_MEM_BASE 0x25c +#define PCIE_9XX_BYTE_SWAP_MEM_LIM 0x25d +#define PCIE_9XX_BYTE_SWAP_IO_BASE 0x25e +#define PCIE_9XX_BYTE_SWAP_IO_LIM 0x25f + /* other */ #define PCIE_NLINKS 4 @@ -78,8 +84,8 @@ #define nlm_read_pcie_reg(b, r) nlm_read_reg(b, r) #define nlm_write_pcie_reg(b, r, v) nlm_write_reg(b, r, v) -#define nlm_get_pcie_base(node, inst) \ - nlm_pcicfg_base(XLP_IO_PCIE_OFFSET(node, inst)) +#define nlm_get_pcie_base(node, inst) nlm_pcicfg_base(cpu_is_xlp9xx() ? \ + XLP9XX_IO_PCIE_OFFSET(node, inst) : XLP_IO_PCIE_OFFSET(node, inst)) #ifdef CONFIG_PCI_MSI void xlp_init_node_msi_irqs(int node, int link); diff --git a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h index 9ccdb7d0f073..120c003c124d 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h @@ -84,6 +84,9 @@ void xlp_mmu_init(void); void nlm_hal_init(void); int xlp_get_dram_map(int n, uint64_t *dram_map); +struct pci_dev; +int xlp_socdev_to_node(const struct pci_dev *dev); + /* Device tree related */ void xlp_early_init_devtree(void); void *xlp_dt_init(void *fdtp); |