44
44
#define PCIE_IATU_NUM 6
45
45
46
46
struct ls_pcie_drvdata {
47
- const u32 pf_off ;
47
+ const u32 pf_lut_off ;
48
48
const struct dw_pcie_host_ops * ops ;
49
49
int (* exit_from_l2 )(struct dw_pcie_rp * pp );
50
50
bool scfg_support ;
@@ -54,13 +54,13 @@ struct ls_pcie_drvdata {
54
54
struct ls_pcie {
55
55
struct dw_pcie * pci ;
56
56
const struct ls_pcie_drvdata * drvdata ;
57
- void __iomem * pf_base ;
57
+ void __iomem * pf_lut_base ;
58
58
struct regmap * scfg ;
59
59
int index ;
60
60
bool big_endian ;
61
61
};
62
62
63
- #define ls_pcie_pf_readl_addr (addr ) ls_pcie_pf_readl (pcie, addr)
63
+ #define ls_pcie_pf_lut_readl_addr (addr ) ls_pcie_pf_lut_readl (pcie, addr)
64
64
#define to_ls_pcie (x ) dev_get_drvdata((x)->dev)
65
65
66
66
static bool ls_pcie_is_bridge (struct ls_pcie * pcie )
@@ -101,20 +101,20 @@ static void ls_pcie_fix_error_response(struct ls_pcie *pcie)
101
101
iowrite32 (PCIE_ABSERR_SETTING , pci -> dbi_base + PCIE_ABSERR );
102
102
}
103
103
104
- static u32 ls_pcie_pf_readl (struct ls_pcie * pcie , u32 off )
104
+ static u32 ls_pcie_pf_lut_readl (struct ls_pcie * pcie , u32 off )
105
105
{
106
106
if (pcie -> big_endian )
107
- return ioread32be (pcie -> pf_base + off );
107
+ return ioread32be (pcie -> pf_lut_base + off );
108
108
109
- return ioread32 (pcie -> pf_base + off );
109
+ return ioread32 (pcie -> pf_lut_base + off );
110
110
}
111
111
112
- static void ls_pcie_pf_writel (struct ls_pcie * pcie , u32 off , u32 val )
112
+ static void ls_pcie_pf_lut_writel (struct ls_pcie * pcie , u32 off , u32 val )
113
113
{
114
114
if (pcie -> big_endian )
115
- iowrite32be (val , pcie -> pf_base + off );
115
+ iowrite32be (val , pcie -> pf_lut_base + off );
116
116
else
117
- iowrite32 (val , pcie -> pf_base + off );
117
+ iowrite32 (val , pcie -> pf_lut_base + off );
118
118
}
119
119
120
120
static void ls_pcie_send_turnoff_msg (struct dw_pcie_rp * pp )
@@ -124,11 +124,11 @@ static void ls_pcie_send_turnoff_msg(struct dw_pcie_rp *pp)
124
124
u32 val ;
125
125
int ret ;
126
126
127
- val = ls_pcie_pf_readl (pcie , LS_PCIE_PF_MCR );
127
+ val = ls_pcie_pf_lut_readl (pcie , LS_PCIE_PF_MCR );
128
128
val |= PF_MCR_PTOMR ;
129
- ls_pcie_pf_writel (pcie , LS_PCIE_PF_MCR , val );
129
+ ls_pcie_pf_lut_writel (pcie , LS_PCIE_PF_MCR , val );
130
130
131
- ret = readx_poll_timeout (ls_pcie_pf_readl_addr , LS_PCIE_PF_MCR ,
131
+ ret = readx_poll_timeout (ls_pcie_pf_lut_readl_addr , LS_PCIE_PF_MCR ,
132
132
val , !(val & PF_MCR_PTOMR ),
133
133
PCIE_PME_TO_L2_TIMEOUT_US /10 ,
134
134
PCIE_PME_TO_L2_TIMEOUT_US );
@@ -147,15 +147,15 @@ static int ls_pcie_exit_from_l2(struct dw_pcie_rp *pp)
147
147
* Set PF_MCR_EXL2S bit in LS_PCIE_PF_MCR register for the link
148
148
* to exit L2 state.
149
149
*/
150
- val = ls_pcie_pf_readl (pcie , LS_PCIE_PF_MCR );
150
+ val = ls_pcie_pf_lut_readl (pcie , LS_PCIE_PF_MCR );
151
151
val |= PF_MCR_EXL2S ;
152
- ls_pcie_pf_writel (pcie , LS_PCIE_PF_MCR , val );
152
+ ls_pcie_pf_lut_writel (pcie , LS_PCIE_PF_MCR , val );
153
153
154
154
/*
155
155
* L2 exit timeout of 10ms is not defined in the specifications,
156
156
* it was chosen based on empirical observations.
157
157
*/
158
- ret = readx_poll_timeout (ls_pcie_pf_readl_addr , LS_PCIE_PF_MCR ,
158
+ ret = readx_poll_timeout (ls_pcie_pf_lut_readl_addr , LS_PCIE_PF_MCR ,
159
159
val , !(val & PF_MCR_EXL2S ),
160
160
1000 ,
161
161
10000 );
@@ -242,7 +242,7 @@ static const struct ls_pcie_drvdata ls1021a_drvdata = {
242
242
};
243
243
244
244
static const struct ls_pcie_drvdata layerscape_drvdata = {
245
- .pf_off = 0xc0000 ,
245
+ .pf_lut_off = 0xc0000 ,
246
246
.pm_support = true,
247
247
.ops = & ls_pcie_host_ops ,
248
248
.exit_from_l2 = ls_pcie_exit_from_l2 ,
@@ -291,7 +291,7 @@ static int ls_pcie_probe(struct platform_device *pdev)
291
291
292
292
pcie -> big_endian = of_property_read_bool (dev -> of_node , "big-endian" );
293
293
294
- pcie -> pf_base = pci -> dbi_base + pcie -> drvdata -> pf_off ;
294
+ pcie -> pf_lut_base = pci -> dbi_base + pcie -> drvdata -> pf_lut_off ;
295
295
296
296
if (pcie -> drvdata -> scfg_support ) {
297
297
pcie -> scfg = syscon_regmap_lookup_by_phandle (dev -> of_node , "fsl,pcie-scfg" );
0 commit comments