Commit b5a726b3 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde Committed by Felipe Balbi

usb: phy: mxs: use readl(), writel() instead of the _relaxed() versions

This patch converts the mxs-phy driver from readl_relaxed(), writel_relaxed()
to the plain readl(), writel() functions, which are available on all platforms.

This is done to enable compile time testing on non ARM platforms.
Reported-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 25df6397
...@@ -48,10 +48,10 @@ static void mxs_phy_hw_init(struct mxs_phy *mxs_phy) ...@@ -48,10 +48,10 @@ static void mxs_phy_hw_init(struct mxs_phy *mxs_phy)
stmp_reset_block(base + HW_USBPHY_CTRL); stmp_reset_block(base + HW_USBPHY_CTRL);
/* Power up the PHY */ /* Power up the PHY */
writel_relaxed(0, base + HW_USBPHY_PWD); writel(0, base + HW_USBPHY_PWD);
/* enable FS/LS device */ /* enable FS/LS device */
writel_relaxed(BM_USBPHY_CTRL_ENUTMILEVEL2 | writel(BM_USBPHY_CTRL_ENUTMILEVEL2 |
BM_USBPHY_CTRL_ENUTMILEVEL3, BM_USBPHY_CTRL_ENUTMILEVEL3,
base + HW_USBPHY_CTRL_SET); base + HW_USBPHY_CTRL_SET);
} }
...@@ -70,7 +70,7 @@ static void mxs_phy_shutdown(struct usb_phy *phy) ...@@ -70,7 +70,7 @@ static void mxs_phy_shutdown(struct usb_phy *phy)
{ {
struct mxs_phy *mxs_phy = to_mxs_phy(phy); struct mxs_phy *mxs_phy = to_mxs_phy(phy);
writel_relaxed(BM_USBPHY_CTRL_CLKGATE, writel(BM_USBPHY_CTRL_CLKGATE,
phy->io_priv + HW_USBPHY_CTRL_SET); phy->io_priv + HW_USBPHY_CTRL_SET);
clk_disable_unprepare(mxs_phy->clk); clk_disable_unprepare(mxs_phy->clk);
...@@ -81,15 +81,15 @@ static int mxs_phy_suspend(struct usb_phy *x, int suspend) ...@@ -81,15 +81,15 @@ static int mxs_phy_suspend(struct usb_phy *x, int suspend)
struct mxs_phy *mxs_phy = to_mxs_phy(x); struct mxs_phy *mxs_phy = to_mxs_phy(x);
if (suspend) { if (suspend) {
writel_relaxed(0xffffffff, x->io_priv + HW_USBPHY_PWD); writel(0xffffffff, x->io_priv + HW_USBPHY_PWD);
writel_relaxed(BM_USBPHY_CTRL_CLKGATE, writel(BM_USBPHY_CTRL_CLKGATE,
x->io_priv + HW_USBPHY_CTRL_SET); x->io_priv + HW_USBPHY_CTRL_SET);
clk_disable_unprepare(mxs_phy->clk); clk_disable_unprepare(mxs_phy->clk);
} else { } else {
clk_prepare_enable(mxs_phy->clk); clk_prepare_enable(mxs_phy->clk);
writel_relaxed(BM_USBPHY_CTRL_CLKGATE, writel(BM_USBPHY_CTRL_CLKGATE,
x->io_priv + HW_USBPHY_CTRL_CLR); x->io_priv + HW_USBPHY_CTRL_CLR);
writel_relaxed(0, x->io_priv + HW_USBPHY_PWD); writel(0, x->io_priv + HW_USBPHY_PWD);
} }
return 0; return 0;
...@@ -102,7 +102,7 @@ static int mxs_phy_on_connect(struct usb_phy *phy, ...@@ -102,7 +102,7 @@ static int mxs_phy_on_connect(struct usb_phy *phy,
(speed == USB_SPEED_HIGH) ? "high" : "non-high"); (speed == USB_SPEED_HIGH) ? "high" : "non-high");
if (speed == USB_SPEED_HIGH) if (speed == USB_SPEED_HIGH)
writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, writel(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
phy->io_priv + HW_USBPHY_CTRL_SET); phy->io_priv + HW_USBPHY_CTRL_SET);
return 0; return 0;
...@@ -115,7 +115,7 @@ static int mxs_phy_on_disconnect(struct usb_phy *phy, ...@@ -115,7 +115,7 @@ static int mxs_phy_on_disconnect(struct usb_phy *phy,
(speed == USB_SPEED_HIGH) ? "high" : "non-high"); (speed == USB_SPEED_HIGH) ? "high" : "non-high");
if (speed == USB_SPEED_HIGH) if (speed == USB_SPEED_HIGH)
writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, writel(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
phy->io_priv + HW_USBPHY_CTRL_CLR); phy->io_priv + HW_USBPHY_CTRL_CLR);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment