Lines Matching refs:u2d
40 static struct pxa3xx_u2d_ulpi *u2d; variable
44 return __raw_readl(u2d->mmio_base + reg); in u2d_readl()
49 __raw_writel(val, u2d->mmio_base + reg); in u2d_writel()
142 err = usb_phy_init(u2d->otg); in pxa310_start_otg_host_transcvr()
148 err = otg_set_vbus(u2d->otg->otg, 1); in pxa310_start_otg_host_transcvr()
154 err = otg_set_host(u2d->otg->otg, host); in pxa310_start_otg_host_transcvr()
176 if (u2d->ulpi_mode & ULPI_IC_6PIN_SERIAL) in pxa310_start_otg_hc()
178 else if (u2d->ulpi_mode & ULPI_IC_3PIN_SERIAL) in pxa310_start_otg_hc()
192 otg_set_host(u2d->otg->otg, NULL); in pxa310_stop_otg_hc()
193 otg_set_vbus(u2d->otg->otg, 0); in pxa310_stop_otg_hc()
194 usb_phy_shutdown(u2d->otg); in pxa310_stop_otg_hc()
222 u2d->ulpi_mode = ulpi_mode; in pxa310_otg_init()
224 u2d->otg = otg_ulpi_create(&pxa310_ulpi_access_ops, ulpi_mode); in pxa310_otg_init()
225 if (!u2d->otg) in pxa310_otg_init()
228 u2d->otg->io_priv = u2d->mmio_base; in pxa310_otg_init()
235 kfree(u2d->otg); in pxa310_otg_exit()
256 if (!u2d) in pxa3xx_u2d_start_hc()
259 clk_enable(u2d->clk); in pxa3xx_u2d_start_hc()
273 if (!u2d) in pxa3xx_u2d_stop_hc()
279 clk_disable(u2d->clk); in pxa3xx_u2d_stop_hc()
289 u2d = kzalloc(sizeof(struct pxa3xx_u2d_ulpi), GFP_KERNEL); in pxa3xx_u2d_probe()
290 if (!u2d) { in pxa3xx_u2d_probe()
295 u2d->clk = clk_get(&pdev->dev, NULL); in pxa3xx_u2d_probe()
296 if (IS_ERR(u2d->clk)) { in pxa3xx_u2d_probe()
298 err = PTR_ERR(u2d->clk); in pxa3xx_u2d_probe()
316 u2d->mmio_base = ioremap(r->start, resource_size(r)); in pxa3xx_u2d_probe()
317 if (!u2d->mmio_base) { in pxa3xx_u2d_probe()
336 platform_set_drvdata(pdev, &u2d); in pxa3xx_u2d_probe()
344 iounmap(u2d->mmio_base); in pxa3xx_u2d_probe()
348 clk_put(u2d->clk); in pxa3xx_u2d_probe()
350 kfree(u2d); in pxa3xx_u2d_probe()
368 iounmap(u2d->mmio_base); in pxa3xx_u2d_remove()
372 clk_put(u2d->clk); in pxa3xx_u2d_remove()
374 kfree(u2d); in pxa3xx_u2d_remove()