RE: [PATCH V2 6/8] usb: musb: Offmode fix for idle path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 

>-----Original Message-----
>From: Sergei Shtylyov [mailto:sshtylyov@xxxxxxxxxx] 
>Sent: Tuesday, August 10, 2010 4:50 PM
>To: Kalliguddi, Hema
>Cc: Sergei Shtylyov; linux-usb@xxxxxxxxxxxxxxx; 
>linux-omap@xxxxxxxxxxxxxxx; Mankad, Maulik Ojas; Felipe Balbi; 
>Tony Lindgren; Kevin Hilman
>Subject: Re: [PATCH V2 6/8] usb: musb: Offmode fix for idle path
>
>Hello.
>
>Kalliguddi, Hema wrote:
>
>>>> With OMAP core-off support musb was not functional as 
>context was getting
>>>> lost after wakeup from core-off. And also musb was 
>blocking the core-off 
>>>> after loading the gadget driver even with no cable 
>connected sometimes.
>
>>>> Added the conext save/restore api in the platform layer which will
>>>> be called in the idle and wakeup path.
>>>> Changed the usb sysconfig settings as per the usbotg 
>functional spec.
>>>> When the device is not active, configure to force idle and 
>force standby mode.
>>>> When it is being used, configure in smart standby and 
>smart idle mode.
>>>> So while attempting to coreoff the usb is configured to 
>force standby and 
>>>> force idle mode, after wakeup configured in smart idle and 
>smart standby.
>
>>>> Signed-off-by: Hema HK <hemahk@xxxxxx>
>>>> Signed-off-by: Maulik Mankad <x0082077@xxxxxx>
>>>> Cc: Felipe Balbi <felipe.balbi@xxxxxxxxx>
>>>> Cc: Tony Lindgren <tony@xxxxxxxxxxx>
>>>> Cc: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>
>
>>> [...]
>
>>>> Index: linux-omap-pm/drivers/usb/musb/musb_core.c
>>>> ===================================================================
>>>> --- linux-omap-pm.orig/drivers/usb/musb/musb_core.c	
>>> 2010-08-06 09:24:21.069863329 -0400
>>>> +++ linux-omap-pm/drivers/usb/musb/musb_core.c	
>>> 2010-08-06 10:44:06.369863527 -0400
>>>> @@ -2427,11 +2427,6 @@
>>>>  	}
>>>>  
>>>>  	musb_save_context(musb);
>>>> -
>>>> -	if (musb->set_clock)
>>>> -		musb->set_clock(musb->clock, 0);
>>>> -	else
>>>> -		clk_disable(musb->clock);
>>>>  	spin_unlock_irqrestore(&musb->lock, flags);
>>>>  	return 0;
>>>>  }
>>>> @@ -2443,12 +2438,6 @@
>>>>  
>>>>  	if (!musb->clock)
>>>>  		return 0;
>>>> -
>>>> -	if (musb->set_clock)
>>>> -		musb->set_clock(musb->clock, 1);
>>>> -	else
>>>> -		clk_enable(musb->clock);
>>>> -
>>>>  	musb_restore_context(musb);
>
>>>   The same question again: are you sure that clocks are 
>auto-gated on 
>>> non-OMAP platfroms?
>
>> Bon Lui confirmed that there is no clock for blackfin.
>
>    What about DaVinci (and the coming DA8xx)?
>

I checked with Ajay, it is not auto gated for for Davinci so I can't just remove this.

I am thinking of adding a member variable(clk_autogated) in them usb_hdrc_platform_data structure and 
check this in the musb_suspend() And musb_resume() APIs. Do you see any problem with it?

Regards,
Hema



>WBR, Sergei
>
>--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux