[U-Boot] some USB cleanup on EfikaMX

Stefano Babic
2011-09-09T10:18:13Z

On 09/08/2011 11:06 PM, Jana Rapava wrote:
> --- a/board/efikamx/efikamx-usb.c
> +++ b/board/efikamx/efikamx-usb.c
> @@ -154,6 +154,7 @@ void efika_usb_phy_reset(void)
> gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_D27), 1);
> }

Hi Jana,

Wolfgang has already addressed most of the issues in your patch. Some
further comments from my site:

>
> - tmp = readl(OTG_BASE_ADDR + 0x80c);
> - tmp &= ~0x3;
> - tmp |= 0x1;
> - writel(tmp, OTG_BASE_ADDR + 0x80c);
> + tmp = readl(OTG_BASE_ADDR + MX51_PHY_CTRL1_OFFSET);
> + tmp &= ~0x3; /* make sure bits 0 and 1 are set to zero */

The comment adds no information - we already know that bits 0 and 1 are
set to 0, but we do not still know why. Substitute this comment with an
explanation about the meaning of the bits and the *reason* they must be
0. Or set defines as you have already done in the rest of the file.

> + tmp &= ~(MX51_H2_ULPI_IE_BIT | MX51_H2_WUE_BIT);
> + //Host 2 VBUS enable controlled by Host 2 controller

Do not use C++ comments.

Best regards,
Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================