Lines Matching refs:control_phy
27 struct omap_control_phy *control_phy; in omap_control_pcie_pcs() local
34 control_phy = dev_get_drvdata(dev); in omap_control_pcie_pcs()
35 if (!control_phy) { in omap_control_pcie_pcs()
40 if (control_phy->type != OMAP_CTRL_TYPE_PCIE) { in omap_control_pcie_pcs()
45 val = readl(control_phy->pcie_pcs); in omap_control_pcie_pcs()
49 writel(val, control_phy->pcie_pcs); in omap_control_pcie_pcs()
62 struct omap_control_phy *control_phy; in omap_control_phy_power() local
69 control_phy = dev_get_drvdata(dev); in omap_control_phy_power()
70 if (!control_phy) { in omap_control_phy_power()
75 if (control_phy->type == OMAP_CTRL_TYPE_OTGHS) in omap_control_phy_power()
78 val = readl(control_phy->power); in omap_control_phy_power()
80 switch (control_phy->type) { in omap_control_phy_power()
90 rate = clk_get_rate(control_phy->sys_clk); in omap_control_phy_power()
129 __func__, control_phy->type); in omap_control_phy_power()
133 writel(val, control_phy->power); in omap_control_phy_power()
271 struct omap_control_phy *control_phy; in omap_control_phy_probe() local
273 control_phy = devm_kzalloc(&pdev->dev, sizeof(*control_phy), in omap_control_phy_probe()
275 if (!control_phy) in omap_control_phy_probe()
278 control_phy->dev = &pdev->dev; in omap_control_phy_probe()
279 control_phy->type = *(enum omap_control_phy_type *)device_get_match_data(&pdev->dev); in omap_control_phy_probe()
281 if (control_phy->type == OMAP_CTRL_TYPE_OTGHS) { in omap_control_phy_probe()
282 control_phy->otghs_control = in omap_control_phy_probe()
284 if (IS_ERR(control_phy->otghs_control)) in omap_control_phy_probe()
285 return PTR_ERR(control_phy->otghs_control); in omap_control_phy_probe()
287 control_phy->power = in omap_control_phy_probe()
289 if (IS_ERR(control_phy->power)) { in omap_control_phy_probe()
291 return PTR_ERR(control_phy->power); in omap_control_phy_probe()
295 if (control_phy->type == OMAP_CTRL_TYPE_PIPE3 || in omap_control_phy_probe()
296 control_phy->type == OMAP_CTRL_TYPE_PCIE) { in omap_control_phy_probe()
297 control_phy->sys_clk = devm_clk_get(control_phy->dev, in omap_control_phy_probe()
299 if (IS_ERR(control_phy->sys_clk)) { in omap_control_phy_probe()
305 if (control_phy->type == OMAP_CTRL_TYPE_PCIE) { in omap_control_phy_probe()
306 control_phy->pcie_pcs = in omap_control_phy_probe()
308 if (IS_ERR(control_phy->pcie_pcs)) in omap_control_phy_probe()
309 return PTR_ERR(control_phy->pcie_pcs); in omap_control_phy_probe()
312 dev_set_drvdata(control_phy->dev, control_phy); in omap_control_phy_probe()