Lines Matching refs:spear13xx_pcie

24 struct spear13xx_pcie {  struct
69 static int spear13xx_pcie_establish_link(struct spear13xx_pcie *spear13xx_pcie) in spear13xx_pcie_establish_link() argument
71 struct dw_pcie *pci = spear13xx_pcie->pci; in spear13xx_pcie_establish_link()
73 struct pcie_app_reg *app_reg = spear13xx_pcie->app_base; in spear13xx_pcie_establish_link()
107 struct spear13xx_pcie *spear13xx_pcie = arg; in spear13xx_pcie_irq_handler() local
108 struct pcie_app_reg *app_reg = spear13xx_pcie->app_base; in spear13xx_pcie_irq_handler()
109 struct dw_pcie *pci = spear13xx_pcie->pci; in spear13xx_pcie_irq_handler()
125 static void spear13xx_pcie_enable_interrupts(struct spear13xx_pcie *spear13xx_pcie) in spear13xx_pcie_enable_interrupts() argument
127 struct dw_pcie *pci = spear13xx_pcie->pci; in spear13xx_pcie_enable_interrupts()
129 struct pcie_app_reg *app_reg = spear13xx_pcie->app_base; in spear13xx_pcie_enable_interrupts()
141 struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pci); in spear13xx_pcie_link_up() local
142 struct pcie_app_reg *app_reg = spear13xx_pcie->app_base; in spear13xx_pcie_link_up()
153 struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pci); in spear13xx_pcie_host_init() local
155 spear13xx_pcie_establish_link(spear13xx_pcie); in spear13xx_pcie_host_init()
156 spear13xx_pcie_enable_interrupts(spear13xx_pcie); in spear13xx_pcie_host_init()
165 static int spear13xx_add_pcie_port(struct spear13xx_pcie *spear13xx_pcie, in spear13xx_add_pcie_port() argument
168 struct dw_pcie *pci = spear13xx_pcie->pci; in spear13xx_add_pcie_port()
179 "spear1340-pcie", spear13xx_pcie); in spear13xx_add_pcie_port()
204 struct spear13xx_pcie *spear13xx_pcie; in spear13xx_pcie_probe() local
209 spear13xx_pcie = devm_kzalloc(dev, sizeof(*spear13xx_pcie), GFP_KERNEL); in spear13xx_pcie_probe()
210 if (!spear13xx_pcie) in spear13xx_pcie_probe()
220 spear13xx_pcie->pci = pci; in spear13xx_pcie_probe()
222 spear13xx_pcie->phy = devm_phy_get(dev, "pcie-phy"); in spear13xx_pcie_probe()
223 if (IS_ERR(spear13xx_pcie->phy)) { in spear13xx_pcie_probe()
224 ret = PTR_ERR(spear13xx_pcie->phy); in spear13xx_pcie_probe()
232 phy_init(spear13xx_pcie->phy); in spear13xx_pcie_probe()
234 spear13xx_pcie->clk = devm_clk_get(dev, NULL); in spear13xx_pcie_probe()
235 if (IS_ERR(spear13xx_pcie->clk)) { in spear13xx_pcie_probe()
237 return PTR_ERR(spear13xx_pcie->clk); in spear13xx_pcie_probe()
239 ret = clk_prepare_enable(spear13xx_pcie->clk); in spear13xx_pcie_probe()
251 spear13xx_pcie->app_base = pci->dbi_base + 0x2000; in spear13xx_pcie_probe()
256 platform_set_drvdata(pdev, spear13xx_pcie); in spear13xx_pcie_probe()
258 ret = spear13xx_add_pcie_port(spear13xx_pcie, pdev); in spear13xx_pcie_probe()
265 clk_disable_unprepare(spear13xx_pcie->clk); in spear13xx_pcie_probe()