Lines Matching refs:control_phy

37 	struct omap_control_phy	*control_phy;  in omap_control_pcie_pcs()  local
44 control_phy = dev_get_drvdata(dev); in omap_control_pcie_pcs()
45 if (!control_phy) { in omap_control_pcie_pcs()
50 if (control_phy->type != OMAP_CTRL_TYPE_PCIE) { in omap_control_pcie_pcs()
55 val = readl(control_phy->pcie_pcs); in omap_control_pcie_pcs()
59 writel(val, control_phy->pcie_pcs); in omap_control_pcie_pcs()
72 struct omap_control_phy *control_phy; in omap_control_phy_power() local
79 control_phy = dev_get_drvdata(dev); in omap_control_phy_power()
80 if (!control_phy) { in omap_control_phy_power()
85 if (control_phy->type == OMAP_CTRL_TYPE_OTGHS) in omap_control_phy_power()
88 val = readl(control_phy->power); in omap_control_phy_power()
90 switch (control_phy->type) { in omap_control_phy_power()
100 rate = clk_get_rate(control_phy->sys_clk); in omap_control_phy_power()
139 __func__, control_phy->type); in omap_control_phy_power()
143 writel(val, control_phy->power); in omap_control_phy_power()
283 struct omap_control_phy *control_phy; in omap_control_phy_probe() local
289 control_phy = devm_kzalloc(&pdev->dev, sizeof(*control_phy), in omap_control_phy_probe()
291 if (!control_phy) in omap_control_phy_probe()
294 control_phy->dev = &pdev->dev; in omap_control_phy_probe()
295 control_phy->type = *(enum omap_control_phy_type *)of_id->data; in omap_control_phy_probe()
297 if (control_phy->type == OMAP_CTRL_TYPE_OTGHS) { in omap_control_phy_probe()
300 control_phy->otghs_control = devm_ioremap_resource( in omap_control_phy_probe()
302 if (IS_ERR(control_phy->otghs_control)) in omap_control_phy_probe()
303 return PTR_ERR(control_phy->otghs_control); in omap_control_phy_probe()
307 control_phy->power = devm_ioremap_resource(&pdev->dev, res); in omap_control_phy_probe()
308 if (IS_ERR(control_phy->power)) { in omap_control_phy_probe()
310 return PTR_ERR(control_phy->power); in omap_control_phy_probe()
314 if (control_phy->type == OMAP_CTRL_TYPE_PIPE3 || in omap_control_phy_probe()
315 control_phy->type == OMAP_CTRL_TYPE_PCIE) { in omap_control_phy_probe()
316 control_phy->sys_clk = devm_clk_get(control_phy->dev, in omap_control_phy_probe()
318 if (IS_ERR(control_phy->sys_clk)) { in omap_control_phy_probe()
324 if (control_phy->type == OMAP_CTRL_TYPE_PCIE) { in omap_control_phy_probe()
327 control_phy->pcie_pcs = devm_ioremap_resource(&pdev->dev, res); in omap_control_phy_probe()
328 if (IS_ERR(control_phy->pcie_pcs)) in omap_control_phy_probe()
329 return PTR_ERR(control_phy->pcie_pcs); in omap_control_phy_probe()
332 dev_set_drvdata(control_phy->dev, control_phy); in omap_control_phy_probe()