diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-02-17 14:43:48 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-03-07 19:29:37 +0100 |
commit | 5ae30b477e9fb7319e2976fbf3521c0fac2625f1 (patch) | |
tree | e9c943a384e61b4552175e35a981bdf2316baba2 /arch/arm/mach-imx | |
parent | MX1: Add structure, registration functions for framebuffer and rename LCDC INT (diff) | |
download | linux-5ae30b477e9fb7319e2976fbf3521c0fac2625f1.tar.xz linux-5ae30b477e9fb7319e2976fbf3521c0fac2625f1.zip |
ARM i.MX: Move gpio initialization to SoC specific files
This saves us from soc level dispatching in generic files
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/mm-imx1.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-imx/mm-imx21.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-imx/mm-imx25.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-imx/mm-imx27.c | 13 |
4 files changed, 40 insertions, 8 deletions
diff --git a/arch/arm/mach-imx/mm-imx1.c b/arch/arm/mach-imx/mm-imx1.c index 378c61b1e74c..8613e440e48c 100644 --- a/arch/arm/mach-imx/mm-imx1.c +++ b/arch/arm/mach-imx/mm-imx1.c @@ -23,6 +23,8 @@ #include <mach/common.h> #include <mach/hardware.h> +#include <mach/gpio.h> +#include <mach/irqs.h> static struct map_desc imx_io_desc[] __initdata = { imx_map_entry(MX1, IO, MT_DEVICE), @@ -39,10 +41,15 @@ void __init imx1_init_early(void) mxc_arch_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR)); } -int imx1_register_gpios(void); +static struct mxc_gpio_port imx1_gpio_ports[] = { + DEFINE_IMX_GPIO_PORT_IRQ(MX1, 0, 1, MX1_GPIO_INT_PORTA), + DEFINE_IMX_GPIO_PORT_IRQ(MX1, 1, 2, MX1_GPIO_INT_PORTB), + DEFINE_IMX_GPIO_PORT_IRQ(MX1, 2, 3, MX1_GPIO_INT_PORTC), + DEFINE_IMX_GPIO_PORT_IRQ(MX1, 3, 4, MX1_GPIO_INT_PORTD), +}; void __init mx1_init_irq(void) { mxc_init_irq(MX1_IO_ADDRESS(MX1_AVIC_BASE_ADDR)); - imx1_register_gpios(); + mxc_gpio_init(imx1_gpio_ports, ARRAY_SIZE(imx1_gpio_ports)); } diff --git a/arch/arm/mach-imx/mm-imx21.c b/arch/arm/mach-imx/mm-imx21.c index b6152c6b5b29..6027e35ebfdb 100644 --- a/arch/arm/mach-imx/mm-imx21.c +++ b/arch/arm/mach-imx/mm-imx21.c @@ -24,6 +24,8 @@ #include <mach/common.h> #include <asm/pgtable.h> #include <asm/mach/map.h> +#include <mach/gpio.h> +#include <mach/irqs.h> /* MX21 memory map definition */ static struct map_desc imx21_io_desc[] __initdata = { @@ -65,10 +67,17 @@ void __init imx21_init_early(void) mxc_arch_reset_init(MX21_IO_ADDRESS(MX21_WDOG_BASE_ADDR)); } -int imx21_register_gpios(void); +static struct mxc_gpio_port imx21_gpio_ports[] = { + DEFINE_IMX_GPIO_PORT_IRQ(MX21, 0, 1, MX21_INT_GPIO), + DEFINE_IMX_GPIO_PORT(MX21, 1, 2), + DEFINE_IMX_GPIO_PORT(MX21, 2, 3), + DEFINE_IMX_GPIO_PORT(MX21, 3, 4), + DEFINE_IMX_GPIO_PORT(MX21, 4, 5), + DEFINE_IMX_GPIO_PORT(MX21, 5, 6), +}; void __init mx21_init_irq(void) { mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR)); - imx21_register_gpios(); + mxc_gpio_init(imx21_gpio_ports, ARRAY_SIZE(imx21_gpio_ports)); } diff --git a/arch/arm/mach-imx/mm-imx25.c b/arch/arm/mach-imx/mm-imx25.c index 09dd8d4e15bb..02f7b5c7fa8e 100644 --- a/arch/arm/mach-imx/mm-imx25.c +++ b/arch/arm/mach-imx/mm-imx25.c @@ -27,6 +27,8 @@ #include <mach/hardware.h> #include <mach/mx25.h> #include <mach/iomux-v3.h> +#include <mach/gpio.h> +#include <mach/irqs.h> /* * This table defines static virtual address mappings for I/O regions. @@ -55,11 +57,16 @@ void __init imx25_init_early(void) mxc_arch_reset_init(MX25_IO_ADDRESS(MX25_WDOG_BASE_ADDR)); } -int imx25_register_gpios(void); +static struct mxc_gpio_port imx25_gpio_ports[] = { + DEFINE_IMX_GPIO_PORT_IRQ(MX25, 0, 1, MX25_INT_GPIO1), + DEFINE_IMX_GPIO_PORT_IRQ(MX25, 1, 2, MX25_INT_GPIO2), + DEFINE_IMX_GPIO_PORT_IRQ(MX25, 2, 3, MX25_INT_GPIO3), + DEFINE_IMX_GPIO_PORT_IRQ(MX25, 3, 4, MX25_INT_GPIO4), +}; void __init mx25_init_irq(void) { mxc_init_irq(MX25_IO_ADDRESS(MX25_AVIC_BASE_ADDR)); - imx25_register_gpios(); + mxc_gpio_init(imx25_gpio_ports, ARRAY_SIZE(imx25_gpio_ports)); } diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c index bcaa3b69c456..e172e3ed3340 100644 --- a/arch/arm/mach-imx/mm-imx27.c +++ b/arch/arm/mach-imx/mm-imx27.c @@ -24,6 +24,8 @@ #include <mach/common.h> #include <asm/pgtable.h> #include <asm/mach/map.h> +#include <mach/gpio.h> +#include <mach/irqs.h> /* MX27 memory map definition */ static struct map_desc imx27_io_desc[] __initdata = { @@ -65,10 +67,17 @@ void __init imx27_init_early(void) mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR)); } -int imx27_register_gpios(void); +static struct mxc_gpio_port imx27_gpio_ports[] = { + DEFINE_IMX_GPIO_PORT_IRQ(MX27, 0, 1, MX27_INT_GPIO), + DEFINE_IMX_GPIO_PORT(MX27, 1, 2), + DEFINE_IMX_GPIO_PORT(MX27, 2, 3), + DEFINE_IMX_GPIO_PORT(MX27, 3, 4), + DEFINE_IMX_GPIO_PORT(MX27, 4, 5), + DEFINE_IMX_GPIO_PORT(MX27, 5, 6), +}; void __init mx27_init_irq(void) { mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); - imx27_register_gpios(); + mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports)); } |