Lines Matching refs:ulpi_vp
35 static int ulpi_wait(struct ulpi_viewport *ulpi_vp, u32 mask) in ulpi_wait() argument
41 if ((readl(ulpi_vp->viewport_addr) & mask) == 0) in ulpi_wait()
55 static int ulpi_wakeup(struct ulpi_viewport *ulpi_vp) in ulpi_wakeup() argument
59 if (readl(ulpi_vp->viewport_addr) & ULPI_SS) in ulpi_wakeup()
62 writel(ULPI_WU, ulpi_vp->viewport_addr); in ulpi_wakeup()
64 err = ulpi_wait(ulpi_vp, ULPI_WU); in ulpi_wakeup()
76 static int ulpi_request(struct ulpi_viewport *ulpi_vp, u32 value) in ulpi_request() argument
80 err = ulpi_wakeup(ulpi_vp); in ulpi_request()
84 writel(value, ulpi_vp->viewport_addr); in ulpi_request()
86 err = ulpi_wait(ulpi_vp, ULPI_RWRUN); in ulpi_request()
93 int ulpi_write(struct ulpi_viewport *ulpi_vp, u8 *reg, u32 value) in ulpi_write() argument
98 val |= (ulpi_vp->port_num & 0x7) << 24; in ulpi_write()
99 return ulpi_request(ulpi_vp, val); in ulpi_write()
102 u32 ulpi_read(struct ulpi_viewport *ulpi_vp, u8 *reg) in ulpi_read() argument
107 val |= (ulpi_vp->port_num & 0x7) << 24; in ulpi_read()
108 err = ulpi_request(ulpi_vp, val); in ulpi_read()
112 return (readl(ulpi_vp->viewport_addr) >> 8) & 0xff; in ulpi_read()