Lines Matching +full:ulpi +full:- +full:0
1 // SPDX-License-Identifier: GPL-2.0
3 * ulpi.c - DesignWare USB3 Controller's ULPI PHY interface
12 #include <linux/ulpi/regs.h>
36 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); in dwc3_ulpi_busyloop()
40 while (count--) { in dwc3_ulpi_busyloop()
42 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYACC(0)); in dwc3_ulpi_busyloop()
44 return 0; in dwc3_ulpi_busyloop()
48 return -ETIMEDOUT; in dwc3_ulpi_busyloop()
58 dwc3_writel(dwc->regs, DWC3_GUSB2PHYACC(0), reg); in dwc3_ulpi_read()
64 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYACC(0)); in dwc3_ulpi_read()
76 dwc3_writel(dwc->regs, DWC3_GUSB2PHYACC(0), reg); in dwc3_ulpi_write()
89 dwc->ulpi = ulpi_register_interface(dwc->dev, &dwc3_ulpi_ops); in dwc3_ulpi_init()
90 if (IS_ERR(dwc->ulpi)) { in dwc3_ulpi_init()
91 dev_err(dwc->dev, "failed to register ULPI interface"); in dwc3_ulpi_init()
92 return PTR_ERR(dwc->ulpi); in dwc3_ulpi_init()
95 return 0; in dwc3_ulpi_init()
100 if (dwc->ulpi) { in dwc3_ulpi_exit()
101 ulpi_unregister_interface(dwc->ulpi); in dwc3_ulpi_exit()
102 dwc->ulpi = NULL; in dwc3_ulpi_exit()