]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ARM: imx: move EHCI platform defines out of platform_data header
authorShawn Guo <shawn.guo@freescale.com>
Mon, 19 May 2014 12:41:52 +0000 (20:41 +0800)
committerShawn Guo <shawn.guo@freescale.com>
Fri, 18 Jul 2014 08:10:04 +0000 (16:10 +0800)
The platform_data header usb-ehci-mxc.h has a lot of stuff used by only
IMX platform code.  They shouldn't be really in this header but a IMX
platform local header.  Create ehci.h and move these stuff into it.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
27 files changed:
arch/arm/mach-imx/ehci-imx25.c
arch/arm/mach-imx/ehci-imx27.c
arch/arm/mach-imx/ehci-imx31.c
arch/arm/mach-imx/ehci-imx35.c
arch/arm/mach-imx/ehci-imx5.c
arch/arm/mach-imx/ehci.h [new file with mode: 0644]
arch/arm/mach-imx/mach-armadillo5x0.c
arch/arm/mach-imx/mach-cpuimx27.c
arch/arm/mach-imx/mach-cpuimx35.c
arch/arm/mach-imx/mach-eukrea_cpuimx25.c
arch/arm/mach-imx/mach-imx27_visstrim_m10.c
arch/arm/mach-imx/mach-mx25_3ds.c
arch/arm/mach-imx/mach-mx27_3ds.c
arch/arm/mach-imx/mach-mx31_3ds.c
arch/arm/mach-imx/mach-mx31lilly.c
arch/arm/mach-imx/mach-mx31lite.c
arch/arm/mach-imx/mach-mx31moboard.c
arch/arm/mach-imx/mach-mx35_3ds.c
arch/arm/mach-imx/mach-pca100.c
arch/arm/mach-imx/mach-pcm037.c
arch/arm/mach-imx/mach-pcm038.c
arch/arm/mach-imx/mach-pcm043.c
arch/arm/mach-imx/mach-vpr200.c
arch/arm/mach-imx/mx31moboard-devboard.c
arch/arm/mach-imx/mx31moboard-marxbot.c
arch/arm/mach-imx/mx31moboard-smartbot.c
include/linux/platform_data/usb-ehci-mxc.h

index 134c190e3003186d19db0a909dfbaadbd45e45f3..42a5a3d14c5f32d3804a78b58e9c7730eea39206 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
+#include "ehci.h"
 #include "hardware.h"
 
 #define USBCTRL_OTGBASE_OFFSET 0x600
index 448d9115539d391b7aa8f495a386e38d2f4e5066..c56974346c16cfbd54fe47b25735da38600a4220 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
+#include "ehci.h"
 #include "hardware.h"
 
 #define USBCTRL_OTGBASE_OFFSET 0x600
index 05de4e1e39d7d74807bece3218b8e97402fbd5f6..bede21d9b98149903ecbff7fa4364b9272d43ace 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
+#include "ehci.h"
 #include "hardware.h"
 
 #define USBCTRL_OTGBASE_OFFSET 0x600
index 554e7cccff53396c9e59c3086eb95b71441fde0d..f424a543755c6b9e6b15e229e1531ce1bd031795 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
+#include "ehci.h"
 #include "hardware.h"
 
 #define USBCTRL_OTGBASE_OFFSET 0x600
index e49710b10c68a2791026bcf97edd8b7128d071bc..74bfdd970bfeae6de3f4b429b2f9f03a6be8e774 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
+#include "ehci.h"
 #include "hardware.h"
 
 #define MXC_OTG_OFFSET                 0
