[U-Boot] [PATCH v2 2/2] usb: phy: omap_usb_phy: implement usb_phy_power() for AM437x
Marek Vasut
marex at denx.de
Wed Jun 25 15:50:17 CEST 2014
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
More information about the U-Boot
mailing list