diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2010-12-08 00:37:55 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@stericsson.com> | 2010-12-08 07:25:00 -0500 |
commit | 01afdd1353ca83904f430be4f6202d1a20912f4d (patch) | |
tree | ffcd53087d10ec63bd42fe3e95ac93cd7e9f4a2a /arch/arm/mach-ux500/cpu-db8500.c | |
parent | 8d568ae5362c00c5b0b8e61bceb1829c8051002e (diff) |
ux500: rework gpio registration
Rework gpio registration to remove build-time
changing macros.
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/cpu-db8500.c')
-rw-r--r-- | arch/arm/mach-ux500/cpu-db8500.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index b78970c08ebc..658384c86933 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -25,15 +25,6 @@ | |||
25 | #include "devices-db8500.h" | 25 | #include "devices-db8500.h" |
26 | 26 | ||
27 | static struct platform_device *platform_devs[] __initdata = { | 27 | static struct platform_device *platform_devs[] __initdata = { |
28 | &u8500_gpio_devs[0], | ||
29 | &u8500_gpio_devs[1], | ||
30 | &u8500_gpio_devs[2], | ||
31 | &u8500_gpio_devs[3], | ||
32 | &u8500_gpio_devs[4], | ||
33 | &u8500_gpio_devs[5], | ||
34 | &u8500_gpio_devs[6], | ||
35 | &u8500_gpio_devs[7], | ||
36 | &u8500_gpio_devs[8], | ||
37 | &u8500_dma40_device, | 28 | &u8500_dma40_device, |
38 | }; | 29 | }; |
39 | 30 | ||
@@ -141,6 +132,28 @@ void __init u8500_map_io(void) | |||
141 | get_db8500_asic_id(); | 132 | get_db8500_asic_id(); |
142 | } | 133 | } |
143 | 134 | ||
135 | static resource_size_t __initdata db8500_gpio_base[] = { | ||
136 | U8500_GPIOBANK0_BASE, | ||
137 | U8500_GPIOBANK1_BASE, | ||
138 | U8500_GPIOBANK2_BASE, | ||
139 | U8500_GPIOBANK3_BASE, | ||
140 | U8500_GPIOBANK4_BASE, | ||
141 | U8500_GPIOBANK5_BASE, | ||
142 | U8500_GPIOBANK6_BASE, | ||
143 | U8500_GPIOBANK7_BASE, | ||
144 | U8500_GPIOBANK8_BASE, | ||
145 | }; | ||
146 | |||
147 | static void __init db8500_add_gpios(void) | ||
148 | { | ||
149 | struct nmk_gpio_platform_data pdata = { | ||
150 | /* No custom data yet */ | ||
151 | }; | ||
152 | |||
153 | dbx500_add_gpios(ARRAY_AND_SIZE(db8500_gpio_base), | ||
154 | IRQ_DB8500_GPIO0, &pdata); | ||
155 | } | ||
156 | |||
144 | /* | 157 | /* |
145 | * This function is called from the board init | 158 | * This function is called from the board init |
146 | */ | 159 | */ |
@@ -164,6 +177,7 @@ void __init u8500_init_devices(void) | |||
164 | dma40_u8500ed_fixup(); | 177 | dma40_u8500ed_fixup(); |
165 | 178 | ||
166 | db8500_add_rtc(); | 179 | db8500_add_rtc(); |
180 | db8500_add_gpios(); | ||
167 | 181 | ||
168 | platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); | 182 | platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); |
169 | 183 | ||