diff --git a/arch/arm/mach-imx/ehci.h b/arch/arm/mach-imx/ehci.h
new file mode 100644 (file)
index 0000000..4f42ca3
--- /dev/null
@@ -0,0 +1,50 @@
+#ifndef __MACH_IMX_EHCI_H
+#define __MACH_IMX_EHCI_H
+
+/* values for portsc field */
+#define MXC_EHCI_PHY_LOW_POWER_SUSPEND (1 << 23)
+#define MXC_EHCI_FORCE_FS              (1 << 24)
+#define MXC_EHCI_UTMI_8BIT             (0 << 28)
+#define MXC_EHCI_UTMI_16BIT            (1 << 28)
+#define MXC_EHCI_SERIAL                        (1 << 29)
+#define MXC_EHCI_MODE_UTMI             (0 << 30)
+#define MXC_EHCI_MODE_PHILIPS          (1 << 30)
+#define MXC_EHCI_MODE_ULPI             (2 << 30)
+#define MXC_EHCI_MODE_SERIAL           (3 << 30)
+
+/* values for flags field */
+#define MXC_EHCI_INTERFACE_DIFF_UNI    (0 << 0)
+#define MXC_EHCI_INTERFACE_DIFF_BI     (1 << 0)
+#define MXC_EHCI_INTERFACE_SINGLE_UNI  (2 << 0)
+#define MXC_EHCI_INTERFACE_SINGLE_BI   (3 << 0)
+#define MXC_EHCI_INTERFACE_MASK                (0xf)
+
+#define MXC_EHCI_POWER_PINS_ENABLED    (1 << 5)
+#define MXC_EHCI_PWR_PIN_ACTIVE_HIGH   (1 << 6)
+#define MXC_EHCI_OC_PIN_ACTIVE_LOW     (1 << 7)
+#define MXC_EHCI_TTL_ENABLED           (1 << 8)
+
+#define MXC_EHCI_INTERNAL_PHY          (1 << 9)
+#define MXC_EHCI_IPPUE_DOWN            (1 << 10)
+#define MXC_EHCI_IPPUE_UP              (1 << 11)
+#define MXC_EHCI_WAKEUP_ENABLED                (1 << 12)
+#define MXC_EHCI_ITC_NO_THRESHOLD      (1 << 13)
+
+#define MXC_USBCTRL_OFFSET             0
+#define MXC_USB_PHY_CTR_FUNC_OFFSET    0x8
+#define MXC_USB_PHY_CTR_FUNC2_OFFSET   0xc
+#define MXC_USBH2CTRL_OFFSET           0x14
+
+#define MX5_USBOTHER_REGS_OFFSET       0x800
+
+/* USB_PHY_CTRL_FUNC2*/
+#define MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK              0x3
+#define MX5_USB_UTMI_PHYCTRL1_PLLDIV_SHIFT             0
+
+int mx51_initialize_usb_hw(int port, unsigned int flags);
+int mx25_initialize_usb_hw(int port, unsigned int flags);
+int mx31_initialize_usb_hw(int port, unsigned int flags);
+int mx35_initialize_usb_hw(int port, unsigned int flags);
+int mx27_initialize_usb_hw(int port, unsigned int flags);
+
+#endif /* __MACH_IMX_EHCI_H */
index 39406b7e3228daf9b1e68c18ec3f29f1c1ad1474..a7e9bd26a5521991e324aee0e9571c4c9d82774d 100644 (file)
@@ -50,6 +50,7 @@
 #include "common.h"
 #include "devices-imx31.h"
 #include "crmregs-imx3.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
index 75b7b6aa2720609b41e0665d0ac2df3d4040b06b..e6d4b992957161b6ef01d7a8797d6905de09db10 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "common.h"
 #include "devices-imx27.h"
+#include "ehci.h"
 #include "eukrea-baseboards.h"
 #include "hardware.h"
 #include "iomux-mx27.h"
index 1ffa27169045b0fc2ddbfa094a6a29d003670bc9..62a6e02f476318593171c38fe5c5c5b80fab1bec 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "common.h"
 #include "devices-imx35.h"
+#include "ehci.h"
 #include "eukrea-baseboards.h"
 #include "hardware.h"
 #include "iomux-mx35.h"
