[ELDK] Linux DWC OTG Driver - Host mode

Wolfgang Denk wd at denx.de
Tue Mar 30 09:23:03 CEST 2010


Dear Mark Malopy,

please do not top post / full qote. Please read
http://www.netmeister.org/news/learn2quote.html

In message <FFB4D2C9F87A7F49B23EE109E6F0A7E1010D07FF00 at VMBX124.ihostexchange.net> you wrote:
> 
> Just a clarification, I am on a platform that is based off on Kilauea
> - not the Kilauea platform itself. As such, I need to build and
> modify the Kernel and device tree for our specific hardware features
> and cannot use the link you provided.

You probably have a Kilauea board around and can use this for
reference and initial testing.

> However, upgrading to kernel based on 2.6.32 source is proving
> somewhat difficult as it locks up while loading the Device Tree and
> bootup - normally, I would debug this... but looking at the DWC-OTG
> Driver source code between 2.6.31 and 2.6.32, there are no changes to
> the Synopsis OTG drivers (the last changes to this code was back in
> September of 09). It would be frustrating to spend the time resolving

Your analysis is wrong. There are changes between 2.6.31 and the
commit I pointed you at (2.6.32.7-00007-g08eba26):

-> git log DENX-v2.6.31..08eba26 drivers/usb/gadget/dwc_otg

commit 018b43db153da063182c87be2eaad037cba2d879
Author: Stefan Roese <sr at denx.de>
Date:   Thu Sep 24 17:15:06 2009 +0200

    USB: Fix timeout problem with polling loops in DWC USB-OTG driver
    
    This patch fixes a problem seen on systems booting without serial
    console. This faster bootup results in an unusable driver because
    some polling loops are currently coded without real delays.
    
    This patch now adds udelay() calls to these loops to fix this
    problem.
    
    Thanks to Sylvain Cote for this patch suggestion.
    
    Signed-off-by: Stefan Roese <sr at denx.de>
    Signed-off-by: Sylvain Cote <Sylvain.Cote at verint.com>

commit 538fe70d696bc5e694ab08e9627a99a0b11358ec
Author: Stefan Roese <sr at denx.de>
Date:   Wed Sep 23 08:50:29 2009 +0200

    USB: Fix problem with reconnection in DWC USB-OTG driver
    
    USB-serial-adapters could hang or stop to work after the following
    sequence:
    
    - Plug USB-serial-adapter
    - Operate ttyUSB0 (e.g. transfer some chars)
    - Unplug USB-serial-adapater
    - Re-plug adapter
    
    This patch now fixes a bug in dwc_otg_hcd_qtd_add(), where
    "qtd_dh_ptr" was only assigned in case a new QH had to be created.
    In most cases, where the QH already existed, this pointer would
    still be NULL, resulting in incomplete URB dequeuing in
    dwc_otg_hcd_urb_dequeue().
    
    Additionally dwc_otg_hcd_qtd_add() now returns with an error, if
    dwc_otg_hcd_qh_create() should fail.
    
    Tested on AMCC Kilauea and Canyonlands.
    
    Signed-off-by: Stefan Roese <sr at denx.de>
    Acked-by: Chuck Meade <chuckmeade at mindspring.com>


Also, let's see:

	-> git log --pretty=oneline  DENX-v2.6.31..08eba26  | wc -l
	12379

So in addition to these two commits directly affecting the dwc_otg
driver, there are 12,377 other changes between these versions, that
could well cause a different behaviour.

> I guess my question boils down to this: Is it absolutely necessary to
> upgrade to 2.6.32 to get the host USB interface working or is that
> just to be synchronized with the latest and greatest to better
> address my concerns?

I cannot answer this question. All I can say is that we tested the
dwc_otg driver pretty extensively and that we are confident that it is
working much better in 2.6.32.7-00007-g08eba26 than it did in 2.6.31;
of course we tested on the Linauea board only, and there is no
guarantee that different hardware might not add additional issues.

If you need help with your specific hardware/software combination
please feel free to contact us at support at denx.de for professional
support services.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
As in certain cults it is possible to kill a process if you know  its
true name.                      -- Ken Thompson and Dennis M. Ritchie


More information about the eldk mailing list