aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRay Jui <rjui@broadcom.com>2015-12-04 12:34:59 -0500
committerBjorn Helgaas <bhelgaas@google.com>2015-12-07 11:35:29 -0500
commit943ebae781f519ecfecbfa1b997f15f59116e41d (patch)
treec8a23f7d62d7faff13e2266f521413e3333cd6b6
parente8b8318de645c04f8600cb5af6f6773a1878ee9d (diff)
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>
-rw-r--r--drivers/pci/host/pcie-iproc-platform.c24
-rw-r--r--drivers/pci/host/pcie-iproc.c202
-rw-r--r--drivers/pci/host/pcie-iproc.h19
3 files changed, 205 insertions, 40 deletions
diff --git a/drivers/pci/host/pcie-iproc-platform.c b/drivers/pci/host/pcie-iproc-platform.c
index c9550dc8b8ed..e8b32d856bd8 100644
--- a/drivers/pci/host/pcie-iproc-platform.c
+++ b/drivers/pci/host/pcie-iproc-platform.c
@@ -26,8 +26,21 @@
26 26
27#include "pcie-iproc.h" 27#include "pcie-iproc.h"
28 28
29static const struct of_device_id iproc_pcie_of_match_table[] = {
30 {
31 .compatible = "brcm,iproc-pcie",
32 .data = (int *)IPROC_PCIE_PAXB,
33 }, {
34 .compatible = "brcm,iproc-pcie-paxc",
35 .data = (int *)IPROC_PCIE_PAXC,
36 },
37 { /* sentinel */ }
38};
39MODULE_DEVICE_TABLE(of, iproc_pcie_of_match_table);
40
29static int iproc_pcie_pltfm_probe(struct platform_device *pdev) 41static int iproc_pcie_pltfm_probe(struct platform_device *pdev)
30{ 42{
43 const struct of_device_id *of_id;
31 struct iproc_pcie *pcie; 44 struct iproc_pcie *pcie;
32 struct device_node *np = pdev->dev.of_node; 45 struct device_node *np = pdev->dev.of_node;
33 struct resource reg; 46 struct resource reg;
@@ -35,11 +48,16 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev)
35 LIST_HEAD(res); 48 LIST_HEAD(res);
36 int ret; 49 int ret;
37 50
51 of_id = of_match_device(iproc_pcie_of_match_table, &pdev->dev);
52 if (!of_id)
53 return -EINVAL;
54
38 pcie = devm_kzalloc(&pdev->dev, sizeof(struct iproc_pcie), GFP_KERNEL); 55 pcie = devm_kzalloc(&pdev->dev, sizeof(struct iproc_pcie), GFP_KERNEL);
39 if (!pcie) 56 if (!pcie)
40 return -ENOMEM; 57 return -ENOMEM;
41 58
42 pcie->dev = &pdev->dev; 59 pcie->dev = &pdev->dev;
60 pcie->type = (enum iproc_pcie_type)of_id->data;
43 platform_set_drvdata(pdev, pcie); 61 platform_set_drvdata(pdev, pcie);
44 62
45 ret = of_address_to_resource(np, 0, &reg); 63 ret = of_address_to_resource(np, 0, &reg);
@@ -114,12 +132,6 @@ static int iproc_pcie_pltfm_remove(struct platform_device *pdev)
114 return iproc_pcie_remove(pcie); 132 return iproc_pcie_remove(pcie);
115} 133}
116 134
117static const struct of_device_id iproc_pcie_of_match_table[] = {
118 { .compatible = "brcm,iproc-pcie", },
119 { /* sentinel */ }
120};
121MODULE_DEVICE_TABLE(of, iproc_pcie_of_match_table);
122
123static struct platform_driver iproc_pcie_pltfm_driver = { 135static struct platform_driver iproc_pcie_pltfm_driver = {
124 .driver = { 136 .driver = {
125 .name = "iproc-pcie", 137 .name = "iproc-pcie",
diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
index d1ad883eac04..0e11f85ba7b0 100644
--- a/drivers/pci/host/pcie-iproc.c
+++ b/drivers/pci/host/pcie-iproc.c
@@ -30,20 +30,16 @@
30 30
31#include "pcie-iproc.h" 31#include "pcie-iproc.h"
32 32
33#define CLK_CONTROL_OFFSET 0x000
34#define EP_PERST_SOURCE_SELECT_SHIFT 2 33#define EP_PERST_SOURCE_SELECT_SHIFT 2
35#define EP_PERST_SOURCE_SELECT BIT(EP_PERST_SOURCE_SELECT_SHIFT) 34#define EP_PERST_SOURCE_SELECT BIT(EP_PERST_SOURCE_SELECT_SHIFT)
36#define EP_MODE_SURVIVE_PERST_SHIFT 1 35#define EP_MODE_SURVIVE_PERST_SHIFT 1
37#define EP_MODE_SURVIVE_PERST BIT(EP_MODE_SURVIVE_PERST_SHIFT) 36#define EP_MODE_SURVIVE_PERST BIT(EP_MODE_SURVIVE_PERST_SHIFT)
38#define RC_PCIE_RST_OUTPUT_SHIFT 0 37#define RC_PCIE_RST_OUTPUT_SHIFT 0
39#define RC_PCIE_RST_OUTPUT BIT(RC_PCIE_RST_OUTPUT_SHIFT) 38#define RC_PCIE_RST_OUTPUT BIT(RC_PCIE_RST_OUTPUT_SHIFT)
39#define PAXC_RESET_MASK 0x7f
40 40
41#define CFG_IND_ADDR_OFFSET 0x120
42#define CFG_IND_ADDR_MASK 0x00001ffc 41#define CFG_IND_ADDR_MASK 0x00001ffc
43 42
44#define CFG_IND_DATA_OFFSET 0x124
45
46#define CFG_ADDR_OFFSET 0x1f8
47#define CFG_ADDR_BUS_NUM_SHIFT 20 43#define CFG_ADDR_BUS_NUM_SHIFT 20
48#define CFG_ADDR_BUS_NUM_MASK 0x0ff00000 44#define CFG_ADDR_BUS_NUM_MASK 0x0ff00000
49#define CFG_ADDR_DEV_NUM_SHIFT 15 45#define CFG_ADDR_DEV_NUM_SHIFT 15
@@ -55,12 +51,8 @@
55#define CFG_ADDR_CFG_TYPE_SHIFT 0 51#define CFG_ADDR_CFG_TYPE_SHIFT 0
56#define CFG_ADDR_CFG_TYPE_MASK 0x00000003 52#define CFG_ADDR_CFG_TYPE_MASK 0x00000003
57 53
58#define CFG_DATA_OFFSET 0x1fc
59
60#define SYS_RC_INTX_EN 0x330
61#define SYS_RC_INTX_MASK 0xf 54#define SYS_RC_INTX_MASK 0xf
62 55
63#define PCIE_LINK_STATUS_OFFSET 0xf0c
64#define PCIE_PHYLINKUP_SHIFT 3 56#define PCIE_PHYLINKUP_SHIFT 3
65#define PCIE_PHYLINKUP BIT(PCIE_PHYLINKUP_SHIFT) 57#define PCIE_PHYLINKUP BIT(PCIE_PHYLINKUP_SHIFT)
66#define PCIE_DL_ACTIVE_SHIFT 2 58#define PCIE_DL_ACTIVE_SHIFT 2
@@ -71,12 +63,54 @@
71#define OARR_SIZE_CFG_SHIFT 1 63#define OARR_SIZE_CFG_SHIFT 1
72#define OARR_SIZE_CFG BIT(OARR_SIZE_CFG_SHIFT) 64#define OARR_SIZE_CFG BIT(OARR_SIZE_CFG_SHIFT)
73 65
74#define OARR_LO(window) (0xd20 + (window) * 8)
75#define OARR_HI(window) (0xd24 + (window) * 8)
76#define OMAP_LO(window) (0xd40 + (window) * 8)
77#define OMAP_HI(window) (0xd44 + (window) * 8)
78
79#define MAX_NUM_OB_WINDOWS 2 66#define MAX_NUM_OB_WINDOWS 2
67#define MAX_NUM_PAXC_PF 4
68
69#define IPROC_PCIE_REG_INVALID 0xffff
70
71enum iproc_pcie_reg {
72 IPROC_PCIE_CLK_CTRL = 0,
73 IPROC_PCIE_CFG_IND_ADDR,
74 IPROC_PCIE_CFG_IND_DATA,
75 IPROC_PCIE_CFG_ADDR,
76 IPROC_PCIE_CFG_DATA,
77 IPROC_PCIE_INTX_EN,
78 IPROC_PCIE_OARR_LO,
79 IPROC_PCIE_OARR_HI,
80 IPROC_PCIE_OMAP_LO,
81 IPROC_PCIE_OMAP_HI,
82 IPROC_PCIE_LINK_STATUS,
83};
84
85/* iProc PCIe PAXB registers */
86static const u16 iproc_pcie_reg_paxb[] = {
87 [IPROC_PCIE_CLK_CTRL] = 0x000,
88 [IPROC_PCIE_CFG_IND_ADDR] = 0x120,
89 [IPROC_PCIE_CFG_IND_DATA] = 0x124,
90 [IPROC_PCIE_CFG_ADDR] = 0x1f8,
91 [IPROC_PCIE_CFG_DATA] = 0x1fc,
92 [IPROC_PCIE_INTX_EN] = 0x330,
93 [IPROC_PCIE_OARR_LO] = 0xd20,
94 [IPROC_PCIE_OARR_HI] = 0xd24,
95 [IPROC_PCIE_OMAP_LO] = 0xd40,
96 [IPROC_PCIE_OMAP_HI] = 0xd44,
97 [IPROC_PCIE_LINK_STATUS] = 0xf0c,
98};
99
100/* iProc PCIe PAXC v1 registers */
101static const u16 iproc_pcie_reg_paxc[] = {
102 [IPROC_PCIE_CLK_CTRL] = 0x000,
103 [IPROC_PCIE_CFG_IND_ADDR] = 0x1f0,
104 [IPROC_PCIE_CFG_IND_DATA] = 0x1f4,
105 [IPROC_PCIE_CFG_ADDR] = 0x1f8,
106 [IPROC_PCIE_CFG_DATA] = 0x1fc,
107 [IPROC_PCIE_INTX_EN] = IPROC_PCIE_REG_INVALID,
108 [IPROC_PCIE_OARR_LO] = IPROC_PCIE_REG_INVALID,
109 [IPROC_PCIE_OARR_HI] = IPROC_PCIE_REG_INVALID,
110 [IPROC_PCIE_OMAP_LO] = IPROC_PCIE_REG_INVALID,
111 [IPROC_PCIE_OMAP_HI] = IPROC_PCIE_REG_INVALID,
112 [IPROC_PCIE_LINK_STATUS] = IPROC_PCIE_REG_INVALID,
113};
80 114
81static inline struct iproc_pcie *iproc_data(struct pci_bus *bus) 115static inline struct iproc_pcie *iproc_data(struct pci_bus *bus)
82{ 116{
@@ -91,6 +125,65 @@ static inline struct iproc_pcie *iproc_data(struct pci_bus *bus)
91 return pcie; 125 return pcie;
92} 126}
93 127
128static inline bool iproc_pcie_reg_is_invalid(u16 reg_offset)
129{
130 return !!(reg_offset == IPROC_PCIE_REG_INVALID);
131}
132
133static inline u16 iproc_pcie_reg_offset(struct iproc_pcie *pcie,
134 enum iproc_pcie_reg reg)
135{
136 return pcie->reg_offsets[reg];
137}
138
139static inline u32 iproc_pcie_read_reg(struct iproc_pcie *pcie,
140 enum iproc_pcie_reg reg)
141{
142 u16 offset = iproc_pcie_reg_offset(pcie, reg);
143
144 if (iproc_pcie_reg_is_invalid(offset))
145 return 0;
146
147 return readl(pcie->base + offset);
148}
149
150static inline void iproc_pcie_write_reg(struct iproc_pcie *pcie,
151 enum iproc_pcie_reg reg, u32 val)
152{
153 u16 offset = iproc_pcie_reg_offset(pcie, reg);
154
155 if (iproc_pcie_reg_is_invalid(offset))
156 return;
157
158 writel(val, pcie->base + offset);
159}
160
161static inline void iproc_pcie_ob_write(struct iproc_pcie *pcie,
162 enum iproc_pcie_reg reg,
163 unsigned window, u32 val)
164{
165 u16 offset = iproc_pcie_reg_offset(pcie, reg);
166
167 if (iproc_pcie_reg_is_invalid(offset))
168 return;
169
170 writel(val, pcie->base + offset + (window * 8));
171}
172
173static inline bool iproc_pcie_device_is_valid(struct iproc_pcie *pcie,
174 unsigned int slot,
175 unsigned int fn)
176{
177 if (slot > 0)
178 return false;
179
180 /* PAXC can only support limited number of functions */
181 if (pcie->type == IPROC_PCIE_PAXC && fn >= MAX_NUM_PAXC_PF)
182 return false;
183
184 return true;
185}
186
94/** 187/**
95 * Note access to the configuration registers are protected at the higher layer 188 * Note access to the configuration registers are protected at the higher layer
96 * by 'pci_lock' in drivers/pci/access.c 189 * by 'pci_lock' in drivers/pci/access.c
@@ -104,28 +197,34 @@ static void __iomem *iproc_pcie_map_cfg_bus(struct pci_bus *bus,
104 unsigned fn = PCI_FUNC(devfn); 197 unsigned fn = PCI_FUNC(devfn);
105 unsigned busno = bus->number; 198 unsigned busno = bus->number;
106 u32 val; 199 u32 val;
200 u16 offset;
201
202 if (!iproc_pcie_device_is_valid(pcie, slot, fn))
203 return NULL;
107 204
108 /* root complex access */ 205 /* root complex access */
109 if (busno == 0) { 206 if (busno == 0) {
110 if (slot >= 1) 207 iproc_pcie_write_reg(pcie, IPROC_PCIE_CFG_IND_ADDR,
208 where & CFG_IND_ADDR_MASK);
209 offset = iproc_pcie_reg_offset(pcie, IPROC_PCIE_CFG_IND_DATA);
210 if (iproc_pcie_reg_is_invalid(offset))
111 return NULL; 211 return NULL;
112 writel(where & CFG_IND_ADDR_MASK, 212 else
113 pcie->base + CFG_IND_ADDR_OFFSET); 213 return (pcie->base + offset);
114 return (pcie->base + CFG_IND_DATA_OFFSET);
115 } 214 }
116 215
117 if (fn > 1)
118 return NULL;
119
120 /* EP device access */ 216 /* EP device access */
121 val = (busno << CFG_ADDR_BUS_NUM_SHIFT) | 217 val = (busno << CFG_ADDR_BUS_NUM_SHIFT) |
122 (slot << CFG_ADDR_DEV_NUM_SHIFT) | 218 (slot << CFG_ADDR_DEV_NUM_SHIFT) |
123 (fn << CFG_ADDR_FUNC_NUM_SHIFT) | 219 (fn << CFG_ADDR_FUNC_NUM_SHIFT) |
124 (where & CFG_ADDR_REG_NUM_MASK) | 220 (where & CFG_ADDR_REG_NUM_MASK) |
125 (1 & CFG_ADDR_CFG_TYPE_MASK); 221 (1 & CFG_ADDR_CFG_TYPE_MASK);
126 writel(val, pcie->base + CFG_ADDR_OFFSET); 222 iproc_pcie_write_reg(pcie, IPROC_PCIE_CFG_ADDR, val);
127 223 offset = iproc_pcie_reg_offset(pcie, IPROC_PCIE_CFG_DATA);
128 return (pcie->base + CFG_DATA_OFFSET); 224 if (iproc_pcie_reg_is_invalid(offset))
225 return NULL;
226 else
227 return (pcie->base + offset);
129} 228}
130 229
131static struct pci_ops iproc_pcie_ops = { 230static struct pci_ops iproc_pcie_ops = {
@@ -138,18 +237,29 @@ static void iproc_pcie_reset(struct iproc_pcie *pcie)
138{ 237{
139 u32 val; 238 u32 val;
140 239
240 if (pcie->type == IPROC_PCIE_PAXC) {
241 val = iproc_pcie_read_reg(pcie, IPROC_PCIE_CLK_CTRL);
242 val &= ~PAXC_RESET_MASK;
243 iproc_pcie_write_reg(pcie, IPROC_PCIE_CLK_CTRL, val);
244 udelay(100);
245 val |= PAXC_RESET_MASK;
246 iproc_pcie_write_reg(pcie, IPROC_PCIE_CLK_CTRL, val);
247 udelay(100);
248 return;
249 }
250
141 /* 251 /*
142 * Select perst_b signal as reset source. Put the device into reset, 252 * Select perst_b signal as reset source. Put the device into reset,
143 * and then bring it out of reset 253 * and then bring it out of reset
144 */ 254 */
145 val = readl(pcie->base + CLK_CONTROL_OFFSET); 255 val = iproc_pcie_read_reg(pcie, IPROC_PCIE_CLK_CTRL);
146 val &= ~EP_PERST_SOURCE_SELECT & ~EP_MODE_SURVIVE_PERST & 256 val &= ~EP_PERST_SOURCE_SELECT & ~EP_MODE_SURVIVE_PERST &
147 ~RC_PCIE_RST_OUTPUT; 257 ~RC_PCIE_RST_OUTPUT;
148 writel(val, pcie->base + CLK_CONTROL_OFFSET); 258 iproc_pcie_write_reg(pcie, IPROC_PCIE_CLK_CTRL, val);
149 udelay(250); 259 udelay(250);
150 260
151 val |= RC_PCIE_RST_OUTPUT; 261 val |= RC_PCIE_RST_OUTPUT;
152 writel(val, pcie->base + CLK_CONTROL_OFFSET); 262 iproc_pcie_write_reg(pcie, IPROC_PCIE_CLK_CTRL, val);
153 msleep(100); 263 msleep(100);
154} 264}
155 265
@@ -160,7 +270,14 @@ static int iproc_pcie_check_link(struct iproc_pcie *pcie, struct pci_bus *bus)
160 u16 pos, link_status; 270 u16 pos, link_status;
161 bool link_is_active = false; 271 bool link_is_active = false;
162 272
163 val = readl(pcie->base + PCIE_LINK_STATUS_OFFSET); 273 /*
274 * PAXC connects to emulated endpoint devices directly and does not
275 * have a Serdes. Therefore skip the link detection logic here.
276 */
277 if (pcie->type == IPROC_PCIE_PAXC)
278 return 0;
279
280 val = iproc_pcie_read_reg(pcie, IPROC_PCIE_LINK_STATUS);
164 if (!(val & PCIE_PHYLINKUP) || !(val & PCIE_DL_ACTIVE)) { 281 if (!(val & PCIE_PHYLINKUP) || !(val & PCIE_DL_ACTIVE)) {
165 dev_err(pcie->dev, "PHY or data link is INACTIVE!\n"); 282 dev_err(pcie->dev, "PHY or data link is INACTIVE!\n");
166 return -ENODEV; 283 return -ENODEV;
@@ -221,7 +338,7 @@ static int iproc_pcie_check_link(struct iproc_pcie *pcie, struct pci_bus *bus)
221 338
222static void iproc_pcie_enable(struct iproc_pcie *pcie) 339static void iproc_pcie_enable(struct iproc_pcie *pcie)
223{ 340{
224 writel(SYS_RC_INTX_MASK, pcie->base + SYS_RC_INTX_EN); 341 iproc_pcie_write_reg(pcie, IPROC_PCIE_INTX_EN, SYS_RC_INTX_MASK);
225} 342}
226 343
227/** 344/**
@@ -272,11 +389,15 @@ static int iproc_pcie_setup_ob(struct iproc_pcie *pcie, u64 axi_addr,
272 axi_addr -= ob->axi_offset; 389 axi_addr -= ob->axi_offset;
273 390
274 for (i = 0; i < MAX_NUM_OB_WINDOWS; i++) { 391 for (i = 0; i < MAX_NUM_OB_WINDOWS; i++) {
275 writel(lower_32_bits(axi_addr) | OARR_VALID | 392 iproc_pcie_ob_write(pcie, IPROC_PCIE_OARR_LO, i,
276 (ob->set_oarr_size ? 1 : 0), pcie->base + OARR_LO(i)); 393 lower_32_bits(axi_addr) | OARR_VALID |
277 writel(upper_32_bits(axi_addr), pcie->base + OARR_HI(i)); 394 (ob->set_oarr_size ? 1 : 0));
278 writel(lower_32_bits(pci_addr), pcie->base + OMAP_LO(i)); 395 iproc_pcie_ob_write(pcie, IPROC_PCIE_OARR_HI, i,
279 writel(upper_32_bits(pci_addr), pcie->base + OMAP_HI(i)); 396 upper_32_bits(axi_addr));
397 iproc_pcie_ob_write(pcie, IPROC_PCIE_OMAP_LO, i,
398 lower_32_bits(pci_addr));
399 iproc_pcie_ob_write(pcie, IPROC_PCIE_OMAP_HI, i,
400 upper_32_bits(pci_addr));
280 401
281 size -= ob->window_size; 402 size -= ob->window_size;
282 if (size == 0) 403 if (size == 0)
@@ -340,6 +461,19 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
340 goto err_exit_phy; 461 goto err_exit_phy;
341 } 462 }
342 463
464 switch (pcie->type) {
465 case IPROC_PCIE_PAXB:
466 pcie->reg_offsets = iproc_pcie_reg_paxb;
467 break;
468 case IPROC_PCIE_PAXC:
469 pcie->reg_offsets = iproc_pcie_reg_paxc;
470 break;
471 default:
472 dev_err(pcie->dev, "incompatible iProc PCIe interface\n");
473 ret = -EINVAL;
474 goto err_power_off_phy;
475 }
476
343 iproc_pcie_reset(pcie); 477 iproc_pcie_reset(pcie);
344 478
345 if (pcie->need_ob_cfg) { 479 if (pcie->need_ob_cfg) {
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 @@
15#define _PCIE_IPROC_H 15#define _PCIE_IPROC_H
16 16
17/** 17/**
18 * iProc PCIe interface type
19 *
20 * PAXB is the wrapper used in root complex that can be connected to an
21 * external endpoint device.
22 *
23 * PAXC is the wrapper used in root complex dedicated for internal emulated
24 * endpoint devices.
25 */
26enum iproc_pcie_type {
27 IPROC_PCIE_PAXB = 0,
28 IPROC_PCIE_PAXC,
29};
30
31/**
18 * iProc PCIe outbound mapping 32 * iProc PCIe outbound mapping
19 * @set_oarr_size: indicates the OARR size bit needs to be set 33 * @set_oarr_size: indicates the OARR size bit needs to be set
20 * @axi_offset: offset from the AXI address to the internal address used by 34 * @axi_offset: offset from the AXI address to the internal address used by
@@ -29,7 +43,10 @@ struct iproc_pcie_ob {
29 43
30/** 44/**
31 * iProc PCIe device 45 * iProc PCIe device
46 *
32 * @dev: pointer to device data structure 47 * @dev: pointer to device data structure
48 * @type: iProc PCIe interface type
49 * @reg_offsets: register offsets
33 * @base: PCIe host controller I/O register base 50 * @base: PCIe host controller I/O register base
34 * @sysdata: Per PCI controller data (ARM-specific) 51 * @sysdata: Per PCI controller data (ARM-specific)
35 * @root_bus: pointer to root bus 52 * @root_bus: pointer to root bus
@@ -41,6 +58,8 @@ struct iproc_pcie_ob {
41 */ 58 */
42struct iproc_pcie { 59struct iproc_pcie {
43 struct device *dev; 60 struct device *dev;
61 enum iproc_pcie_type type;
62 const u16 *reg_offsets;
44 void __iomem *base; 63 void __iomem *base;
45#ifdef CONFIG_ARM 64#ifdef CONFIG_ARM
46 struct pci_sys_data sysdata; 65 struct pci_sys_data sysdata;