diff mbox

[3/4] USB mxs-phy: use readl(), writel() instead of the _relaxed() versions

Message ID 1362048751-4061-4-git-send-email-mkl@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Marc Kleine-Budde Feb. 28, 2013, 10:52 a.m. UTC
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>
---
 drivers/usb/otg/mxs-phy.c |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

Comments

Alexander Shishkin Feb. 28, 2013, 11:25 a.m. UTC | #1
Marc Kleine-Budde <mkl@pengutronix.de> writes:

> 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>

I think it was Felipe who reported this actually.

Regards,
--
Alex
Marc Kleine-Budde March 8, 2013, 4:05 p.m. UTC | #2
On 02/28/2013 12:25 PM, Alexander Shishkin wrote:
> Marc Kleine-Budde <mkl@pengutronix.de> writes:
> 
>> 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>
> 
> I think it was Felipe who reported this actually.

Fixed. I'm about to repost this series with crediting Felipe as reporter.

Which tree would you like to be this series based on? It depends on the
"USB otg: use try_module_get in all usb_get_phy functions and add
missing module_put" patch which is part of your usb/fixes branch, but
not in usb/next yet.

Marc
Felipe Balbi March 8, 2013, 4:28 p.m. UTC | #3
Hi,

On Fri, Mar 08, 2013 at 05:05:58PM +0100, Marc Kleine-Budde wrote:
> On 02/28/2013 12:25 PM, Alexander Shishkin wrote:
> > Marc Kleine-Budde <mkl@pengutronix.de> writes:
> > 
> >> 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>
> > 
> > I think it was Felipe who reported this actually.
> 
> Fixed. I'm about to repost this series with crediting Felipe as reporter.
> 
> Which tree would you like to be this series based on? It depends on the
> "USB otg: use try_module_get in all usb_get_phy functions and add
> missing module_put" patch which is part of your usb/fixes branch, but
> not in usb/next yet.

look at my testing branch. I have them all already. You didn't get an
email yet because I'm waiting for -rc2 to be tagged.

I have fixed the Reported-by tag, no issues there.

Anyway, as soon as v3.9-rc2 is tagged, I will rebase testing on top of
that and move all patches to 'next', then everything will be stable from
that point on.

If you want to have changes to any of the patches, now is the time,
after I move patches to 'next' the tree becomes immutable.

cheers
Marc Kleine-Budde March 8, 2013, 4:31 p.m. UTC | #4
On 03/08/2013 05:28 PM, Felipe Balbi wrote:
> Hi,
> 
> On Fri, Mar 08, 2013 at 05:05:58PM +0100, Marc Kleine-Budde wrote:
>> On 02/28/2013 12:25 PM, Alexander Shishkin wrote:
>>> Marc Kleine-Budde <mkl@pengutronix.de> writes:
>>>
>>>> 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>
>>>
>>> I think it was Felipe who reported this actually.
>>
>> Fixed. I'm about to repost this series with crediting Felipe as reporter.
>>
>> Which tree would you like to be this series based on? It depends on the
>> "USB otg: use try_module_get in all usb_get_phy functions and add
>> missing module_put" patch which is part of your usb/fixes branch, but
>> not in usb/next yet.
> 
> look at my testing branch. I have them all already. You didn't get an
> email yet because I'm waiting for -rc2 to be tagged.

Thanks.

> I have fixed the Reported-by tag, no issues there.
> 
> Anyway, as soon as v3.9-rc2 is tagged, I will rebase testing on top of
> that and move all patches to 'next', then everything will be stable from
> that point on.
> 
> If you want to have changes to any of the patches, now is the time,
> after I move patches to 'next' the tree becomes immutable.

Nope, I just wanted to keep track of the patches.

Marc
Felipe Balbi March 8, 2013, 4:34 p.m. UTC | #5
On Fri, Mar 08, 2013 at 05:31:41PM +0100, Marc Kleine-Budde wrote:
> On 03/08/2013 05:28 PM, Felipe Balbi wrote:
> > Hi,
> > 
> > On Fri, Mar 08, 2013 at 05:05:58PM +0100, Marc Kleine-Budde wrote:
> >> On 02/28/2013 12:25 PM, Alexander Shishkin wrote:
> >>> Marc Kleine-Budde <mkl@pengutronix.de> writes:
> >>>
> >>>> 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>
> >>>
> >>> I think it was Felipe who reported this actually.
> >>
> >> Fixed. I'm about to repost this series with crediting Felipe as reporter.
> >>
> >> Which tree would you like to be this series based on? It depends on the
> >> "USB otg: use try_module_get in all usb_get_phy functions and add
> >> missing module_put" patch which is part of your usb/fixes branch, but
> >> not in usb/next yet.
> > 
> > look at my testing branch. I have them all already. You didn't get an
> > email yet because I'm waiting for -rc2 to be tagged.
> 
> Thanks.
> 
> > I have fixed the Reported-by tag, no issues there.
> > 
> > Anyway, as soon as v3.9-rc2 is tagged, I will rebase testing on top of
> > that and move all patches to 'next', then everything will be stable from
> > that point on.
> > 
> > If you want to have changes to any of the patches, now is the time,
> > after I move patches to 'next' the tree becomes immutable.
> 
> Nope, I just wanted to keep track of the patches.

