From: Felipe Balbi <me@felipebalbi.com>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org, Felipe Balbi <felipe.balbi@nokia.com>,
David Brownell <dbrownell@users.sourceforge.net>
Subject: Re: [PATCH 1/3] musb_hdrc: Set musb_resources dynamically
Date: Thu, 12 Feb 2009 21:28:42 +0200 [thread overview]
Message-ID: <20090212192840.GL10711@frodo> (raw)
In-Reply-To: <20090212191655.19766.8429.stgit@localhost>
On Thu, Feb 12, 2009 at 11:16:55AM -0800, Tony Lindgren wrote:
> The cpu_is_omap34xx() may not be static.
>
> Cc: Felipe Balbi <felipe.balbi@nokia.com>
> Cc: David Brownell <dbrownell@users.sourceforge.net>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
This looks ok
> ---
> arch/arm/mach-omap2/usb-musb.c | 23 +++++++++++++----------
> 1 files changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
> index 5d79f89..897c07d 100644
> --- a/arch/arm/mach-omap2/usb-musb.c
> +++ b/arch/arm/mach-omap2/usb-musb.c
> @@ -35,13 +35,7 @@
>
> #ifdef CONFIG_USB_MUSB_SOC
> static struct resource musb_resources[] = {
> - [0] = {
> - .start = cpu_is_omap34xx()
> - ? OMAP34XX_HSUSB_OTG_BASE
> - : OMAP243X_HS_BASE,
> - .end = cpu_is_omap34xx()
> - ? OMAP34XX_HSUSB_OTG_BASE + SZ_8K - 1
> - : OMAP243X_HS_BASE + SZ_8K - 1,
> + [0] = { /* start and end set dynamically */
> .flags = IORESOURCE_MEM,
> },
> [1] = { /* general IRQ */
> @@ -128,9 +122,7 @@ static struct musb_hdrc_platform_data musb_plat = {
> #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
> .mode = MUSB_PERIPHERAL,
> #endif
> - .clock = cpu_is_omap34xx()
> - ? "hsotgusb_ick"
> - : "usbhs_ick",
> + /* .clock is set dynamically */
> .set_clock = musb_set_clock,
> .config = &musb_config,
>
> @@ -160,6 +152,17 @@ static struct platform_device musb_device = {
> void __init usb_musb_init(void)
> {
> #ifdef CONFIG_USB_MUSB_SOC
> +
> + if (cpu_is_omap243x()) {
> + musb_resources[0].start = OMAP243X_HS_BASE;
> + musb_plat.clock = "usbhs_ick";
> + } else {
> + musb_resources[0].start = OMAP34XX_HSUSB_OTG_BASE;
> + musb_plat.clock = "hsotgusb_ick";
> + }
> +
> + musb_resources[0].end = musb_resources[0].start + SZ_8K - 1;
> +
> if (platform_device_register(&musb_device) < 0) {
> printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
> return;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
balbi
next prev parent reply other threads:[~2009-02-12 19:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-12 19:16 [PATCH 0/3] musb_hdrc: Clean-up init code for mainline merge Tony Lindgren
2009-02-12 19:16 ` [PATCH 1/3] musb_hdrc: Set musb_resources dynamically Tony Lindgren
2009-02-12 19:28 ` Felipe Balbi [this message]
2009-02-12 19:17 ` [PATCH 2/3] musb_hdrc: Clean-up MUSB init code for next merge window Tony Lindgren
2009-02-12 19:30 ` Felipe Balbi
2009-02-12 19:44 ` Tony Lindgren
2009-02-12 19:17 ` [PATCH 3/3] musb_hdrc: Build usb-musb based on config entry, clean-up Makefile Tony Lindgren
2009-02-12 19:31 ` Felipe Balbi
2009-02-12 19:21 ` [PATCH 0/3] musb_hdrc: Clean-up init code for mainline merge Tony Lindgren
2009-02-12 19:35 ` Felipe Balbi
2009-02-13 20:50 ` David Brownell
2009-02-12 20:49 ` David Brownell
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=20090212192840.GL10711@frodo \
--to=me@felipebalbi.com \
--cc=dbrownell@users.sourceforge.net \
--cc=felipe.balbi@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
/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