Lines Matching refs:u2d
37 static struct pxa3xx_u2d_ulpi *u2d; variable
41 return __raw_readl(u2d->mmio_base + reg); in u2d_readl()
46 __raw_writel(val, u2d->mmio_base + reg); in u2d_writel()
139 err = usb_phy_init(u2d->otg); in pxa310_start_otg_host_transcvr()
145 err = otg_set_vbus(u2d->otg->otg, 1); in pxa310_start_otg_host_transcvr()
151 err = otg_set_host(u2d->otg->otg, host); in pxa310_start_otg_host_transcvr()
173 if (u2d->ulpi_mode & ULPI_IC_6PIN_SERIAL) in pxa310_start_otg_hc()
175 else if (u2d->ulpi_mode & ULPI_IC_3PIN_SERIAL) in pxa310_start_otg_hc()
189 otg_set_host(u2d->otg->otg, NULL); in pxa310_stop_otg_hc()
190 otg_set_vbus(u2d->otg->otg, 0); in pxa310_stop_otg_hc()
191 usb_phy_shutdown(u2d->otg); in pxa310_stop_otg_hc()
219 u2d->ulpi_mode = ulpi_mode; in pxa310_otg_init()
221 u2d->otg = otg_ulpi_create(&pxa310_ulpi_access_ops, ulpi_mode); in pxa310_otg_init()
222 if (!u2d->otg) in pxa310_otg_init()
225 u2d->otg->io_priv = u2d->mmio_base; in pxa310_otg_init()
232 kfree(u2d->otg); in pxa310_otg_exit()
253 if (!u2d) in pxa3xx_u2d_start_hc()
256 clk_prepare_enable(u2d->clk); in pxa3xx_u2d_start_hc()
270 if (!u2d) in pxa3xx_u2d_stop_hc()
276 clk_disable_unprepare(u2d->clk); in pxa3xx_u2d_stop_hc()
286 u2d = kzalloc(sizeof(*u2d), GFP_KERNEL); in pxa3xx_u2d_probe()
287 if (!u2d) in pxa3xx_u2d_probe()
290 u2d->clk = clk_get(&pdev->dev, NULL); in pxa3xx_u2d_probe()
291 if (IS_ERR(u2d->clk)) { in pxa3xx_u2d_probe()
293 err = PTR_ERR(u2d->clk); in pxa3xx_u2d_probe()
311 u2d->mmio_base = ioremap(r->start, resource_size(r)); in pxa3xx_u2d_probe()
312 if (!u2d->mmio_base) { in pxa3xx_u2d_probe()
331 platform_set_drvdata(pdev, u2d); in pxa3xx_u2d_probe()
339 iounmap(u2d->mmio_base); in pxa3xx_u2d_probe()
343 clk_put(u2d->clk); in pxa3xx_u2d_probe()
345 kfree(u2d); in pxa3xx_u2d_probe()
363 iounmap(u2d->mmio_base); in pxa3xx_u2d_remove()
367 clk_put(u2d->clk); in pxa3xx_u2d_remove()
369 kfree(u2d); in pxa3xx_u2d_remove()