From 127d42ae47703fe7b7bc59c0fb687a05e22a92a4 Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Fri, 4 May 2012 14:16:59 +0200 Subject: [PATCH] usb:hsotg:samsung: Remove platform dependency from s3c-hsotg This code removes platform dependency from s3c-hsotg driver. Signed-off-by: Lukasz Majewski Signed-off-by: Kyungmin Park Cc: Kukjin Kim Signed-off-by: Felipe Balbi --- arch/arm/mach-exynos/mach-nuri.c | 1 + arch/arm/mach-exynos/mach-universal_c210.c | 1 + arch/arm/mach-s3c64xx/mach-crag6410.c | 2 +- arch/arm/mach-s3c64xx/mach-smartq.c | 2 +- arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +- arch/arm/mach-s5pv210/mach-goni.c | 1 + arch/arm/plat-samsung/devs.c | 2 +- drivers/usb/gadget/s3c-hsotg.c | 4 ++-- .../usb/gadget/s3c-hsotg.h | 22 +++++++++---------- .../linux/platform_data/s3c-hsotg.h | 5 +++-- 10 files changed, 23 insertions(+), 19 deletions(-) rename arch/arm/plat-samsung/include/plat/regs-usb-hsotg.h => drivers/usb/gadget/s3c-hsotg.h (94%) rename arch/arm/plat-samsung/include/plat/udc-hs.h => include/linux/platform_data/s3c-hsotg.h (90%) diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index b4f1f902ce6d..e284b0e4ca2e 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index 7ebf79c2ab34..ad15d0fda3c1 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c @@ -42,6 +42,7 @@ #include #include #include +#include #include diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index e20bf5835365..a02f204d99ed 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c @@ -61,7 +61,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c index ce745e19aa27..ee0d13c98378 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq.c +++ b/arch/arm/mach-s3c64xx/mach-smartq.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index d55bc96d9582..bf477e33f0ee 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c @@ -72,7 +72,7 @@ #include #include #include -#include +#include #include "common.h" diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index a8933de3d627..921da285ff20 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c @@ -49,6 +49,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 8b928f9bc1c3..a41c808847c0 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -57,7 +57,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 105b206cd844..70c6f3b45cf2 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -34,9 +34,9 @@ #include #include -#include +#include "s3c-hsotg.h" +#include #include -#include #include #define DMA_ADDR_INVALID (~((dma_addr_t)0)) diff --git a/arch/arm/plat-samsung/include/plat/regs-usb-hsotg.h b/drivers/usb/gadget/s3c-hsotg.h similarity index 94% rename from arch/arm/plat-samsung/include/plat/regs-usb-hsotg.h rename to drivers/usb/gadget/s3c-hsotg.h index dc90f5ede88f..4c4ccc44b577 100644 --- a/arch/arm/plat-samsung/include/plat/regs-usb-hsotg.h +++ b/drivers/usb/gadget/s3c-hsotg.h @@ -156,7 +156,7 @@ #define S3C_HPTXFSIZ S3C_HSOTG_REG(0x100) -#define S3C_DPTXFSIZn(_a) S3C_HSOTG_REG(0x104 + (((_a) - 1) * 4)) +#define S3C_DPTXFSIZn(_a) S3C_HSOTG_REG(0x104 + (((_a) - 1) * 4)) #define S3C_DPTXFSIZn_DPTxFSize_MASK (0xffff << 16) #define S3C_DPTXFSIZn_DPTxFSize_SHIFT (16) @@ -261,8 +261,8 @@ #define S3C_DIEPCTL0 S3C_HSOTG_REG(0x900) #define S3C_DOEPCTL0 S3C_HSOTG_REG(0xB00) -#define S3C_DIEPCTL(_a) S3C_HSOTG_REG(0x900 + ((_a) * 0x20)) -#define S3C_DOEPCTL(_a) S3C_HSOTG_REG(0xB00 + ((_a) * 0x20)) +#define S3C_DIEPCTL(_a) S3C_HSOTG_REG(0x900 + ((_a) * 0x20)) +#define S3C_DOEPCTL(_a) S3C_HSOTG_REG(0xB00 + ((_a) * 0x20)) /* EP0 specialness: * bits[29..28] - reserved (no SetD0PID, SetD1PID) @@ -312,8 +312,8 @@ #define S3C_DxEPCTL_MPS_LIMIT (0x7ff) #define S3C_DxEPCTL_MPS(_x) ((_x) << 0) -#define S3C_DIEPINT(_a) S3C_HSOTG_REG(0x908 + ((_a) * 0x20)) -#define S3C_DOEPINT(_a) S3C_HSOTG_REG(0xB08 + ((_a) * 0x20)) +#define S3C_DIEPINT(_a) S3C_HSOTG_REG(0x908 + ((_a) * 0x20)) +#define S3C_DOEPINT(_a) S3C_HSOTG_REG(0xB08 + ((_a) * 0x20)) #define S3C_DxEPINT_INEPNakEff (1 << 6) #define S3C_DxEPINT_Back2BackSetup (1 << 6) @@ -349,8 +349,8 @@ #define S3C_DOEPTSIZ0_XferSize_MASK (0x7f << 0) #define S3C_DOEPTSIZ0_XferSize_SHIFT (0) -#define S3C_DIEPTSIZ(_a) S3C_HSOTG_REG(0x910 + ((_a) * 0x20)) -#define S3C_DOEPTSIZ(_a) S3C_HSOTG_REG(0xB10 + ((_a) * 0x20)) +#define S3C_DIEPTSIZ(_a) S3C_HSOTG_REG(0x910 + ((_a) * 0x20)) +#define S3C_DOEPTSIZ(_a) S3C_HSOTG_REG(0xB10 + ((_a) * 0x20)) #define S3C_DxEPTSIZ_MC_MASK (0x3 << 29) #define S3C_DxEPTSIZ_MC_SHIFT (29) @@ -370,10 +370,10 @@ #define S3C_DxEPTSIZ_XferSize(_x) ((_x) << 0) -#define S3C_DIEPDMA(_a) S3C_HSOTG_REG(0x914 + ((_a) * 0x20)) -#define S3C_DOEPDMA(_a) S3C_HSOTG_REG(0xB14 + ((_a) * 0x20)) -#define S3C_DTXFSTS(_a) S3C_HSOTG_REG(0x918 + ((_a) * 0x20)) +#define S3C_DIEPDMA(_a) S3C_HSOTG_REG(0x914 + ((_a) * 0x20)) +#define S3C_DOEPDMA(_a) S3C_HSOTG_REG(0xB14 + ((_a) * 0x20)) +#define S3C_DTXFSTS(_a) S3C_HSOTG_REG(0x918 + ((_a) * 0x20)) -#define S3C_EPFIFO(_a) S3C_HSOTG_REG(0x1000 + ((_a) * 0x1000)) +#define S3C_EPFIFO(_a) S3C_HSOTG_REG(0x1000 + ((_a) * 0x1000)) #endif /* __PLAT_S3C64XX_REGS_USB_HSOTG_H */ diff --git a/arch/arm/plat-samsung/include/plat/udc-hs.h b/include/linux/platform_data/s3c-hsotg.h similarity index 90% rename from arch/arm/plat-samsung/include/plat/udc-hs.h rename to include/linux/platform_data/s3c-hsotg.h index c9e3667cb2b1..97ec12c2ded4 100644 --- a/arch/arm/plat-samsung/include/plat/udc-hs.h +++ b/include/linux/platform_data/s3c-hsotg.h @@ -1,4 +1,4 @@ -/* arch/arm/plat-s3c/include/plat/udc-hs.h +/* include/linux/platform_data/s3c-hsotg.h * * Copyright 2008 Openmoko, Inc. * Copyright 2008 Simtec Electronics @@ -25,7 +25,8 @@ enum s3c_hsotg_dmamode { */ struct s3c_hsotg_plat { enum s3c_hsotg_dmamode dma; - unsigned int is_osc : 1; + unsigned int is_osc:1; + int phy_type; int (*phy_init)(struct platform_device *pdev, int type); int (*phy_exit)(struct platform_device *pdev, int type); -- 2.20.1