From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 24 Jun 2013 16:16:23 -0400 Subject: [U-Boot] [RFC] [UBOOT] [PATCH v2 2/4] USB: Adapt the usb-compat.h to uboot and fix compiler errors In-Reply-To: <1372092235-15163-3-git-send-email-dmurphy@ti.com> References: <1372092235-15163-1-git-send-email-dmurphy@ti.com> <1372092235-15163-3-git-send-email-dmurphy@ti.com> Message-ID: <20130624201623.GL16983@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Jun 24, 2013 at 11:43:53AM -0500, Dan Murphy wrote: > Adapt the usb-compat.h to uBoot. > > Use #ifndef __UBOOT__ for code that is not applicable to uBoot. > Use #ifdef __UBOOT__ to add code that is uBoot specific. > > Create linux-compat.h - Linux kernel compatibility definitions that do not > exist in the uBoot. Moved the compatibility definitions from lin_gadget_compat.h > to this file as well. > > Create usb-mod-devicetable.h - Is a partial back port of mod_devicetable.h in the linux > kernel only taking the portion needed for USB > > Already existing header files were modified to pick up the new header files. [snip] > +++ b/include/linux/usb/linux-compat.h [snip] > +#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) This is already in > diff --git a/include/linux/usb/usb-compat.h b/include/linux/usb/usb-compat.h > index a0bee5a..a46d1e6 100644 > --- a/include/linux/usb/usb-compat.h > +++ b/include/linux/usb/usb-compat.h [snip] > @@ -1770,10 +1903,16 @@ usb_maxpacket(struct usb_device *udev, int pipe, int is_out) > unsigned epnum = usb_pipeendpoint(pipe); > > if (is_out) { > +#ifndef __UBOOT__ > + /* Fix this warning */ > WARN_ON(usb_pipein(pipe)); > +#endif > ep = udev->ep_out[epnum]; > } else { > +#ifndef __UBOOT__ > + /* Fix this warning */ > WARN_ON(usb_pipeout(pipe)); > +#endif Are these warnings that aren't applicable to us, or things that need to be fixed as part of the series, eventually? But, in general, as this is the approach I suggested, I'm fine with it. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: