[U-Boot] [PATCH v4 4/4] Add USB support for Efika

Marek Vasut marek.vasut at gmail.com
Mon Sep 26 22:42:06 CEST 2011


On Monday, September 26, 2011 10:28:17 PM Jana Rapava wrote:
> > > +     while (--timeout) {
> > > +             tmp = readl(&ehci->ulpi_viewpoint);
> > > +             if (!(tmp & ulpi_bit))
> > > +                     break;
> > > +             WATCHDOG_RESET();
> > > +     }
> > > +     if (!timeout) {
> > > +             printf("ULPI %s timed out\n", operation);
> > > +             return 0;
> > > +     }
> > > +     return tmp;
> > > +}
> > > +
> > > +void ulpi_write(u8 *reg, u32 value, struct usb_ehci *ehci)
> > 
> > ulpi_write(ehci, reg, value), please fix globally and in similar
> > functions.
> > 
> > Also, change u8 *reg to u8 reg, why are you passing a pointer?
> 
> Is it really important in ulpi_read/write function to use u8 reg instead of
> u8 *reg?

Yes

> When I rewrite this, usb reset starts giving me ULPI operations timeout,
> and I couldn't find a source of that.
> The problem is in the middle of usb_new_device, but it looks like no
> function calling ULPI operations is called from that function.

No idea, verify what you're passing to the functions.

Cheers
> 
> Regards,
> Jana Rapava


More information about the U-Boot mailing list