4444#define PCIE_IATU_NUM 6
4545
4646struct ls_pcie_drvdata {
47- const u32 pf_off ;
47+ const u32 pf_lut_off ;
4848 const struct dw_pcie_host_ops * ops ;
4949 int (* exit_from_l2 )(struct dw_pcie_rp * pp );
5050 bool scfg_support ;
@@ -54,13 +54,13 @@ struct ls_pcie_drvdata {
5454struct ls_pcie {
5555 struct dw_pcie * pci ;
5656 const struct ls_pcie_drvdata * drvdata ;
57- void __iomem * pf_base ;
57+ void __iomem * pf_lut_base ;
5858 struct regmap * scfg ;
5959 int index ;
6060 bool big_endian ;
6161};
6262
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)
6464#define to_ls_pcie (x ) dev_get_drvdata((x)->dev)
6565
6666static bool ls_pcie_is_bridge (struct ls_pcie * pcie )
@@ -101,20 +101,20 @@ static void ls_pcie_fix_error_response(struct ls_pcie *pcie)
101101 iowrite32 (PCIE_ABSERR_SETTING , pci -> dbi_base + PCIE_ABSERR );
102102}
103103
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 )
105105{
106106 if (pcie -> big_endian )
107- return ioread32be (pcie -> pf_base + off );
107+ return ioread32be (pcie -> pf_lut_base + off );
108108
109- return ioread32 (pcie -> pf_base + off );
109+ return ioread32 (pcie -> pf_lut_base + off );
110110}
111111
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 )
113113{
114114 if (pcie -> big_endian )
115- iowrite32be (val , pcie -> pf_base + off );
115+ iowrite32be (val , pcie -> pf_lut_base + off );
116116 else
117- iowrite32 (val , pcie -> pf_base + off );
117+ iowrite32 (val , pcie -> pf_lut_base + off );
118118}
119119
120120static 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)
124124 u32 val ;
125125 int ret ;
126126
127- val = ls_pcie_pf_readl (pcie , LS_PCIE_PF_MCR );
127+ val = ls_pcie_pf_lut_readl (pcie , LS_PCIE_PF_MCR );
128128 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 );
130130
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 ,
132132 val , !(val & PF_MCR_PTOMR ),
133133 PCIE_PME_TO_L2_TIMEOUT_US /10 ,
134134 PCIE_PME_TO_L2_TIMEOUT_US );
@@ -147,15 +147,15 @@ static int ls_pcie_exit_from_l2(struct dw_pcie_rp *pp)
147147 * Set PF_MCR_EXL2S bit in LS_PCIE_PF_MCR register for the link
148148 * to exit L2 state.
149149 */
150- val = ls_pcie_pf_readl (pcie , LS_PCIE_PF_MCR );
150+ val = ls_pcie_pf_lut_readl (pcie , LS_PCIE_PF_MCR );
151151 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 );
153153
154154 /*
155155 * L2 exit timeout of 10ms is not defined in the specifications,
156156 * it was chosen based on empirical observations.
157157 */
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 ,
159159 val , !(val & PF_MCR_EXL2S ),
160160 1000 ,
161161 10000 );
@@ -242,7 +242,7 @@ static const struct ls_pcie_drvdata ls1021a_drvdata = {
242242};
243243
244244static const struct ls_pcie_drvdata layerscape_drvdata = {
245- .pf_off = 0xc0000 ,
245+ .pf_lut_off = 0xc0000 ,
246246 .pm_support = true,
247247 .ops = & ls_pcie_host_ops ,
248248 .exit_from_l2 = ls_pcie_exit_from_l2 ,
@@ -291,7 +291,7 @@ static int ls_pcie_probe(struct platform_device *pdev)
291291
292292 pcie -> big_endian = of_property_read_bool (dev -> of_node , "big-endian" );
293293
294- pcie -> pf_base = pci -> dbi_base + pcie -> drvdata -> pf_off ;
294+ pcie -> pf_lut_base = pci -> dbi_base + pcie -> drvdata -> pf_lut_off ;
295295
296296 if (pcie -> drvdata -> scfg_support ) {
297297 pcie -> scfg = syscon_regmap_lookup_by_phandle (dev -> of_node , "fsl,pcie-scfg" );
0 commit comments