• Home
  • Raw
  • Download

Lines Matching refs:ci

37 	struct platform_device *ci;  member
79 static int ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event) in ci_hdrc_msm_notify_event() argument
81 struct device *dev = ci->dev->parent; in ci_hdrc_msm_notify_event()
89 hw_phymode_configure(ci); in ci_hdrc_msm_notify_event()
96 ret = phy_init(ci->phy); in ci_hdrc_msm_notify_event()
100 ret = phy_power_on(ci->phy); in ci_hdrc_msm_notify_event()
102 phy_exit(ci->phy); in ci_hdrc_msm_notify_event()
107 hw_write_id_reg(ci, HS_PHY_AHB_MODE, 0xffffffff, 0x8); in ci_hdrc_msm_notify_event()
110 hw_write_id_reg(ci, HS_PHY_GENCONFIG, in ci_hdrc_msm_notify_event()
114 hw_write_id_reg(ci, HS_PHY_GENCONFIG_2, in ci_hdrc_msm_notify_event()
117 if (!IS_ERR(ci->platdata->vbus_extcon.edev) || ci->role_switch) { in ci_hdrc_msm_notify_event()
118 hw_write_id_reg(ci, HS_PHY_GENCONFIG_2, in ci_hdrc_msm_notify_event()
121 hw_write(ci, OP_USBCMD, HSPHY_SESS_VLD_CTRL, in ci_hdrc_msm_notify_event()
128 phy_power_off(ci->phy); in ci_hdrc_msm_notify_event()
129 phy_exit(ci->phy); in ci_hdrc_msm_notify_event()
139 static int ci_hdrc_msm_mux_phy(struct ci_hdrc_msm *ci, in ci_hdrc_msm_mux_phy() argument
162 ci->secondary_phy = !!args.args[1]; in ci_hdrc_msm_mux_phy()
163 if (ci->secondary_phy) { in ci_hdrc_msm_mux_phy()
164 val = readl_relaxed(ci->base + HS_PHY_SEC_CTRL); in ci_hdrc_msm_mux_phy()
166 writel_relaxed(val, ci->base + HS_PHY_SEC_CTRL); in ci_hdrc_msm_mux_phy()
174 struct ci_hdrc_msm *ci; in ci_hdrc_msm_probe() local
183 ci = devm_kzalloc(&pdev->dev, sizeof(*ci), GFP_KERNEL); in ci_hdrc_msm_probe()
184 if (!ci) in ci_hdrc_msm_probe()
186 platform_set_drvdata(pdev, ci); in ci_hdrc_msm_probe()
188 ci->pdata.name = "ci_hdrc_msm"; in ci_hdrc_msm_probe()
189 ci->pdata.capoffset = DEF_CAPOFFSET; in ci_hdrc_msm_probe()
190 ci->pdata.flags = CI_HDRC_REGS_SHARED | CI_HDRC_DISABLE_STREAMING | in ci_hdrc_msm_probe()
193 ci->pdata.notify_event = ci_hdrc_msm_notify_event; in ci_hdrc_msm_probe()
199 ci->core_clk = clk = devm_clk_get(&pdev->dev, "core"); in ci_hdrc_msm_probe()
203 ci->iface_clk = clk = devm_clk_get(&pdev->dev, "iface"); in ci_hdrc_msm_probe()
207 ci->fs_clk = clk = devm_clk_get_optional(&pdev->dev, "fs"); in ci_hdrc_msm_probe()
211 ci->base = devm_platform_ioremap_resource(pdev, 1); in ci_hdrc_msm_probe()
212 if (IS_ERR(ci->base)) in ci_hdrc_msm_probe()
213 return PTR_ERR(ci->base); in ci_hdrc_msm_probe()
215 ci->rcdev.owner = THIS_MODULE; in ci_hdrc_msm_probe()
216 ci->rcdev.ops = &ci_hdrc_msm_reset_ops; in ci_hdrc_msm_probe()
217 ci->rcdev.of_node = pdev->dev.of_node; in ci_hdrc_msm_probe()
218 ci->rcdev.nr_resets = 2; in ci_hdrc_msm_probe()
219 ret = devm_reset_controller_register(&pdev->dev, &ci->rcdev); in ci_hdrc_msm_probe()
223 ret = clk_prepare_enable(ci->fs_clk); in ci_hdrc_msm_probe()
231 clk_disable_unprepare(ci->fs_clk); in ci_hdrc_msm_probe()
233 ret = clk_prepare_enable(ci->core_clk); in ci_hdrc_msm_probe()
237 ret = clk_prepare_enable(ci->iface_clk); in ci_hdrc_msm_probe()
241 ret = ci_hdrc_msm_mux_phy(ci, pdev); in ci_hdrc_msm_probe()
248 ci->hsic = of_device_is_compatible(phy_node, "qcom,usb-hsic-phy"); in ci_hdrc_msm_probe()
254 pdev->num_resources, &ci->pdata); in ci_hdrc_msm_probe()
262 ci->ci = plat_ci; in ci_hdrc_msm_probe()
271 clk_disable_unprepare(ci->iface_clk); in ci_hdrc_msm_probe()
273 clk_disable_unprepare(ci->core_clk); in ci_hdrc_msm_probe()
279 struct ci_hdrc_msm *ci = platform_get_drvdata(pdev); in ci_hdrc_msm_remove() local
282 ci_hdrc_remove_device(ci->ci); in ci_hdrc_msm_remove()
283 clk_disable_unprepare(ci->iface_clk); in ci_hdrc_msm_remove()
284 clk_disable_unprepare(ci->core_clk); in ci_hdrc_msm_remove()