[PATCH v2 08/11] ARM i.MX35: add imx-gpio devices

Steffen Trumtrar s.trumtrar at pengutronix.de
Mon Sep 3 04:18:15 EDT 2012


Signed-off-by: Steffen Trumtrar <s.trumtrar at pengutronix.de>
---
 arch/arm/mach-imx/Kconfig |    1 +
 arch/arm/mach-imx/imx35.c |   12 ++++--------
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 129960f..f06788d 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -176,6 +176,7 @@ config ARCH_IMX31
 config ARCH_IMX35
 	bool "i.MX35"
 	select CPU_V6
+	select GPIOLIB
 	select ARCH_HAS_FEC_IMX
 
 config ARCH_IMX51
diff --git a/arch/arm/mach-imx/imx35.c b/arch/arm/mach-imx/imx35.c
index fe0c99e..7bc5401 100644
--- a/arch/arm/mach-imx/imx35.c
+++ b/arch/arm/mach-imx/imx35.c
@@ -25,14 +25,6 @@
 
 #include "gpio.h"
 
-void *imx_gpio_base[] = {
-	(void *)0x53fcc000,
-	(void *)0x53fd0000,
-	(void *)0x53fa4000,
-};
-
-int imx_gpio_count = ARRAY_SIZE(imx_gpio_base) * 32;
-
 int imx_silicon_revision()
 {
 	uint32_t reg;
@@ -66,6 +58,10 @@ static int imx35_init(void)
 	add_generic_device("imx_iim", 0, NULL, IMX_IIM_BASE, SZ_4K,
 			IORESOURCE_MEM, NULL);
 
+	add_generic_device("imx-gpio", 0, NULL, 0x53fcc000, 0x1000, IORESOURCE_MEM, NULL);
+	add_generic_device("imx-gpio", 1, NULL, 0x53fd0000, 0x1000, IORESOURCE_MEM, NULL);
+	add_generic_device("imx-gpio", 2, NULL, 0x53fa4000, 0x1000, IORESOURCE_MEM, NULL);
+
 	return 0;
 }
 coredevice_initcall(imx35_init);
-- 
1.7.10.4




More information about the barebox mailing list