/* returns 0 on mask match, ULPI_ERROR on time out.  */
static int ulpi_wait(struct ulpi_viewport *ulpi_vp, u32 mask)
/* returns 0 on mask match, ULPI_ERROR on time out.  */
static int ulpi_wait(struct ulpi_viewport *ulpi_vp, u32 mask)
{
	int timeout = CONFIG_USB_ULPI_TIMEOUT;
	while (--timeout) {
		if ((readl(ulpi_vp->viewport_addr) & mask) == 0)
			return 0;
		udelay(1);
	}
	return ULPI_ERROR;
}