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

Liu Shengzhou-B36685 B36685 at freescale.com
Thu Oct 18 08:28:29 CEST 2012


> -----Original Message-----
> >
> > +/* Check USB PHY clock valid */
> > +static int usb_phy_clk_valid(struct usb_ehci *ehci) {
> > +	if ((!(in_be32(&ehci->control) & PHY_CLK_VALID)) &&
> > +			(!in_be32(&ehci->prictrl))) {
> 
> (!A && !B) condition can certainly be done without the double negation ;-)

[Shengzhou] Yes, using !(A||B) is also okay:)

> 
> > +		printf("USB PHY clock invalid!\n");
> 
> debug() ?
> 
[Shengzhou] No, it's not for debug purpose, it should be printf() as a necessary info.




More information about the U-Boot mailing list