From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Fri, 09 Sep 2011 12:18:13 +0200 Subject: [U-Boot] some USB cleanup on EfikaMX In-Reply-To: References: Message-ID: <4E69E7E5.4070503@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 =====================================================================