Lines Matching refs:phy

61 static int qcom_ipq806x_sata_phy_init(struct phy *generic_phy)  in qcom_ipq806x_sata_phy_init()
63 struct qcom_ipq806x_sata_phy *phy = phy_get_drvdata(generic_phy); in qcom_ipq806x_sata_phy_init() local
67 reg = readl_relaxed(phy->mmio + SATA_PHY_P0_PARAM3); in qcom_ipq806x_sata_phy_init()
69 writel_relaxed(reg, phy->mmio + SATA_PHY_P0_PARAM3); in qcom_ipq806x_sata_phy_init()
71 reg = readl_relaxed(phy->mmio + SATA_PHY_P0_PARAM0) & in qcom_ipq806x_sata_phy_init()
76 writel_relaxed(reg, phy->mmio + SATA_PHY_P0_PARAM0); in qcom_ipq806x_sata_phy_init()
78 reg = readl_relaxed(phy->mmio + SATA_PHY_P0_PARAM1) & in qcom_ipq806x_sata_phy_init()
85 writel_relaxed(reg, phy->mmio + SATA_PHY_P0_PARAM1); in qcom_ipq806x_sata_phy_init()
87 reg = readl_relaxed(phy->mmio + SATA_PHY_P0_PARAM2) & in qcom_ipq806x_sata_phy_init()
90 writel_relaxed(reg, phy->mmio + SATA_PHY_P0_PARAM2); in qcom_ipq806x_sata_phy_init()
93 reg = readl_relaxed(phy->mmio + SATA_PHY_P0_PARAM4); in qcom_ipq806x_sata_phy_init()
95 writel_relaxed(reg, phy->mmio + SATA_PHY_P0_PARAM4); in qcom_ipq806x_sata_phy_init()
98 reg = readl_relaxed(phy->mmio + SATA_PHY_P0_PARAM4); in qcom_ipq806x_sata_phy_init()
100 writel_relaxed(reg, phy->mmio + SATA_PHY_P0_PARAM4); in qcom_ipq806x_sata_phy_init()
109 reg = readl_relaxed(phy->mmio + SATA_PHY_P0_PARAM4); in qcom_ipq806x_sata_phy_init()
111 writel_relaxed(reg, phy->mmio + SATA_PHY_P0_PARAM4); in qcom_ipq806x_sata_phy_init()
116 static int qcom_ipq806x_sata_phy_exit(struct phy *generic_phy) in qcom_ipq806x_sata_phy_exit()
118 struct qcom_ipq806x_sata_phy *phy = phy_get_drvdata(generic_phy); in qcom_ipq806x_sata_phy_exit() local
122 reg = readl_relaxed(phy->mmio + SATA_PHY_P0_PARAM4); in qcom_ipq806x_sata_phy_exit()
124 writel_relaxed(reg, phy->mmio + SATA_PHY_P0_PARAM4); in qcom_ipq806x_sata_phy_exit()
137 struct qcom_ipq806x_sata_phy *phy; in qcom_ipq806x_sata_phy_probe() local
141 struct phy *generic_phy; in qcom_ipq806x_sata_phy_probe()
144 phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); in qcom_ipq806x_sata_phy_probe()
145 if (!phy) in qcom_ipq806x_sata_phy_probe()
149 phy->mmio = devm_ioremap_resource(dev, res); in qcom_ipq806x_sata_phy_probe()
150 if (IS_ERR(phy->mmio)) in qcom_ipq806x_sata_phy_probe()
151 return PTR_ERR(phy->mmio); in qcom_ipq806x_sata_phy_probe()
159 phy->dev = dev; in qcom_ipq806x_sata_phy_probe()
160 phy_set_drvdata(generic_phy, phy); in qcom_ipq806x_sata_phy_probe()
161 platform_set_drvdata(pdev, phy); in qcom_ipq806x_sata_phy_probe()
163 phy->cfg_clk = devm_clk_get(dev, "cfg"); in qcom_ipq806x_sata_phy_probe()
164 if (IS_ERR(phy->cfg_clk)) { in qcom_ipq806x_sata_phy_probe()
166 return PTR_ERR(phy->cfg_clk); in qcom_ipq806x_sata_phy_probe()
169 ret = clk_prepare_enable(phy->cfg_clk); in qcom_ipq806x_sata_phy_probe()
175 clk_disable_unprepare(phy->cfg_clk); in qcom_ipq806x_sata_phy_probe()
185 struct qcom_ipq806x_sata_phy *phy = platform_get_drvdata(pdev); in qcom_ipq806x_sata_phy_remove() local
187 clk_disable_unprepare(phy->cfg_clk); in qcom_ipq806x_sata_phy_remove()