[U-Boot] [PATCH] mvebu: usb: Add missing controller reset after initialization

Wolfgang Denk wd at denx.de
Sun Jan 3 09:59:23 CET 2016


Dear Phil,

[added USB custodian to Cc:]

In message <20160102211834.E49A161C74 at mail.nwl.cc> you wrote:
> In order to allow for Linux properly register the integrated EHCI host,
> we have to reset it after initialization. Without this, enumeration
> fails if 'usb start' wasn't issued prior to booting Linux.

I think this reset should actually be done in the Linux driver.

>From what you write I suspect that after a "usb stop" in U-Boot the
Linux driver maight fail, too.  Leaving USB enabled in U-Boot is
extremely dangerous - see

commit 3d71c81a9bb03f866a1e98da96363ef3f46c76b3
Author: Markus Klotzbücher <mk at denx.de>
Date:   Thu Jul 10 14:47:09 2008 +0200

    USB: shutdown USB before booting
    
    This patch fixes a potentially serious issue related to USB which was
    discouvered by Martin Krause <martin.krause at tqs.de> and fixed for
    ARM920T. Martin wrote: 
    
      Turn off USB to prevent the host controller from writing to the 
      SDRAM while Linux is booting. This could happen, because the HCCA
      (Host Controller Communication Area) lies within the SDRAM and the
      host controller writes continously to this area (as busmaster!), for
      example to increase the HccaFrameNumber variable, which happens
      every 1 ms.
    
    This is a slightly modified version of the patch in order to shutdown
    USB when booting on all architectures.
    
    Signed-off-by: Markus Klotzbuecher <mk at denx.de>


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
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
A wise person makes his  own  decisions,  a  weak  one  obeys  public
opinion.                                           -- Chinese proverb


More information about the U-Boot mailing list