Lines Matching refs:pcie

12 void cdns_pcie_detect_quiet_min_delay_set(struct cdns_pcie *pcie)  in cdns_pcie_detect_quiet_min_delay_set()  argument
20 ltssm_control_cap = cdns_pcie_readl(pcie, CDNS_PCIE_LTSSM_CONTROL_CAP); in cdns_pcie_detect_quiet_min_delay_set()
25 cdns_pcie_writel(pcie, CDNS_PCIE_LTSSM_CONTROL_CAP, ltssm_control_cap); in cdns_pcie_detect_quiet_min_delay_set()
29 void cdns_pcie_set_outbound_region(struct cdns_pcie *pcie, u8 busnr, u8 fn, in cdns_pcie_set_outbound_region() argument
49 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR0(r), addr0); in cdns_pcie_set_outbound_region()
50 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR1(r), addr1); in cdns_pcie_set_outbound_region()
78 if (pcie->is_rc) { in cdns_pcie_set_outbound_region()
91 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC0(r), desc0); in cdns_pcie_set_outbound_region()
92 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC1(r), desc1); in cdns_pcie_set_outbound_region()
95 if (pcie->ops->cpu_addr_fixup) in cdns_pcie_set_outbound_region()
96 cpu_addr = pcie->ops->cpu_addr_fixup(pcie, cpu_addr); in cdns_pcie_set_outbound_region()
102 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR0(r), addr0); in cdns_pcie_set_outbound_region()
103 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR1(r), addr1); in cdns_pcie_set_outbound_region()
107 void cdns_pcie_set_outbound_region_for_normal_msg(struct cdns_pcie *pcie, in cdns_pcie_set_outbound_region_for_normal_msg() argument
117 if (pcie->is_rc) { in cdns_pcie_set_outbound_region_for_normal_msg()
126 if (pcie->ops->cpu_addr_fixup) in cdns_pcie_set_outbound_region_for_normal_msg()
127 cpu_addr = pcie->ops->cpu_addr_fixup(pcie, cpu_addr); in cdns_pcie_set_outbound_region_for_normal_msg()
133 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR0(r), 0); in cdns_pcie_set_outbound_region_for_normal_msg()
134 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR1(r), 0); in cdns_pcie_set_outbound_region_for_normal_msg()
135 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC0(r), desc0); in cdns_pcie_set_outbound_region_for_normal_msg()
136 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC1(r), desc1); in cdns_pcie_set_outbound_region_for_normal_msg()
137 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR0(r), addr0); in cdns_pcie_set_outbound_region_for_normal_msg()
138 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR1(r), addr1); in cdns_pcie_set_outbound_region_for_normal_msg()
142 void cdns_pcie_reset_outbound_region(struct cdns_pcie *pcie, u32 r) in cdns_pcie_reset_outbound_region() argument
144 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR0(r), 0); in cdns_pcie_reset_outbound_region()
145 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR1(r), 0); in cdns_pcie_reset_outbound_region()
147 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC0(r), 0); in cdns_pcie_reset_outbound_region()
148 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC1(r), 0); in cdns_pcie_reset_outbound_region()
150 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR0(r), 0); in cdns_pcie_reset_outbound_region()
151 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR1(r), 0); in cdns_pcie_reset_outbound_region()
155 void cdns_pcie_disable_phy(struct cdns_pcie *pcie) in cdns_pcie_disable_phy() argument
157 int i = pcie->phy_count; in cdns_pcie_disable_phy()
160 phy_power_off(pcie->phy[i]); in cdns_pcie_disable_phy()
161 phy_exit(pcie->phy[i]); in cdns_pcie_disable_phy()
166 int cdns_pcie_enable_phy(struct cdns_pcie *pcie) in cdns_pcie_enable_phy() argument
171 for (i = 0; i < pcie->phy_count; i++) { in cdns_pcie_enable_phy()
172 ret = phy_init(pcie->phy[i]); in cdns_pcie_enable_phy()
176 ret = phy_power_on(pcie->phy[i]); in cdns_pcie_enable_phy()
178 phy_exit(pcie->phy[i]); in cdns_pcie_enable_phy()
187 phy_power_off(pcie->phy[i]); in cdns_pcie_enable_phy()
188 phy_exit(pcie->phy[i]); in cdns_pcie_enable_phy()
195 int cdns_pcie_init_phy(struct device *dev, struct cdns_pcie *pcie) in cdns_pcie_init_phy() argument
208 pcie->phy_count = 0; in cdns_pcie_init_phy()
235 pcie->phy_count = phy_count; in cdns_pcie_init_phy()
236 pcie->phy = phy; in cdns_pcie_init_phy()
237 pcie->link = link; in cdns_pcie_init_phy()
239 ret = cdns_pcie_enable_phy(pcie); in cdns_pcie_init_phy()
257 struct cdns_pcie *pcie = dev_get_drvdata(dev); in cdns_pcie_suspend_noirq() local
259 cdns_pcie_disable_phy(pcie); in cdns_pcie_suspend_noirq()
266 struct cdns_pcie *pcie = dev_get_drvdata(dev); in cdns_pcie_resume_noirq() local
269 ret = cdns_pcie_enable_phy(pcie); in cdns_pcie_resume_noirq()