[U-Boot] powerpc/usb: fix bug of CPU halt when missing USB PHY clock

Liu Shengzhou-B36685 B36685 at freescale.com
Mon Feb 13 09:38:44 CET 2012


> -----Original Message-----
> From: Andy Fleming [mailto:afleming at gmail.com]
> Sent: Monday, February 13, 2012 4:14 PM
> To: Liu Shengzhou-B36685; U-Boot list
> Subject: Re: powerpc/usb: fix bug of CPU halt when missing USB PHY
> clock
> 
> You moved the USB_EN setting:
> 
> 
> + /* Enable interface. */
> + setbits_be32(&ehci->control, USB_EN);
> +
> 
> [...]
> 
> - /* Enable interface. */
> - setbits_be32(&ehci->control, USB_EN);
> -
> 
> 
> Should we clear this bit if we don't find a valid clock? The patch
> description didn't say why you moved this write.
> 
> Andy

To read ehci->control[PHY_CLK_VALID], we have to first enable it, or it will hang when reading control[PHY_CLK_VALID].
-Shengzhou



More information about the U-Boot mailing list