diff options
Diffstat (limited to 'arch/arm/mach-mx3/devices.c')
-rw-r--r-- | arch/arm/mach-mx3/devices.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index 1bc6d23a1d58..5c0320fce5b6 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/serial.h> | 22 | #include <linux/serial.h> |
23 | #include <linux/gpio.h> | ||
23 | #include <asm/hardware.h> | 24 | #include <asm/hardware.h> |
24 | #include <asm/arch/imx-uart.h> | 25 | #include <asm/arch/imx-uart.h> |
25 | 26 | ||
@@ -151,3 +152,29 @@ int __init imx_init_uart(int uart_no, struct imxuart_platform_data *pdata) | |||
151 | return 0; | 152 | return 0; |
152 | } | 153 | } |
153 | 154 | ||
155 | /* GPIO port description */ | ||
156 | static struct mxc_gpio_port imx_gpio_ports[] = { | ||
157 | [0] = { | ||
158 | .chip.label = "gpio-0", | ||
159 | .base = IO_ADDRESS(GPIO1_BASE_ADDR), | ||
160 | .irq = MXC_INT_GPIO1, | ||
161 | .virtual_irq_start = MXC_GPIO_INT_BASE | ||
162 | }, | ||
163 | [1] = { | ||
164 | .chip.label = "gpio-1", | ||
165 | .base = IO_ADDRESS(GPIO2_BASE_ADDR), | ||
166 | .irq = MXC_INT_GPIO2, | ||
167 | .virtual_irq_start = MXC_GPIO_INT_BASE + GPIO_NUM_PIN | ||
168 | }, | ||
169 | [2] = { | ||
170 | .chip.label = "gpio-2", | ||
171 | .base = IO_ADDRESS(GPIO3_BASE_ADDR), | ||
172 | .irq = MXC_INT_GPIO3, | ||
173 | .virtual_irq_start = MXC_GPIO_INT_BASE + GPIO_NUM_PIN * 2 | ||
174 | } | ||
175 | }; | ||
176 | |||
177 | int __init mxc_register_gpios(void) | ||
178 | { | ||
179 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); | ||
180 | } | ||