diff options
Diffstat (limited to 'arch/arm/mach-mx5')
-rw-r--r-- | arch/arm/mach-mx5/devices.c | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c index d6fd3961ade9..5070ae1f94c6 100644 --- a/arch/arm/mach-mx5/devices.c +++ b/arch/arm/mach-mx5/devices.c | |||
@@ -1,5 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright 2009 Amit Kucheria <amit.kucheria@canonical.com> | 2 | * Copyright 2009 Amit Kucheria <amit.kucheria@canonical.com> |
3 | * Copyright (C) 2010 Freescale Semiconductor, Inc. | ||
3 | * | 4 | * |
4 | * The code contained herein is licensed under the GNU General Public | 5 | * The code contained herein is licensed under the GNU General Public |
5 | * License. You may obtain a copy of the GNU General Public License | 6 | * License. You may obtain a copy of the GNU General Public License |
@@ -10,8 +11,10 @@ | |||
10 | */ | 11 | */ |
11 | 12 | ||
12 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/gpio.h> | ||
13 | #include <mach/hardware.h> | 15 | #include <mach/hardware.h> |
14 | #include <mach/imx-uart.h> | 16 | #include <mach/imx-uart.h> |
17 | #include <mach/irqs.h> | ||
15 | 18 | ||
16 | static struct resource uart0[] = { | 19 | static struct resource uart0[] = { |
17 | { | 20 | { |
@@ -89,8 +92,34 @@ struct platform_device mxc_fec_device = { | |||
89 | .resource = mxc_fec_resources, | 92 | .resource = mxc_fec_resources, |
90 | }; | 93 | }; |
91 | 94 | ||
92 | /* Dummy definition to allow compiling in AVIC and TZIC simultaneously */ | 95 | static struct mxc_gpio_port mxc_gpio_ports[] = { |
96 | { | ||
97 | .chip.label = "gpio-0", | ||
98 | .base = MX51_IO_ADDRESS(MX51_GPIO1_BASE_ADDR), | ||
99 | .irq = MX51_MXC_INT_GPIO1_LOW, | ||
100 | .virtual_irq_start = MXC_GPIO_IRQ_START | ||
101 | }, | ||
102 | { | ||
103 | .chip.label = "gpio-1", | ||
104 | .base = MX51_IO_ADDRESS(MX51_GPIO2_BASE_ADDR), | ||
105 | .irq = MX51_MXC_INT_GPIO2_LOW, | ||
106 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32 * 1 | ||
107 | }, | ||
108 | { | ||
109 | .chip.label = "gpio-2", | ||
110 | .base = MX51_IO_ADDRESS(MX51_GPIO3_BASE_ADDR), | ||
111 | .irq = MX51_MXC_INT_GPIO3_LOW, | ||
112 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32 * 2 | ||
113 | }, | ||
114 | { | ||
115 | .chip.label = "gpio-3", | ||
116 | .base = MX51_IO_ADDRESS(MX51_GPIO4_BASE_ADDR), | ||
117 | .irq = MX51_MXC_INT_GPIO4_LOW, | ||
118 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32 * 3 | ||
119 | }, | ||
120 | }; | ||
121 | |||
93 | int __init mxc_register_gpios(void) | 122 | int __init mxc_register_gpios(void) |
94 | { | 123 | { |
95 | return 0; | 124 | return mxc_gpio_init(mxc_gpio_ports, ARRAY_SIZE(mxc_gpio_ports)); |
96 | } | 125 | } |