Re: Help wanted with USB and OMAP3 off_mode

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

 



Hi Neil

On 01/09/2013 11:19 AM, NeilBrown wrote:
> On Wed, 09 Jan 2013 12:00:05 +0200 Igor Grinberg <grinberg@xxxxxxxxxxxxxx>
> wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
> 
>> Hi Neil,
> 
>> On 01/09/13 00:29, NeilBrown wrote:
>>>
>>> Hi,
>>>  I'm trying to get off_mode working reliably on my gta04 mobile phone.
>>>
>>> My current stumbling block is USB.  The "Option" GSM module is attached via
>>> USB (there is a separate transceiver chip attached to port 1 which is placed
>>> in OMAP_EHCI_PORT_MODE_PHY).
> 
>> Which PHY is this (vendor/model)?
> 
> Hi Igor,
>   it is the SMSC USB3322
> 
> http://www.smsc.com/media/Downloads_Public/Data_Sheets/3320.pdf
> 
> 
> BTW I subsequently discovered that keeping USBHOST out off off_mode only
> sometimes avoid the problem, not always.  So there are probably multiple
> issues :-(

Are you sure that you don't have glitch on power, reset pin during suspend?

Michael

> 
> NeilBrown
> 
> 
> 
> 
>>>
>>> After a suspend/resume cycle with off_mode enabled the GSM module disappears.
>>> i.e. 'lsusb' doesn't see it any more and the various ttyHSxx devices don't
>>> exist.
>>> Without off mode, the modem always appears after resume.
>>>
>>> I discovered that the registers set by:
>>>
>>>    drivers/mfd/omap-usb-host.c
>>>
>>> are not maintained across as suspend/resume so I added the following patch
>>> (which I can make a formal submission of if it looks right to others), but
>>> that didn't help (or didn't help enough).
>>>
>>> If I
>>>
>>>   echo 1 > /sys/kernel/debug/pm_debug/usbhost_pwrdm/suspend
>>>
>>> thus keeping just the USBHOST power domain out of off_mode, the GSM module
>>> doesn't disappear.  So it seems that some context in the usbhost domain is
>>> not being save and restored.
>>>
>>> This is as far as I can get.  Can someone suggest where I should look to find
>>> out what is not being saved/restored properly, and how to go about saving and
>>> restoring?
>>>
>>> Thanks in advance,
>>> NeilBrown
>>>
>>>
>>>
>>> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
>>> index 23cec57..522405e 100644
>>> --- a/drivers/mfd/omap-usb-host.c
>>> +++ b/drivers/mfd/omap-usb-host.c
>>> @@ -100,6 +100,10 @@ struct usbhs_hcd_omap {
>>>  
>>>  	void __iomem			*uhh_base;
>>>  
>>> +	struct {
>>> +		unsigned		hostconfig;
>>> +	} context;
>>> +
>>>  	struct usbhs_omap_platform_data	platdata;
>>>  
>>>  	u32				usbhs_rev;
>>> @@ -300,6 +304,10 @@ static int usbhs_runtime_resume(struct device *dev)
>>>  	clk_enable(omap->utmi_p1_fck);
>>>  	clk_enable(omap->utmi_p2_fck);
>>>  
>>> +	usbhs_write(omap->uhh_base,
>>> +		    OMAP_UHH_HOSTCONFIG,
>>> +		    omap->context.hostconfig);
>>> +
>>>  	spin_unlock_irqrestore(&omap->lock, flags);
>>>  
>>>  	return 0;
>>> @@ -319,6 +327,8 @@ static int usbhs_runtime_suspend(struct device *dev)
>>>  	}
>>>  
>>>  	spin_lock_irqsave(&omap->lock, flags);
>>> +	omap->context.hostconfig = usbhs_read(omap->uhh_base,
>>> +					      OMAP_UHH_HOSTCONFIG);
>>>  
>>>  	if (is_ehci_tll_mode(pdata->port_mode[0]))
>>>  		clk_disable(omap->usbhost_p1_fck);
> 
>> - -- 
>> Regards,
>> Igor.
>> 

> N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·¥Š{±¢f©Š{ayºʇڙë,j­¢f£¢·hš‹àz¹®w¥¢¸¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝ¢j"?ú!tml=
> 
--
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