2011/9/28 Marek Vasut <marek.vasut.n...@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 >
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot