diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-09-03 10:18:09 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-09-04 21:01:05 +0200 |
commit | b395e8bfb08444a5dbc391e64e0b8e2358906093 (patch) | |
tree | a8c20a578efcc05bbe7cfd66c8a22166ae6ec397 /arch/arm/mach-imx/imx27.c | |
parent | 2f8fe263824151b55487f701718ac4467240ad7a (diff) | |
download | barebox-b395e8bfb08444a5dbc391e64e0b8e2358906093.tar.gz barebox-b395e8bfb08444a5dbc391e64e0b8e2358906093.tar.xz |
ARM i.MX: switch to gpiolib support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/imx27.c')
-rw-r--r-- | arch/arm/mach-imx/imx27.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/arch/arm/mach-imx/imx27.c b/arch/arm/mach-imx/imx27.c index 1af291d33a..c6e6942c58 100644 --- a/arch/arm/mach-imx/imx27.c +++ b/arch/arm/mach-imx/imx27.c @@ -21,24 +21,11 @@ #include <init.h> #include <io.h> -#include "gpio.h" - int imx_silicon_revision(void) { return CID >> 28; } -void *imx_gpio_base[] = { - (void *)0x10015000, - (void *)0x10015100, - (void *)0x10015200, - (void *)0x10015300, - (void *)0x10015400, - (void *)0x10015500, -}; - -int imx_gpio_count = ARRAY_SIZE(imx_gpio_base) * 32; - /* * Initialize MAX on i.MX27. necessary to give the DMA engine * higher priority to the memory than the CPU. Needed for proper @@ -86,6 +73,12 @@ static int imx27_init(void) imx27_init_max(); + add_generic_device("imx-gpio", 0, NULL, 0x10015000, 0x100, IORESOURCE_MEM, NULL); + add_generic_device("imx-gpio", 1, NULL, 0x10015100, 0x100, IORESOURCE_MEM, NULL); + add_generic_device("imx-gpio", 2, NULL, 0x10015200, 0x100, IORESOURCE_MEM, NULL); + add_generic_device("imx-gpio", 3, NULL, 0x10015300, 0x100, IORESOURCE_MEM, NULL); + add_generic_device("imx-gpio", 4, NULL, 0x10015400, 0x100, IORESOURCE_MEM, NULL); + add_generic_device("imx-gpio", 5, NULL, 0x10015500, 0x100, IORESOURCE_MEM, NULL); return 0; } coredevice_initcall(imx27_init); |