[PATCH v2 09/11] ARM i.MX51: add imx-gpio devices
Steffen Trumtrar
s.trumtrar at pengutronix.de
Mon Sep 3 04:18:16 EDT 2012
Signed-off-by: Steffen Trumtrar <s.trumtrar at pengutronix.de>
---
arch/arm/mach-imx/Kconfig | 1 +
arch/arm/mach-imx/imx51.c | 14 +++++---------
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index f06788d..9d7b931 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -182,6 +182,7 @@ config ARCH_IMX35
config ARCH_IMX51
bool "i.MX51"
select CPU_V7
+ select GPIOLIB
select ARCH_HAS_FEC_IMX
config ARCH_IMX53
diff --git a/arch/arm/mach-imx/imx51.c b/arch/arm/mach-imx/imx51.c
index 53205a9..aa54990 100644
--- a/arch/arm/mach-imx/imx51.c
+++ b/arch/arm/mach-imx/imx51.c
@@ -26,15 +26,6 @@
#include "gpio.h"
-void *imx_gpio_base[] = {
- (void *)MX51_GPIO1_BASE_ADDR,
- (void *)MX51_GPIO2_BASE_ADDR,
- (void *)MX51_GPIO3_BASE_ADDR,
- (void *)MX51_GPIO4_BASE_ADDR,
-};
-
-int imx_gpio_count = ARRAY_SIZE(imx_gpio_base) * 32;
-
#define SI_REV 0x48
static u32 mx51_silicon_revision;
@@ -89,6 +80,11 @@ static int imx51_init(void)
add_generic_device("imx_iim", 0, NULL, MX51_IIM_BASE_ADDR, SZ_4K,
IORESOURCE_MEM, NULL);
+ add_generic_device("imx-gpio", 0, NULL, 0x73f84000, 0x1000, IORESOURCE_MEM, NULL);
+ add_generic_device("imx-gpio", 1, NULL, 0x73f88000, 0x1000, IORESOURCE_MEM, NULL);
+ add_generic_device("imx-gpio", 2, NULL, 0x73f8c000, 0x1000, IORESOURCE_MEM, NULL);
+ add_generic_device("imx-gpio", 3, NULL, 0x73f90000, 0x1000, IORESOURCE_MEM, NULL);
+
return 0;
}
coredevice_initcall(imx51_init);
--
1.7.10.4
More information about the barebox
mailing list