On Thursday, September 29, 2011 01:52:51 AM Jana Rapava wrote: > This commit adds USB support for EfikaMX and EfikaSB. > > Signed-off-by: Jana Rapava <ferma...@gmail.com> > Signed-off-by: Marek Vasut <marek.va...@gmail.com> > Cc: Remy Bohmer <li...@bohmer.net> > Cc: Stefano Babic <sba...@denx.de> > --- > board/efikamx/Makefile | 3 + > board/efikamx/efika.h | 30 +++ > board/efikamx/efikamx-usb.c | 420 > +++++++++++++++++++++++++++++++++++++++++++ board/efikamx/efikamx.c | > 3 + > include/configs/efikamx.h | 16 ++ > 5 files changed, 472 insertions(+), 0 deletions(-) > create mode 100644 board/efikamx/efika.h > create mode 100644 board/efikamx/efikamx-usb.c
[...] > > + > +int ulpi_wakeup(struct usb_ehci *ehci) > +{ > + if (readl(&ehci->ulpi_viewpoint) & ULPI_SS) > + return 0; /* already awake */ > + return ulpi_wait(ehci, ULPI_WU, ULPI_WU); > +} > + > +void ulpi_write(struct usb_ehci *ehci, u32 reg, u32 value) > +{ > + if (ulpi_wakeup(ehci)) { > + printf("ULPI wakeup timed out\n"); > + return; > + } > + > + if (ulpi_wait(ehci, ULPI_RWRUN | ULPI_RWCTRL | > + reg << ULPI_ADDR_SHIFT | ulpi_write_mask(value), ULPI_RWRUN)) > + printf("ULPI write timed out\n"); Please use temp. variable here and fix indent. > +} > + > +u32 ulpi_read(struct usb_ehci *ehci, u32 reg) > +{ > + if (ulpi_wakeup(ehci)) { > + printf("ULPI wakeup timed out\n"); > + return 0; > + } > + > + if (ulpi_wait(ehci, ULPI_RWRUN | reg << ULPI_ADDR_SHIFT, ULPI_RWRUN)) { > + printf("ULPI read timed out\n"); > + return 0; > + } Newline > + return ulpi_read_mask(readl(&ehci->ulpi_viewpoint)); > +} _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot