From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] [UBOOT] [PATCH v2 2/4] USB: Adapt the usb-compat.h to uboot and fix compiler errors
Date: Mon, 24 Jun 2013 16:16:23 -0400 [thread overview]
Message-ID: <20130624201623.GL16983@bill-the-cat> (raw)
In-Reply-To: <1372092235-15163-3-git-send-email-dmurphy@ti.com>
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 <common.h>
> 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: <http://lists.denx.de/pipermail/u-boot/attachments/20130624/bd50b46e/attachment.pgp>
next prev parent reply other threads:[~2013-06-24 20:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 16:43 [U-Boot] [RFC] [UBOOT] [PATCH v2 0/4] DWC back port from Linux kernel Dan Murphy
2013-06-24 16:43 ` [U-Boot] [RFC] [UBOOT] [PATCH v2 1/4] USB: Backport kernel usb header file Dan Murphy
2013-06-24 16:43 ` [U-Boot] [RFC] [UBOOT] [PATCH v2 2/4] USB: Adapt the usb-compat.h to uboot and fix compiler errors Dan Murphy
2013-06-24 20:16 ` Tom Rini [this message]
2013-07-01 10:56 ` Marek Vasut
2013-06-24 16:43 ` [U-Boot] [RFC] [UBOOT] [PATCH v2 3/4] USB: dwc3: Initial back port of dwc3 code Dan Murphy
2013-06-25 11:19 ` Roger Quadros
2013-06-24 16:43 ` [U-Boot] [RFC] [UBOOT] [PATCH v2 4/4] omap5: usb: Add usb otg clocks and enable Dan Murphy
2013-07-01 11:04 ` [U-Boot] [RFC] [UBOOT] [PATCH v2 0/4] DWC back port from Linux kernel Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130624201623.GL16983@bill-the-cat \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox