From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 27 Sep 2011 22:50:13 +0200 Subject: [U-Boot] [PATCH v6 4/4] Add USB support for Efika In-Reply-To: References: <201109272147.14128.marek.vasut@gmail.com> Message-ID: <201109272250.13148.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday, September 27, 2011 10:40:26 PM Jana Rapava wrote: > 2011/9/27 Marek Vasut > > > > diff --git a/board/efikamx/efika.h b/board/efikamx/efika.h > > > new file mode 100644 > > > index 0000000..2134e75 > > > --- /dev/null > > > +++ b/board/efikamx/efika.h > > > @@ -0,0 +1,8 @@ > > > > Proper header is missing here, with license, author etc. > > What should I write into copyright field, if I copied your code into this > header file? You're introducing your file here, it's your stuff. > > > > +void ulpi_write(struct usb_ehci *ehci, u32 reg, u32 value) > > > +{ > > > + if (!(readl(&ehci->ulpi_viewpoint) & ULPI_SS)) { > > > + writel(ULPI_WU, &ehci->ulpi_viewpoint); > > > + ulpi_wait(ehci, ULPI_WU, "wakeup"); > > > > This function returns some value, but you're not checking it. It's > > probably if > > the wait timed out, right ? Why aren't you checking it ? > > I''ll check it, but I don't know what function calling ulpi_write/read/wait > should do if call fails. Should it write error message and return, should > it write message and return error value...? Return error value until you reach ulpi_{read/write}, write error message there ?