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/plat-mxc/include | |
parent | 9685a3609d7f15297987c511c323b43693317960 (diff) |
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/plat-mxc/include')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/gpio.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h index 0044e2f1bea..a2747f12813 100644 --- a/arch/arm/plat-mxc/include/mach/gpio.h +++ b/arch/arm/plat-mxc/include/mach/gpio.h @@ -46,6 +46,21 @@ struct mxc_gpio_port { spinlock_t lock; }; +#define DEFINE_IMX_GPIO_PORT_IRQ_HIGH(soc, _id, _hwid, _irq, _irq_high) \ + { \ + .chip.label = "gpio-" #_id, \ + .irq = _irq, \ + .irq_high = _irq_high, \ + .base = soc ## _IO_ADDRESS( \ + soc ## _GPIO ## _hwid ## _BASE_ADDR), \ + .virtual_irq_start = MXC_GPIO_IRQ_START + (_id) * 32, \ + } + +#define DEFINE_IMX_GPIO_PORT_IRQ(soc, _id, _hwid, _irq) \ + DEFINE_IMX_GPIO_PORT_IRQ_HIGH(soc, _id, _hwid, _irq, 0) +#define DEFINE_IMX_GPIO_PORT(soc, _id, _hwid) \ + DEFINE_IMX_GPIO_PORT_IRQ(soc, _id, _hwid, 0) + int mxc_gpio_init(struct mxc_gpio_port*, int); #endif |