From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 25 Jun 2014 15:50:17 +0200 Subject: [U-Boot] [PATCH v2 2/2] usb: phy: omap_usb_phy: implement usb_phy_power() for AM437x In-Reply-To: References: <1403561904-28935-1-git-send-email-balbi@ti.com> Message-ID: <201406251550.18009.marex@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 Tuesday, June 24, 2014 at 04:38:58 PM, Michael Trimarchi wrote: [...] > > index af46db2..f78d532 100644 > > --- a/drivers/usb/phy/omap_usb_phy.c > > +++ b/drivers/usb/phy/omap_usb_phy.c > > @@ -222,7 +222,22 @@ static void am437x_enable_usb2_phy2(struct omap_xhci > > *omap) > > > void usb_phy_power(int on) > > { > > > > - return; > > + u32 val; > > + > > + /* USB1_CTRL */ > > + val = readl(USB1_CTRL); > > + if (on) { > > + /* > > + * these bits are re-used on AM437x to power up/down the > > USB > > > + * CM and OTG PHYs, if we don't toggle them, USB will not > > be > > > + * functional on newer silicon revisions > > + */ > > + val &= ~(USB1_CTRL_CM_PWRDN | USB1_CTRL_OTG_PWRDN); > > + } else { > > + val |= USB1_CTRL_CM_PWRDN | USB1_CTRL_OTG_PWRDN; > > + } > > + > > + writel(val, USB1_CTRL); Thanks, please use clrbits_le32() and setbits_le32() here instead. Best regards, Marek Vasut