Lines Matching refs:spear13xx_pcie
24 struct spear13xx_pcie { struct
71 struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pci); in spear13xx_pcie_start_link() local
72 struct pcie_app_reg __iomem *app_reg = spear13xx_pcie->app_base; in spear13xx_pcie_start_link()
85 struct spear13xx_pcie *spear13xx_pcie = arg; in spear13xx_pcie_irq_handler() local
86 struct pcie_app_reg __iomem *app_reg = spear13xx_pcie->app_base; in spear13xx_pcie_irq_handler()
87 struct dw_pcie *pci = spear13xx_pcie->pci; in spear13xx_pcie_irq_handler()
103 static void spear13xx_pcie_enable_interrupts(struct spear13xx_pcie *spear13xx_pcie) in spear13xx_pcie_enable_interrupts() argument
105 struct pcie_app_reg __iomem *app_reg = spear13xx_pcie->app_base; in spear13xx_pcie_enable_interrupts()
115 struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pci); in spear13xx_pcie_link_up() local
116 struct pcie_app_reg __iomem *app_reg = spear13xx_pcie->app_base; in spear13xx_pcie_link_up()
124 struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pci); in spear13xx_pcie_host_init() local
128 spear13xx_pcie->app_base = pci->dbi_base + 0x2000; in spear13xx_pcie_host_init()
142 spear13xx_pcie_enable_interrupts(spear13xx_pcie); in spear13xx_pcie_host_init()
151 static int spear13xx_add_pcie_port(struct spear13xx_pcie *spear13xx_pcie, in spear13xx_add_pcie_port() argument
154 struct dw_pcie *pci = spear13xx_pcie->pci; in spear13xx_add_pcie_port()
165 "spear1340-pcie", spear13xx_pcie); in spear13xx_add_pcie_port()
192 struct spear13xx_pcie *spear13xx_pcie; in spear13xx_pcie_probe() local
196 spear13xx_pcie = devm_kzalloc(dev, sizeof(*spear13xx_pcie), GFP_KERNEL); in spear13xx_pcie_probe()
197 if (!spear13xx_pcie) in spear13xx_pcie_probe()
207 spear13xx_pcie->pci = pci; in spear13xx_pcie_probe()
209 spear13xx_pcie->phy = devm_phy_get(dev, "pcie-phy"); in spear13xx_pcie_probe()
210 if (IS_ERR(spear13xx_pcie->phy)) { in spear13xx_pcie_probe()
211 ret = PTR_ERR(spear13xx_pcie->phy); in spear13xx_pcie_probe()
219 phy_init(spear13xx_pcie->phy); in spear13xx_pcie_probe()
221 spear13xx_pcie->clk = devm_clk_get(dev, NULL); in spear13xx_pcie_probe()
222 if (IS_ERR(spear13xx_pcie->clk)) { in spear13xx_pcie_probe()
224 return PTR_ERR(spear13xx_pcie->clk); in spear13xx_pcie_probe()
226 ret = clk_prepare_enable(spear13xx_pcie->clk); in spear13xx_pcie_probe()
235 platform_set_drvdata(pdev, spear13xx_pcie); in spear13xx_pcie_probe()
237 ret = spear13xx_add_pcie_port(spear13xx_pcie, pdev); in spear13xx_pcie_probe()
244 clk_disable_unprepare(spear13xx_pcie->clk); in spear13xx_pcie_probe()