alright, sorry for the time it's taking to have 'next' ready, but I need
to make sure things are, at a minimum, compiling correctly. Plus, I have
dependencies on commits which I have sent to Greg as fixes. They should
be merged upstream any time now ;-)
diff mbox

Patch

diff --git a/drivers/usb/otg/mxs-phy.c b/drivers/usb/otg/mxs-phy.c
index b0d9f11..dff10f2 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)
 	stmp_reset_block(base + HW_USBPHY_CTRL);
 
 	/* Power up the PHY */
-	writel_relaxed(0, base + HW_USBPHY_PWD);
+	writel(0, base + HW_USBPHY_PWD);
 
 	/* enable FS/LS device */
-	writel_relaxed(BM_USBPHY_CTRL_ENUTMILEVEL2 |
-			BM_USBPHY_CTRL_ENUTMILEVEL3,
-			base + HW_USBPHY_CTRL_SET);
+	writel(BM_USBPHY_CTRL_ENUTMILEVEL2 |
+	       BM_USBPHY_CTRL_ENUTMILEVEL3,
+	       base + HW_USBPHY_CTRL_SET);
 }
 
 static int mxs_phy_init(struct usb_phy *phy)
@@ -70,8 +70,8 @@  static void mxs_phy_shutdown(struct usb_phy *phy)
 {
 	struct mxs_phy *mxs_phy = to_mxs_phy(phy);
 
-	writel_relaxed(BM_USBPHY_CTRL_CLKGATE,
-			phy->io_priv + HW_USBPHY_CTRL_SET);
+	writel(BM_USBPHY_CTRL_CLKGATE,
+	       phy->io_priv + HW_USBPHY_CTRL_SET);
 
 	clk_disable_unprepare(mxs_phy->clk);
 }
@@ -81,15 +81,15 @@  static int mxs_phy_suspend(struct usb_phy *x, int suspend)
 	struct mxs_phy *mxs_phy = to_mxs_phy(x);
 
 	if (suspend) {
-		writel_relaxed(0xffffffff, x->io_priv + HW_USBPHY_PWD);
-		writel_relaxed(BM_USBPHY_CTRL_CLKGATE,
-			x->io_priv + HW_USBPHY_CTRL_SET);
+		writel(0xffffffff, x->io_priv + HW_USBPHY_PWD);
+		writel(BM_USBPHY_CTRL_CLKGATE,
+		       x->io_priv + HW_USBPHY_CTRL_SET);
 		clk_disable_unprepare(mxs_phy->clk);
 	} else {
 		clk_prepare_enable(mxs_phy->clk);
-		writel_relaxed(BM_USBPHY_CTRL_CLKGATE,
-			x->io_priv + HW_USBPHY_CTRL_CLR);
-		writel_relaxed(0, x->io_priv + HW_USBPHY_PWD);
+		writel(BM_USBPHY_CTRL_CLKGATE,
+		       x->io_priv + HW_USBPHY_CTRL_CLR);
+		writel(0, x->io_priv + HW_USBPHY_PWD);
 	}
 
 	return 0;
@@ -102,8 +102,8 @@  static int mxs_phy_on_connect(struct usb_phy *phy,
 		(speed == USB_SPEED_HIGH) ? "high" : "non-high");
 
 	if (speed == USB_SPEED_HIGH)
-		writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
-				phy->io_priv + HW_USBPHY_CTRL_SET);
+		writel(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
+		       phy->io_priv + HW_USBPHY_CTRL_SET);
 
 	return 0;
 }
@@ -115,8 +115,8 @@  static int mxs_phy_on_disconnect(struct usb_phy *phy,
 		(speed == USB_SPEED_HIGH) ? "high" : "non-high");
 
 	if (speed == USB_SPEED_HIGH)
-		writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
-				phy->io_priv + HW_USBPHY_CTRL_CLR);
+		writel(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
+		       phy->io_priv + HW_USBPHY_CTRL_CLR);
 
 	return 0;
 }