Re: [PATCH] usb: phy: mv_u3d: Remove usb phy driver for mv_u3d

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 17, 2014 at 09:50:28AM +0200, Paul Bolle wrote:
> On Tue, 2014-04-15 at 23:34 -0500, Felipe Balbi wrote:
> > $ make drivers/usb/phy/phy-mv-u3d-usb.o
> >   CHK     include/config/kernel.release
> >   CHK     include/generated/uapi/linux/version.h
> >   CHK     include/generated/utsrelease.h
> > make[1]: `include/generated/mach-types.h' is up to date.
> >   CALL    scripts/checksyscalls.sh
> >   CC      drivers/usb/phy/phy-mv-u3d-usb.o
> 
> (On x86_64 this manual make command triggers the error Greg reported in
> https://lkml.org/lkml/2014/2/11/693 .)
> 
> > yup, builds just fine. Even if the ARCH support isn't in place, this
> > driver is *not* breaking anything, it's not preventing anyone from
> > getting work done and it might be helping Marvell decrease the amount of
> > changes they keep out of tree.
> > 
> > I don't see any problems this driver in tree as long as there are people
> > working on it and I see the latest commit was 10 days ago, it wouldn't
> > be fair to Marvell to delete their driver if they're still finding ways
> > to make it useful one way or another.
> 
> Wouldn't it then be better if this driver is at least hooked into the
> build system? Like, say, this:
>     config MV_U3D_PHY
>             bool "Marvell USB 3.0 PHY controller Driver"
>             # XXX should depend on CPU_MMP3 when support for MMP3 lands
>             depends on ARM && COMPILE_TEST
>             select USB_PHY
>             help
>               Enable this to support Marvell USB 3.0 phy controller for Marvell
>               SoC.
> 
> (Or perhaps only ARCH_MMP && COMPILE_TEST.) That should give it build
> coverage by the automated tests people appear to run, while work is done
> on adding MMP3 support.

I guess we should make it depend on BROKEN instead, or we just apply the
patch below:

8<---------------------------------------------------------------------

From 60e524d7db4ed04624850fcb84a844c609a960e3 Mon Sep 17 00:00:00 2001
From: Felipe Balbi <balbi@xxxxxx>
Date: Thu, 17 Apr 2014 11:24:27 -0500
Subject: [PATCH] usb: phy: mv-u3d: switch over to writel/readl

by removing the _relaxed suffix, we can build
this driver in other architectures.

Signed-off-by: Felipe Balbi <balbi@xxxxxx>
---
 drivers/usb/phy/phy-mv-u3d-usb.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/phy/phy-mv-u3d-usb.c b/drivers/usb/phy/phy-mv-u3d-usb.c
index d317903..d342175 100644
--- a/drivers/usb/phy/phy-mv-u3d-usb.c
+++ b/drivers/usb/phy/phy-mv-u3d-usb.c
@@ -39,8 +39,8 @@ static u32 mv_u3d_phy_read(void __iomem *base, u32 reg)
 	addr = base;
 	data = base + 0x4;
 
-	writel_relaxed(reg, addr);
-	return readl_relaxed(data);
+	writel(reg, addr);
+	return readl(data);
 }
 
 static void mv_u3d_phy_set(void __iomem *base, u32 reg, u32 value)
@@ -51,10 +51,10 @@ static void mv_u3d_phy_set(void __iomem *base, u32 reg, u32 value)
 	addr = base;
 	data = base + 0x4;
 
-	writel_relaxed(reg, addr);
-	tmp = readl_relaxed(data);
+	writel(reg, addr);
+	tmp = readl(data);
 	tmp |= value;
-	writel_relaxed(tmp, data);
+	writel(tmp, data);
 }
 
 static void mv_u3d_phy_clear(void __iomem *base, u32 reg, u32 value)
@@ -65,10 +65,10 @@ static void mv_u3d_phy_clear(void __iomem *base, u32 reg, u32 value)
 	addr = base;
 	data = base + 0x4;
 
-	writel_relaxed(reg, addr);
-	tmp = readl_relaxed(data);
+	writel(reg, addr);
+	tmp = readl(data);
 	tmp &= ~value;
-	writel_relaxed(tmp, data);
+	writel(tmp, data);
 }
 
 static void mv_u3d_phy_write(void __iomem *base, u32 reg, u32 value)
@@ -78,8 +78,8 @@ static void mv_u3d_phy_write(void __iomem *base, u32 reg, u32 value)
 	addr = base;
 	data = base + 0x4;
 
-	writel_relaxed(reg, addr);
-	writel_relaxed(value, data);
+	writel(reg, addr);
+	writel(value, data);
 }
 
 static void mv_u3d_phy_shutdown(struct usb_phy *phy)
-- 
1.9.2.459.g68773ac


-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux