On Thu, Mar 03, 2016 at 04:29:31PM -0500, Jaret Cantu wrote:
> +static void mxs_phy_tx_init(struct mxs_phy *mxs_phy)
> +{
> +     void __iomem *base = mxs_phy->phy.io_priv;
> +     u32 phytx;
> +
> +     /* Update TX register if there is anything to write */
> +     if (mxs_phy->tx_reg_mask) {
> +             phytx = readl(base + HW_USBPHY_TX);
> +             phytx &= ~mxs_phy->tx_reg_mask;
> +             phytx |=  mxs_phy->tx_reg_set;

Extra whitespace before mxs_phy->tx_reg_set.

> +             writel(phytx, base + HW_USBPHY_TX);
> +     }
> +}
> +
>  static int mxs_phy_hw_init(struct mxs_phy *mxs_phy)
>  {
>       int ret;
> @@ -214,6 +235,8 @@ static int mxs_phy_hw_init(struct mxs_phy *mxs_phy)
>       if (mxs_phy->data->flags & MXS_PHY_NEED_IP_FIX)
>               writel(BM_USBPHY_IP_FIX, base + HW_USBPHY_IP_SET);
>  
> +     mxs_phy_tx_init(mxs_phy);
> +
>       return 0;
>  }
>  
> @@ -400,6 +423,8 @@ static int mxs_phy_suspend(struct usb_phy *x, int suspend)
>               writel(BM_USBPHY_CTRL_CLKGATE,
>                      x->io_priv + HW_USBPHY_CTRL_CLR);
>               writel(0, x->io_priv + HW_USBPHY_PWD);
> +
> +             mxs_phy_tx_init(mxs_phy);

Afaik, the register content will not be changed during PHY
suspend/resume operation.

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to