linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavan Kondeti <pkondeti@codeaurora.org>
To: balbi@ti.com
Cc: linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [RFC 5/5] USB: Eliminate delays involved in root hub initialization during HNP
Date: Thu, 16 Dec 2010 18:23:11 +0530	[thread overview]
Message-ID: <4D0A0BB7.8070903@codeaurora.org> (raw)
In-Reply-To: <20101216121547.GA6652@legolas.emea.dhcp.ti.com>

On 12/16/2010 5:45 PM, Felipe Balbi wrote:
> On Thu, Dec 16, 2010 at 04:56:15PM +0530, Pavan Kondeti wrote:
>> On 12/15/2010 5:51 PM, Felipe Balbi wrote:
>>> On Wed, Dec 15, 2010 at 04:44:14PM +0530, Pavankumar Kondeti wrote:
>>>> Some USB controllers have common resources (IRQ, register address
>>>> space) for Host, Peripheral and OTG.  So HCD is added only before
>>>> entering into Host mode.  Root hub initialization is done in
>>>> different steps to decrease boot up time.  But this makes B-device
>>>> difficult to meet HNP timings.  Hence eliminate delays involved in
>>>> root hub initialization for B-host.
>>>
>>> I wonder if this is the best approach. Would it be easier to not touch
>>> usbcore, probe the entire stack during boot but have a "core" layer
>>> handling synchronization to shared resources ?
>>>
>> The implementation is like this:
>>
>> Actually OTG synchronizes UDC and HCD. OTG driver probe will be called
>> first and it takes care of turning on clocks, resetting controller and
>> PHY and enabling interrupts (VBUS and Id). UDC and HCD will not modify
>> hardware registers in their probe functions. So HCD will not call
>> usb_add_hcd() function in it's probe(). After HCD and UDC registers with
>> OTG via otg_set_xxx(), OTG activates HCD (by calling usb_add_hcd()) or
>> UDC (usb_gadget_connect()) based on Id/VBUS status. When gadget is
>> active, HCD is detached from USB core (usb_remove_hcd()). So user space
>> can not poke into sysfs/debugfs nodes provided in the usb core.
>>
>>> Maybe you could make your device an MFD device that allocates
>>> platform_devices for its children (HCI, UDC, OTG, etc) and pass in a
>>> bunch of read/write functions as platform_data for them to use as
>>> accessors to shared register space ?!? Would that work ?
>>>
>> The easy way to deal this problem is removing HCD when Mini/Micro -A
>> cable is detached.
> 
> But why do you need to do that isn't clear. What's the problem in
> keeping HCD always available ? If it's a mini/micro-B cable you will
> enter peripheral role anyway.
> 
If you keep the HCD, root hub auto/system suspend can happen, user may
un-configure the root hub or remove the HCD etc. There is not standard
way of guarding against PM & user for this kind of HCD.

We had a discussion about this some time back.

Please see http://www.spinics.net/lists/linux-usb/msg35847.html

Thanks,
Pavan

-- 
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  reply	other threads:[~2010-12-16 12:53 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15 11:14 [RFC 0/5] USB core changes for supporting OTG on MSM SoC Pavankumar Kondeti
2010-12-15 11:14 ` [RFC 1/5] USB: core: Add input prompt and help text for USB_OTG config Pavankumar Kondeti
2010-12-15 12:35   ` Sergei Shtylyov
2010-12-15 21:52   ` Greg KH
2010-12-16  8:53     ` Pavan Kondeti
2010-12-15 11:14 ` [RFC 2/5] USB: core: OTG Supplement Revision 2.0 updates Pavankumar Kondeti
2010-12-15 12:16   ` Felipe Balbi
2010-12-15 21:39     ` Alan Stern
2010-12-16  8:10       ` Felipe Balbi
2010-12-16  8:54     ` Pavan Kondeti
2010-12-16  9:11       ` Felipe Balbi
2010-12-15 21:29   ` Alan Stern
2010-12-16  8:54     ` Pavan Kondeti
2010-12-15 21:53   ` Greg KH
2010-12-16  8:54     ` Pavan Kondeti
2010-12-15 11:14 ` [RFC 3/5] USB: gadget: OTG supplement revision " Pavankumar Kondeti
2010-12-15 12:18   ` Felipe Balbi
2010-12-16  8:54     ` Pavan Kondeti
2010-12-15 11:14 ` [RFC 4/5] USB: EHCI: Notify HCD about HNP enabled port suspend Pavankumar Kondeti
2010-12-15 12:19   ` Felipe Balbi
2010-12-16  8:54     ` Pavan Kondeti
2010-12-15 11:14 ` [RFC 5/5] USB: Eliminate delays involved in root hub initialization during HNP Pavankumar Kondeti
2010-12-15 12:21   ` Felipe Balbi
2010-12-16 11:26     ` Pavan Kondeti
2010-12-16 12:15       ` Felipe Balbi
2010-12-16 12:53         ` Pavan Kondeti [this message]
2010-12-15 21:52   ` Greg KH
2010-12-15 21:38 ` [RFC 0/5] USB core changes for supporting OTG on MSM SoC Alan Stern
2010-12-16  8:55   ` Pavan Kondeti

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=4D0A0BB7.8070903@codeaurora.org \
    --to=pkondeti@codeaurora.org \
    --cc=balbi@ti.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-usb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).