[U-Boot] [PATCH] ppc4xx: Canyonlands: Fix USB host PHY reset sequence

Wolfgang Denk wd at denx.de
Mon Dec 14 21:41:46 CET 2009


Dear Dave Mitchell,

In message <1260821359-8705-1-git-send-email-dmitchell at appliedmicro.com> you wrote:
> Current de-assert reset is not sufficient for the USB PHY reset
> on some Canyonlands platforms. The patch adds an assert/de-assert
> sequence. This addresses a USB detection problem for devices
> attached prior to power-up. The delay lengths are needed for
> power to the PHY to stabilize.

Hm...

> -	/* Enable USB host & USB-OTG */
> +	/* Enable USB host & USB-OTG;force assert,then de-assert PHY reset */
> +	out_8((void *)CONFIG_SYS_BCSR_BASE + 7, 1);
> +	mdelay(100);
>  	out_8((void *)CONFIG_SYS_BCSR_BASE + 7, 0);
> +	mdealy(100);

It would have been nice if you had at least tried to compile that.
"mdealy()" is a typo, right?

And do we really need 200 milliseconds delay?

Some customers who care about boot times will not be happy about such
an aditional delay.  You add this code do board_early_init_f() which
always gets executed. But actually this is only needed when we want to
use the USB port in U-Boot, right?  So this should be added to the USB
init code, and not to the common code.

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
"They that can give up essential liberty to obtain a little temporary
saftey deserve neither liberty not saftey." - Benjamin Franklin, 1759


More information about the U-Boot mailing list