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

Jana Rapava fermata7 at gmail.com
Wed Sep 28 20:12:08 CEST 2011


2011/9/28 Marek Vasut <marek.vasut.n900 at gmail.com>

> > +    if (!timeout)
> > +        return -1;
> > +    else
> > +        return tmp;
> > +}
>
> Won't 'return !timeout;' be enough?
>
> > +    tmp = ulpi_wait(ehci, ULPI_RWRUN);
> +    if (tmp == -1) {
> +        printf("ULPI read timed out\n");
> +        return 0;
> +    }
> +    return ulpi_read_mask(tmp);
> +}

Here in ulpi_read() I need to store and return value which was read in
ulpi_wait(). What is the proper way to do this, If ulpi_wait() should return
!timeout ?


> Also, can you change 'ulpi_bit' to 'ulpi_mask'? That seems more
> appropriate.
>
> Maybe this can be even changed to ulpi_wait(ehci, value_to_be_written,
> bit_to_be_polled), then you won't need those writel()s before every write to
> ulpi anymore.
>

Ok.


> cheers
>


More information about the U-Boot mailing list