index e978dda1434cc2269efcfed4b4f36c3084ec5b6f..b2ee6e009fe44aef0bf3bfdb9a9c1cb7c7f71ecf 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "common.h"
 #include "devices-imx25.h"
+#include "ehci.h"
 #include "eukrea-baseboards.h"
 #include "hardware.h"
 #include "iomux-mx25.h"
index b61bd8ed556830cf3bcb6e708ede8c57fe8529df..ede2bdbb5dd50f78b43675cbd136fdcbc9422abf 100644 (file)
@@ -43,6 +43,7 @@
 
 #include "common.h"
 #include "devices-imx27.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx27.h"
 
index ea1fa199c1488d07d8785d02287ec5179523d806..0d01e367b062cdf464821336fce410036bdd0914 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "common.h"
 #include "devices-imx25.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx25.h"
 #include "mx25.h"
index 435a5428a6783b25ea0b7604d4d0a5e527d4f011..9ef4640f3660663dd5fb5eb0f61a38b02e715f8d 100644 (file)
@@ -40,6 +40,7 @@
 #include "3ds_debugboard.h"
 #include "common.h"
 #include "devices-imx27.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx27.h"
 #include "ulpi.h"
index 4217871a9653f67daa596e8a6b0bb724e1325173..453f41a2c5a97b5ee7e08d566dcd9e71f887c647 100644 (file)
@@ -40,6 +40,7 @@
 #include "3ds_debugboard.h"
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
index eee042fa2768e1f095df4643fc2b64dbc01ac405..e9549a3c0223e849b9bbe6f2009d42405b72d1dc 100644 (file)
@@ -45,6 +45,7 @@
 #include "board-mx31lilly.h"
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
index fa15d0b6118d8a7befd3ce6bd4b1334278be23da..57eac6f45fab015021830fdd07f7a791b7c90cc2 100644 (file)
@@ -42,6 +42,7 @@
 #include "board-mx31lite.h"
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
index 08730f238449677e7706d5560ac47f5eb2246886..6bed57040973ebd4fbc2f14c9236efad1d4f45b8 100644 (file)
@@ -47,6 +47,7 @@
 #include "board-mx31moboard.h"
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
index 4e8b184d773b8f2f5c12aa064aa7e4296d605eba..72cd77d21f638c82f62736c75ab4d43e151277a9 100644 (file)
@@ -50,6 +50,7 @@
 #include "3ds_debugboard.h"
 #include "common.h"
 #include "devices-imx35.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx35.h"
 
index 12212378c67262f5de447ce8916a580d31b69553..2d1c50bd8bdfbd68f4594f20723fb7da2dc1eeda 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "common.h"
 #include "devices-imx27.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx27.h"
 #include "ulpi.h"
index 81b8affb9448378165e08dcf76becc7913a9ffd8..8eb1570f7851f1452c5d6dee41ae226e1d335c4a 100644 (file)
@@ -45,6 +45,7 @@
 
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "pcm037.h"
index 6c56fb5553c77ff4975951ad394de955e53d3c43..ee862ad6b6fc9585651e5983a339382fa2af515e 100644 (file)
@@ -36,6 +36,7 @@
 #include "board-pcm038.h"
 #include "common.h"
 #include "devices-imx27.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx27.h"
 #include "ulpi.h"
index c62b5d2613452cfbf50b05924bc5735a0f9cc451..b623bcaca76ca92624effb5fe780c3f67e0c89ae 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "common.h"
 #include "devices-imx35.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx35.h"
 #include "ulpi.h"
index 872b3c6ba408e63beed62c343c859eae9729fa8d..97836e94451c471e50033aef17599bad80413585 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "common.h"
 #include "devices-imx35.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx35.h"
 
