Lines Matching refs:pcie
10 void cdns_pcie_set_outbound_region(struct cdns_pcie *pcie, u8 fn, in cdns_pcie_set_outbound_region() argument
30 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR0(r), addr0); in cdns_pcie_set_outbound_region()
31 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR1(r), addr1); in cdns_pcie_set_outbound_region()
59 if (pcie->is_rc) { in cdns_pcie_set_outbound_region()
63 desc1 |= CDNS_PCIE_AT_OB_REGION_DESC1_BUS(pcie->bus); in cdns_pcie_set_outbound_region()
72 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC0(r), desc0); in cdns_pcie_set_outbound_region()
73 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC1(r), desc1); in cdns_pcie_set_outbound_region()
76 cpu_addr -= pcie->mem_res->start; in cdns_pcie_set_outbound_region()
81 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR0(r), addr0); in cdns_pcie_set_outbound_region()
82 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR1(r), addr1); in cdns_pcie_set_outbound_region()
85 void cdns_pcie_set_outbound_region_for_normal_msg(struct cdns_pcie *pcie, u8 fn, in cdns_pcie_set_outbound_region_for_normal_msg() argument
94 if (pcie->is_rc) { in cdns_pcie_set_outbound_region_for_normal_msg()
97 desc1 |= CDNS_PCIE_AT_OB_REGION_DESC1_BUS(pcie->bus); in cdns_pcie_set_outbound_region_for_normal_msg()
103 cpu_addr -= pcie->mem_res->start; in cdns_pcie_set_outbound_region_for_normal_msg()
108 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR0(r), 0); in cdns_pcie_set_outbound_region_for_normal_msg()
109 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR1(r), 0); in cdns_pcie_set_outbound_region_for_normal_msg()
110 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC0(r), desc0); in cdns_pcie_set_outbound_region_for_normal_msg()
111 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC1(r), desc1); in cdns_pcie_set_outbound_region_for_normal_msg()
112 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR0(r), addr0); in cdns_pcie_set_outbound_region_for_normal_msg()
113 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR1(r), addr1); in cdns_pcie_set_outbound_region_for_normal_msg()
116 void cdns_pcie_reset_outbound_region(struct cdns_pcie *pcie, u32 r) in cdns_pcie_reset_outbound_region() argument
118 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR0(r), 0); in cdns_pcie_reset_outbound_region()
119 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_PCI_ADDR1(r), 0); in cdns_pcie_reset_outbound_region()
121 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC0(r), 0); in cdns_pcie_reset_outbound_region()
122 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_DESC1(r), 0); in cdns_pcie_reset_outbound_region()
124 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR0(r), 0); in cdns_pcie_reset_outbound_region()
125 cdns_pcie_writel(pcie, CDNS_PCIE_AT_OB_REGION_CPU_ADDR1(r), 0); in cdns_pcie_reset_outbound_region()
128 void cdns_pcie_disable_phy(struct cdns_pcie *pcie) in cdns_pcie_disable_phy() argument
130 int i = pcie->phy_count; in cdns_pcie_disable_phy()
133 phy_power_off(pcie->phy[i]); in cdns_pcie_disable_phy()
134 phy_exit(pcie->phy[i]); in cdns_pcie_disable_phy()
138 int cdns_pcie_enable_phy(struct cdns_pcie *pcie) in cdns_pcie_enable_phy() argument
143 for (i = 0; i < pcie->phy_count; i++) { in cdns_pcie_enable_phy()
144 ret = phy_init(pcie->phy[i]); in cdns_pcie_enable_phy()
148 ret = phy_power_on(pcie->phy[i]); in cdns_pcie_enable_phy()
150 phy_exit(pcie->phy[i]); in cdns_pcie_enable_phy()
159 phy_power_off(pcie->phy[i]); in cdns_pcie_enable_phy()
160 phy_exit(pcie->phy[i]); in cdns_pcie_enable_phy()
166 int cdns_pcie_init_phy(struct device *dev, struct cdns_pcie *pcie) in cdns_pcie_init_phy() argument
179 pcie->phy_count = 0; in cdns_pcie_init_phy()
206 pcie->phy_count = phy_count; in cdns_pcie_init_phy()
207 pcie->phy = phy; in cdns_pcie_init_phy()
208 pcie->link = link; in cdns_pcie_init_phy()
210 ret = cdns_pcie_enable_phy(pcie); in cdns_pcie_init_phy()
228 struct cdns_pcie *pcie = dev_get_drvdata(dev); in cdns_pcie_suspend_noirq() local
230 cdns_pcie_disable_phy(pcie); in cdns_pcie_suspend_noirq()
237 struct cdns_pcie *pcie = dev_get_drvdata(dev); in cdns_pcie_resume_noirq() local
240 ret = cdns_pcie_enable_phy(pcie); in cdns_pcie_resume_noirq()