[PATCH 3/3] i.MX25 & 35 usb config bits : create mach/usb.h

Eric Bénard eric at eukrea.com
Wed Oct 20 09:40:17 EDT 2010


as suggested by Baruch Siach

Signed-off-by: Eric Bénard <eric at eukrea.com>
---
 arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c |   11 +----------
 arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c |   11 +----------
 arch/arm/mach-imx/include/mach/usb.h              |   14 ++++++++++++++
 3 files changed, 16 insertions(+), 20 deletions(-)
 create mode 100644 arch/arm/mach-imx/include/mach/usb.h

diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
index c2eb398..805ffe2 100644
--- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
+++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
@@ -42,6 +42,7 @@
 #include <mach/iomux-mx25.h>
 #include <i2c/i2c.h>
 #include <usb/fsl_usb2.h>
+#include <mach/usb.h>
 
 extern unsigned long _stext;
 extern void exception_vectors(void);
@@ -165,16 +166,6 @@ static struct device_d esdhc_dev = {
 };
 
 #ifdef CONFIG_USB
-
-#define MX35_H1_SIC_SHIFT	21
-#define MX35_H1_SIC_MASK	(0x3 << MX35_H1_SIC_SHIFT)
-#define MX35_H1_PM_BIT		(1 << 8)
-#define MX35_H1_IPPUE_UP_BIT	(1 << 7)
-#define MX35_H1_IPPUE_DOWN_BIT	(1 << 6)
-#define MX35_H1_TLL_BIT		(1 << 5)
-#define MX35_H1_USBTE_BIT	(1 << 4)
-#define MXC_EHCI_INTERFACE_SINGLE_UNI	(2 << 0)
-
 static void imx25_usb_init(void)
 {
 	unsigned int tmp;
diff --git a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
index 7d85f97..dfe64d0 100644
--- a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
+++ b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
@@ -53,6 +53,7 @@
 #include <mach/imx-pll.h>
 #include <i2c/i2c.h>
 #include <usb/fsl_usb2.h>
+#include <mach/usb.h>
 
 static struct fec_platform_data fec_info = {
 	.xcv_type	= MII100,
@@ -140,16 +141,6 @@ static struct device_d esdhc_dev = {
 };
 
 #ifdef CONFIG_USB
-
-#define MX35_H1_SIC_SHIFT	21
-#define MX35_H1_SIC_MASK	(0x3 << MX35_H1_SIC_SHIFT)
-#define MX35_H1_PM_BIT		(1 << 8)
-#define MX35_H1_IPPUE_UP_BIT	(1 << 7)
-#define MX35_H1_IPPUE_DOWN_BIT	(1 << 6)
-#define MX35_H1_TLL_BIT		(1 << 5)
-#define MX35_H1_USBTE_BIT	(1 << 4)
-#define MXC_EHCI_INTERFACE_SINGLE_UNI	(2 << 0)
-
 static void imx35_usb_init(void)
 {
 	unsigned int tmp;
diff --git a/arch/arm/mach-imx/include/mach/usb.h b/arch/arm/mach-imx/include/mach/usb.h
new file mode 100644
index 0000000..5d6670d
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/usb.h
@@ -0,0 +1,14 @@
+#ifndef __MACH_USB_H_
+#define __MACH_USB_H_
+
+/* configuration bits for i.MX25 and i.MX35 */
+#define MX35_H1_SIC_SHIFT	21
+#define MX35_H1_SIC_MASK	(0x3 << MX35_H1_SIC_SHIFT)
+#define MX35_H1_PM_BIT		(1 << 8)
+#define MX35_H1_IPPUE_UP_BIT	(1 << 7)
+#define MX35_H1_IPPUE_DOWN_BIT	(1 << 6)
+#define MX35_H1_TLL_BIT		(1 << 5)
+#define MX35_H1_USBTE_BIT	(1 << 4)
+#define MXC_EHCI_INTERFACE_SINGLE_UNI	(2 << 0)
+
+#endif /* __MACH_USB_H_*/
-- 
1.7.0.4




More information about the barebox mailing list