Lines Matching refs:dwc
24 static int dwc3_ulpi_busyloop(struct dwc3 *dwc, u8 addr, bool read) in dwc3_ulpi_busyloop() argument
36 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); in dwc3_ulpi_busyloop()
42 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYACC(0)); in dwc3_ulpi_busyloop()
53 struct dwc3 *dwc = dev_get_drvdata(dev); in dwc3_ulpi_read() local
58 dwc3_writel(dwc->regs, DWC3_GUSB2PHYACC(0), reg); in dwc3_ulpi_read()
60 ret = dwc3_ulpi_busyloop(dwc, addr, true); in dwc3_ulpi_read()
64 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYACC(0)); in dwc3_ulpi_read()
71 struct dwc3 *dwc = dev_get_drvdata(dev); in dwc3_ulpi_write() local
76 dwc3_writel(dwc->regs, DWC3_GUSB2PHYACC(0), reg); in dwc3_ulpi_write()
78 return dwc3_ulpi_busyloop(dwc, addr, false); in dwc3_ulpi_write()
86 int dwc3_ulpi_init(struct dwc3 *dwc) in dwc3_ulpi_init() argument
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()
98 void dwc3_ulpi_exit(struct dwc3 *dwc) in dwc3_ulpi_exit() argument
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()