All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hema Kalliguddi <hemahk-l0cyMroinI0@public.gmane.org>
To: Kevin Hilman <khilman-l0cyMroinI0@public.gmane.org>
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
	Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	Benoit Cousson <b-cousson-l0cyMroinI0@public.gmane.org>,
	Paul Walmsley <paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>,
	Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>,
	Partha Basak <p-basak2-l0cyMroinI0@public.gmane.org>
Subject: RE: [PATCH 4/5 v6] OMAP2+: musb: HWMOD adaptation for musb. registration
Date: Tue, 15 Feb 2011 12:00:43 +0530	[thread overview]
Message-ID: <d833dfc47fcd0315bbb5978826aa7c20@mail.gmail.com> (raw)
In-Reply-To: <87vd0mw3u9.fsf-l0cyMroinI0@public.gmane.org>

Kevin,

>-----Original Message-----
>From: Kevin Hilman [mailto:khilman-l0cyMroinI0@public.gmane.org]
>Sent: Tuesday, February 15, 2011 5:45 AM
>To: Hema HK
>Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org;
>Felipe Balbi; Tony Lindgren; Cousson, Benoit; Paul Walmsley
>Subject: Re: [PATCH 4/5 v6] OMAP2+: musb: HWMOD adaptation for
>musb. registration
>
>Hema HK <hemahk-l0cyMroinI0@public.gmane.org> writes:
>
>> Using omap_device_build API instead of platform_device_register for
>> OMAP2430,OMAP34xx and OMAP4430 musb device registration.
>> The device specific resources defined in centralized
>> database will be used.
>
>Except for AM35x.
>
>NACK, for same reasons as previous version of this patch.
>
AM35x boot is already broken with existing HWmod changes done for V2.6.38
release.
I think Ajay's team is debugging this issue.
Since there is no separate CHIP revision for AM35x compared to OMAP3430
today,
there will be conflict to add OMAP3 usbotg and AM35x usbotg together.

I think we should go for OMAP3 HWmod independent of the AM35x.
If required we should have 2 separate platform file as there is very less
shared code in usb-musb.c file between the OMAP2+ and AM35x.

Ajay/Felipe,

Any comments on this?

Regards,
Hema

>Kevin
>
>> Signed-off-by: Hema HK <hemahk-l0cyMroinI0@public.gmane.org>
>> Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
>> Cc: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
>> Cc: Kevin Hilman <khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
>> Cc: Cousson, Benoit <b-cousson-l0cyMroinI0@public.gmane.org>
>> Cc: Paul Walmsley <paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>
>> ---
>>  arch/arm/mach-omap2/usb-musb.c |   76
>+++++++++++++++++++++++++++++------------
>>  1 file changed, 55 insertions(+), 21 deletions(-)
>>
>> Index: linux-2.6/arch/arm/mach-omap2/usb-musb.c
>> ===================================================================
>> --- linux-2.6.orig/arch/arm/mach-omap2/usb-musb.c
>> +++ linux-2.6/arch/arm/mach-omap2/usb-musb.c
>> @@ -31,9 +31,12 @@
>>  #include <mach/am35xx.h>
>>  #include <plat/usb.h>
>>  #include "control.h"
>> +#include <plat/omap_device.h>
>>
>>  #if defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined
>(CONFIG_USB_MUSB_AM35X)
>>
>> +static const char name[] = "musb-omap2430";
>> +
>>  static void am35x_musb_reset(void)
>>  {
>>  	u32	regval;
>> @@ -170,7 +173,7 @@ static struct musb_hdrc_platform_data mu
>>  static u64 musb_dmamask = DMA_BIT_MASK(32);
>>
>>  static struct platform_device musb_device = {
>> -	.name		= "musb-omap2430",
>> +	.name		= "musb-am35x",
>>  	.id		= -1,
>>  	.dev = {
>>  		.dma_mask		= &musb_dmamask,
>> @@ -181,26 +184,23 @@ static struct platform_device musb_devic
>>  	.resource	= musb_resources,
>>  };
>>
>> +static struct omap_device_pm_latency omap_musb_latency[] = {
>> +	{
>> +		.deactivate_func = omap_device_idle_hwmods,
>> +		.activate_func   = omap_device_enable_hwmods,
>> +		.flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
>> +	},
>> +};
>> +
>>  void __init usb_musb_init(struct omap_musb_board_data *board_data)
>>  {
>> -	if (cpu_is_omap243x()) {
>> -		musb_resources[0].start = OMAP243X_HS_BASE;
>> -	} else if (cpu_is_omap3517() || cpu_is_omap3505()) {
>> -		musb_device.name = "musb-am35x";
>> -		musb_resources[0].start = AM35XX_IPSS_USBOTGSS_BASE;
>> -		musb_resources[1].start = INT_35XX_USBOTG_IRQ;
>> -		board_data->set_phy_power = am35x_musb_phy_power;
>> -		board_data->clear_irq = am35x_musb_clear_irq;
>> -		board_data->set_mode = am35x_musb_set_mode;
>> -		board_data->reset = am35x_musb_reset;
>> -	} else if (cpu_is_omap34xx()) {
>> -		musb_resources[0].start = OMAP34XX_HSUSB_OTG_BASE;
>> -	} else if (cpu_is_omap44xx()) {
>> -		musb_resources[0].start = OMAP44XX_HSUSB_OTG_BASE;
>> -		musb_resources[1].start = OMAP44XX_IRQ_HS_USB_MC_N;
>> -		musb_resources[2].start = OMAP44XX_IRQ_HS_USB_DMA_N;
>> -	}
>> -	musb_resources[0].end = musb_resources[0].start + SZ_4K - 1;
>> +	struct omap_hwmod *oh;
>> +	struct omap_device *od;
>> +	struct platform_device *pdev;
>> +	struct device	*dev;
>> +	int bus_id = -1;
>> +	const char *oh_name = "usb_otg_hs";
>> +	struct musb_hdrc_platform_data *pdata;
>>
>>  	/*
>>  	 * REVISIT: This line can be removed once all the
>platforms using
>> @@ -212,8 +212,42 @@ void __init usb_musb_init(struct omap_mu
>>  	musb_plat.mode = board_data->mode;
>>  	musb_plat.extvbus = board_data->extvbus;
>>
>> -	if (platform_device_register(&musb_device) < 0)
>> -		printk(KERN_ERR "Unable to register HS-USB
>(MUSB) device\n");
>> +	if (cpu_is_omap3517() || cpu_is_omap3505()) {
>> +		musb_resources[0].start = AM35XX_IPSS_USBOTGSS_BASE;
>> +		musb_resources[1].start = INT_35XX_USBOTG_IRQ;
>> +		board_data->set_phy_power = am35x_musb_phy_power;
>> +		board_data->clear_irq = am35x_musb_clear_irq;
>> +		board_data->set_mode = am35x_musb_set_mode;
>> +		board_data->reset = am35x_musb_reset;
>> +		musb_resources[0].end = musb_resources[0].start
>+ SZ_4K - 1;
>> +
>> +		if (platform_device_register(&musb_device) < 0)
>> +			printk(KERN_ERR "Unable to register HS-USB \
>> +					(MUSB) device\n");
>> +	} else {
>> +		oh = omap_hwmod_lookup(oh_name);
>> +		if (!oh) {
>> +			pr_err("Could not look up %s\n", oh_name);
>> +			return;
>> +		}
>> +
>> +		pdata = &musb_plat;
>> +		od = omap_device_build(name, bus_id, oh, pdata,
>> +				       sizeof(*pdata),
>omap_musb_latency,
>> +				
>ARRAY_SIZE(omap_musb_latency), false);
>> +		if (IS_ERR(od)) {
>> +			pr_err("Could not build omap_device for
>%s %s\n",
>> +							name, oh_name);
>> +			return;
>> +		}
>> +
>> +		pdev = &od->pdev;
>> +		dev = &pdev->dev;
>> +		get_device(dev);
>> +		dev->dma_mask = &musb_dmamask;
>> +		dev->coherent_dma_mask = musb_dmamask;
>> +		put_device(dev);
>> +	}
>>  }
>>
>>  #else
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>linux-omap" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-02-15  6:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-10 14:07 Subject: [PATCH 0/5 v6]usb: musb: hwmod and runtime pm support for musb Hema HK
2011-02-10 14:07 ` [PATCH 2/5 v6] OMAP3xxx: hwmod data: Add USBOTG Hema HK
2011-02-10 14:07 ` [PATCH 3/5 v6] OMAP4430: hwmod data: Adding USBOTG Hema HK
     [not found] ` <1297346881-13438-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2011-02-10 14:07   ` [PATCH 1/5 v6] OMAP2430: hwmod data: Add USBOTG Hema HK
2011-02-10 14:08   ` [PATCH 4/5 v6] OMAP2+: musb: HWMOD adaptation for musb. registration Hema HK
     [not found]     ` <1297346881-13438-5-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2011-02-15  0:15       ` Kevin Hilman
     [not found]         ` <87vd0mw3u9.fsf-l0cyMroinI0@public.gmane.org>
2011-02-15  6:30           ` Hema Kalliguddi [this message]
2011-02-15  8:32         ` Felipe Balbi
2011-02-15 16:12           ` Kevin Hilman
     [not found]             ` <87r5b9uvj8.fsf-l0cyMroinI0@public.gmane.org>
2011-02-16 10:57               ` Hema Kalliguddi
2011-02-10 14:08   ` [PATCH 5/5 v6] usb: musb: Using runtime pm APIs for musb Hema HK
2011-02-10 14:26     ` Felipe Balbi
2011-02-10 16:39       ` Hema Kalliguddi
2011-02-15  0:42         ` Kevin Hilman
     [not found]           ` <87oc6ew2lh.fsf-l0cyMroinI0@public.gmane.org>
2011-02-15  4:01             ` Kalliguddi, Hema

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=d833dfc47fcd0315bbb5978826aa7c20@mail.gmail.com \
    --to=hemahk-l0cymroini0@public.gmane.org \
    --cc=ajay.gupta-l0cyMroinI0@public.gmane.org \
    --cc=b-cousson-l0cyMroinI0@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=khilman-l0cyMroinI0@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=p-basak2-l0cyMroinI0@public.gmane.org \
    --cc=paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.