All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Igor Grinberg <grinberg@compulab.co.il>
Cc: linux-omap@vger.kernel.org
Subject: Re: Help wanted with USB and OMAP3 off_mode
Date: Wed, 9 Jan 2013 21:19:31 +1100	[thread overview]
Message-ID: <20130109211931.0e00db5d@notabene.brown> (raw)
In-Reply-To: <50ED3FA5.9030905@compulab.co.il>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 09 Jan 2013 12:00:05 +0200 Igor Grinberg <grinberg@compulab.co.il>
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 :-(

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.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.17 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iQIcBAEBAgAGBQJQ7T+kAAoJEBDE8YO64Efaj8YQAI5nOE9vvf8wxbu5IXTxaMxn
> 6B+g2m/zkMlyVNL5hTrwkPkP4CTBwvsGCZYkZT5JS3KM+R+TuyIX07+eM59Ie0Po
> u1CCn2XKZY2CP53b3nAtgk9Phxwruf5fDjEu9QiQapdUpbiTWmIn8W3CVye241O2
> wXBKAXszX1bD81NFNY+Jm5Us5uGHNTtNtqe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rn+4VaYndS9S9w5IXTii5b1OcuhJaZ
aGS+Tm/Mwa1uNQWBjujc/DdvwKZRrRilHTBH4w/rHRwxNTqKAxWmq72162efpxdR
JxkHrPTEZZZwLewPXmTbD1+h50284apAw+D2PERFiB+Fh4ZVzsLIcBcUIZ3OT4L1
AlrqYC0wAS2RgjhvmveR360i8DS1SXMMafonrLhrwRu7oe1uzltKmnNX21Sp76vB
gM5LIokwosA=
=8VnD
-----END PGP SIGNATURE-----

  reply	other threads:[~2013-01-09 10:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-08 22:29 Help wanted with USB and OMAP3 off_mode NeilBrown
2013-01-09 10:00 ` Igor Grinberg
2013-01-09 10:19   ` NeilBrown [this message]
2013-01-09 10:24     ` Michael Trimarchi
2013-01-09 11:34       ` NeilBrown
2013-01-09 11:42         ` Michael Trimarchi
2013-01-16  7:28           ` NeilBrown
2013-01-09 12:08         ` Michael Trimarchi
2013-01-09 12:54           ` Igor Grinberg
2013-01-16  7:26             ` NeilBrown
2013-01-16  9:28               ` Igor Grinberg
2013-01-16 10:19                 ` NeilBrown
2013-01-16 11:11                   ` Igor Grinberg
2013-01-17  0:22                     ` NeilBrown
2013-01-17  9:24                       ` NeilBrown
2013-01-16 10:00 ` Roger Quadros
2013-01-16 10:27   ` NeilBrown
2013-01-16 10:57     ` Roger Quadros
2013-01-17 11:01       ` NeilBrown
2013-01-17 11:29         ` Roger Quadros
2013-01-17 21:08           ` NeilBrown

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=20130109211931.0e00db5d@notabene.brown \
    --to=neilb@suse.de \
    --cc=grinberg@compulab.co.il \
    --cc=linux-omap@vger.kernel.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.