index 52d5b1574721adf5b2e7518bc5bb62b236c6171c..1e4ea1640a2af9031bb693ab5d8b652f7702fe6a 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
index a4f43e90f3c12afe42b9db69f3b4f038838a133c..699d01a4fef8dd9bbb5207d93f7c588103e52dcd 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
index 04ae45dbfaa724a3bae40d11a8e3106239069ae0..4b3d66eb8d34a57a7ed1b1f84b5617ebcf06550c 100644 (file)
@@ -28,6 +28,7 @@
 #include "board-mx31moboard.h"
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
index 7eb9d13296719a81f9d2bf03622acf1a83add3a1..157e71f79f9901bade8330338e3dee408de862fc 100644 (file)
@@ -1,46 +1,6 @@
 #ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H
 #define __INCLUDE_ASM_ARCH_MXC_EHCI_H
 
-/* values for portsc field */
-#define MXC_EHCI_PHY_LOW_POWER_SUSPEND (1 << 23)
-#define MXC_EHCI_FORCE_FS              (1 << 24)
-#define MXC_EHCI_UTMI_8BIT             (0 << 28)
-#define MXC_EHCI_UTMI_16BIT            (1 << 28)
-#define MXC_EHCI_SERIAL                        (1 << 29)
-#define MXC_EHCI_MODE_UTMI             (0 << 30)
-#define MXC_EHCI_MODE_PHILIPS          (1 << 30)
-#define MXC_EHCI_MODE_ULPI             (2 << 30)
-#define MXC_EHCI_MODE_SERIAL           (3 << 30)
-
-/* values for flags field */
-#define MXC_EHCI_INTERFACE_DIFF_UNI    (0 << 0)
-#define MXC_EHCI_INTERFACE_DIFF_BI     (1 << 0)
-#define MXC_EHCI_INTERFACE_SINGLE_UNI  (2 << 0)
-#define MXC_EHCI_INTERFACE_SINGLE_BI   (3 << 0)
-#define MXC_EHCI_INTERFACE_MASK                (0xf)
-
-#define MXC_EHCI_POWER_PINS_ENABLED    (1 << 5)
-#define MXC_EHCI_PWR_PIN_ACTIVE_HIGH   (1 << 6)
-#define MXC_EHCI_OC_PIN_ACTIVE_LOW     (1 << 7)
-#define MXC_EHCI_TTL_ENABLED           (1 << 8)
-
-#define MXC_EHCI_INTERNAL_PHY          (1 << 9)
-#define MXC_EHCI_IPPUE_DOWN            (1 << 10)
-#define MXC_EHCI_IPPUE_UP              (1 << 11)
-#define MXC_EHCI_WAKEUP_ENABLED                (1 << 12)
-#define MXC_EHCI_ITC_NO_THRESHOLD      (1 << 13)
-
-#define MXC_USBCTRL_OFFSET             0
-#define MXC_USB_PHY_CTR_FUNC_OFFSET    0x8
-#define MXC_USB_PHY_CTR_FUNC2_OFFSET   0xc
-#define MXC_USBH2CTRL_OFFSET           0x14
-
-#define MX5_USBOTHER_REGS_OFFSET       0x800
-
-/* USB_PHY_CTRL_FUNC2*/
-#define MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK              0x3
-#define MX5_USB_UTMI_PHYCTRL1_PLLDIV_SHIFT             0
-
 struct mxc_usbh_platform_data {
        int (*init)(struct platform_device *pdev);
        int (*exit)(struct platform_device *pdev);
@@ -49,11 +9,5 @@ struct mxc_usbh_platform_data {
        struct usb_phy          *otg;
 };
 
-int mx51_initialize_usb_hw(int port, unsigned int flags);
-int mx25_initialize_usb_hw(int port, unsigned int flags);
-int mx31_initialize_usb_hw(int port, unsigned int flags);
-int mx35_initialize_usb_hw(int port, unsigned int flags);
-int mx27_initialize_usb_hw(int port, unsigned int flags);
-
 #endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */