[U-Boot] [PATCH] ulpi: add generic ULPI functionality

Jana Rapava fermata7 at gmail.com
Sun Nov 6 00:08:47 CET 2011


2011/11/5 Marek Vasut <marek.vasut at gmail.com>

>
> > +int ulpi_wait(struct usb_ehci *ehci, u32 ulpi_value, u32 ulpi_mask)
>
> So this works only with EHCI? How generic is it then ?
>
>
I thought until now that ULPI is EHCI-dependent, but isn't... Ok, what else
should be supported? OHCI? I haven't any hardware to test it, but I could
give it a try.


>
> > +void ulpi_iface_ctrl_flags
> > +     (struct usb_ehci *ehci, struct ulpi_regs *ulpi, int access_mode,
> u32
> > flags) +{
> > +     switch (access_mode) {
> > +     case WRITE:
> > +             ulpi_write(ehci, (u32)&ulpi->iface_ctrl_write, flags);
> > +             break;
> > +     case SET:
> > +             ulpi_write(ehci, (u32)&ulpi->iface_ctrl_set, flags);
> > +             break;
> > +     case CLEAR:
> > +             ulpi_write(ehci, (u32)&ulpi->iface_ctrl_clear, flags);
> > +             break;
> > +     }
> > +
> > +}
>
> Is this crap from linux or something?
>
>
No, Linux has offset-based access to ULPI registers, some structure
otg_transceiver, where the driver sets the bits which it wants to be set in
ULPI registers (if I understand it well) and family of functions, which set
bits according to informations in otg_transceiver.


More information about the U-Boot mailing list