Re: [PATCH 3/4] MXC: Add support for ULPI Viewports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +static int ulpi_poll(void __iomem *view, u32 bit)
> +{
> +       uint32_t data;
> +       int timeout = 10000;
> +
> +       data = __raw_readl(view);
> +       while (data & bit) {
> +               if (!timeout--) {
> +                       printk(KERN_WARNING
> +                               "timeout polling for ULPI device\n");
> +                       return -ETIMEDOUT;
> +               }
> +
> +               udelay(10);
> +               data = __raw_readl(view);
> +       }
> +
> +       return (data >> ULPIVW_RDATA_SHIFT) & ULPIVW_RDATA_MASK;
> +}
> +

Hi Daniel, I have seen couple of code snippets  using the same method
of timing out in 10000 iterations for ulpi polling;
is it specified in ulpi spec, or controller spec to use this method?
How do you say 10000 iterations are sufficient?
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux