diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2013-02-28 05:52:30 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-18 05:17:59 -0400 |
commit | b5a726b30436ab332aea4133bbfa0484d1c658b3 (patch) | |
tree | 704e72d887882a6f532ba59e77d4cb4f9e864780 | |
parent | 25df6397a6c063811154868b868e8bd10e5ae9b1 (diff) |
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: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/otg/mxs-phy.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/usb/otg/mxs-phy.c b/drivers/usb/otg/mxs-phy.c index aa403256d4b6..9d4381e64d51 100644 --- a/drivers/usb/otg/mxs-phy.c +++ b/drivers/usb/otg/mxs-phy.c | |||
@@ -48,12 +48,12 @@ static void mxs_phy_hw_init(struct mxs_phy *mxs_phy) | |||
48 | stmp_reset_block(base + HW_USBPHY_CTRL); | 48 | stmp_reset_block(base + HW_USBPHY_CTRL); |
49 | 49 | ||
50 | /* Power up the PHY */ | 50 | /* Power up the PHY */ |
51 | writel_relaxed(0, base + HW_USBPHY_PWD); | 51 | writel(0, base + HW_USBPHY_PWD); |
52 | 52 | ||
53 | /* enable FS/LS device */ | 53 | /* enable FS/LS device */ |
54 | writel_relaxed(BM_USBPHY_CTRL_ENUTMILEVEL2 | | 54 | writel(BM_USBPHY_CTRL_ENUTMILEVEL2 | |
55 | BM_USBPHY_CTRL_ENUTMILEVEL3, | 55 | BM_USBPHY_CTRL_ENUTMILEVEL3, |
56 | base + HW_USBPHY_CTRL_SET); | 56 | base + HW_USBPHY_CTRL_SET); |
57 | } | 57 | } |
58 | 58 | ||
59 | static int mxs_phy_init(struct usb_phy *phy) | 59 | static int mxs_phy_init(struct usb_phy *phy) |
@@ -70,8 +70,8 @@ static void mxs_phy_shutdown(struct usb_phy *phy) | |||
70 | { | 70 | { |
71 | struct mxs_phy *mxs_phy = to_mxs_phy(phy); | 71 | struct mxs_phy *mxs_phy = to_mxs_phy(phy); |
72 | 72 | ||
73 | writel_relaxed(BM_USBPHY_CTRL_CLKGATE, | 73 | writel(BM_USBPHY_CTRL_CLKGATE, |
74 | phy->io_priv + HW_USBPHY_CTRL_SET); | 74 | phy->io_priv + HW_USBPHY_CTRL_SET); |
75 | 75 | ||
76 | clk_disable_unprepare(mxs_phy->clk); | 76 | clk_disable_unprepare(mxs_phy->clk); |
77 | } | 77 | } |
@@ -81,15 +81,15 @@ static int mxs_phy_suspend(struct usb_phy *x, int suspend) | |||
81 | struct mxs_phy *mxs_phy = to_mxs_phy(x); | 81 | struct mxs_phy *mxs_phy = to_mxs_phy(x); |
82 | 82 | ||
83 | if (suspend) { | 83 | if (suspend) { |
84 | writel_relaxed(0xffffffff, x->io_priv + HW_USBPHY_PWD); | 84 | writel(0xffffffff, x->io_priv + HW_USBPHY_PWD); |
85 | writel_relaxed(BM_USBPHY_CTRL_CLKGATE, | 85 | writel(BM_USBPHY_CTRL_CLKGATE, |
86 | x->io_priv + HW_USBPHY_CTRL_SET); | 86 | x->io_priv + HW_USBPHY_CTRL_SET); |
87 | clk_disable_unprepare(mxs_phy->clk); | 87 | clk_disable_unprepare(mxs_phy->clk); |
88 | } else { | 88 | } else { |
89 | clk_prepare_enable(mxs_phy->clk); | 89 | clk_prepare_enable(mxs_phy->clk); |
90 | writel_relaxed(BM_USBPHY_CTRL_CLKGATE, | 90 | writel(BM_USBPHY_CTRL_CLKGATE, |
91 | x->io_priv + HW_USBPHY_CTRL_CLR); | 91 | x->io_priv + HW_USBPHY_CTRL_CLR); |
92 | writel_relaxed(0, x->io_priv + HW_USBPHY_PWD); | 92 | writel(0, x->io_priv + HW_USBPHY_PWD); |
93 | } | 93 | } |
94 | 94 | ||
95 | return 0; | 95 | return 0; |
@@ -102,8 +102,8 @@ static int mxs_phy_on_connect(struct usb_phy *phy, | |||
102 | (speed == USB_SPEED_HIGH) ? "high" : "non-high"); | 102 | (speed == USB_SPEED_HIGH) ? "high" : "non-high"); |
103 | 103 | ||
104 | if (speed == USB_SPEED_HIGH) | 104 | if (speed == USB_SPEED_HIGH) |
105 | writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, | 105 | writel(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, |
106 | phy->io_priv + HW_USBPHY_CTRL_SET); | 106 | phy->io_priv + HW_USBPHY_CTRL_SET); |
107 | 107 | ||
108 | return 0; | 108 | return 0; |
109 | } | 109 | } |
@@ -115,8 +115,8 @@ static int mxs_phy_on_disconnect(struct usb_phy *phy, | |||
115 | (speed == USB_SPEED_HIGH) ? "high" : "non-high"); | 115 | (speed == USB_SPEED_HIGH) ? "high" : "non-high"); |
116 | 116 | ||
117 | if (speed == USB_SPEED_HIGH) | 117 | if (speed == USB_SPEED_HIGH) |
118 | writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, | 118 | writel(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, |
119 | phy->io_priv + HW_USBPHY_CTRL_CLR); | 119 | phy->io_priv + HW_USBPHY_CTRL_CLR); |
120 | 120 | ||
121 | return 0; | 121 | return 0; |
122 | } | 122 | } |