diff options
Diffstat (limited to 'arch/arm/mach-omap1/board-voiceblue.c')
-rw-r--r-- | arch/arm/mach-omap1/board-voiceblue.c | 59 |
1 files changed, 24 insertions, 35 deletions
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 45a01311669a..c224f3c64235 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/irq.h> | ||
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
20 | #include <linux/notifier.h> | 21 | #include <linux/notifier.h> |
@@ -140,21 +141,12 @@ static struct omap_usb_config voiceblue_usb_config __initdata = { | |||
140 | .pins[2] = 6, | 141 | .pins[2] = 6, |
141 | }; | 142 | }; |
142 | 143 | ||
143 | static struct omap_mmc_config voiceblue_mmc_config __initdata = { | ||
144 | .mmc[0] = { | ||
145 | .enabled = 1, | ||
146 | .power_pin = 2, | ||
147 | .switch_pin = -1, | ||
148 | }, | ||
149 | }; | ||
150 | |||
151 | static struct omap_uart_config voiceblue_uart_config __initdata = { | 144 | static struct omap_uart_config voiceblue_uart_config __initdata = { |
152 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | 145 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), |
153 | }; | 146 | }; |
154 | 147 | ||
155 | static struct omap_board_config_kernel voiceblue_config[] = { | 148 | static struct omap_board_config_kernel voiceblue_config[] = { |
156 | { OMAP_TAG_USB, &voiceblue_usb_config }, | 149 | { OMAP_TAG_USB, &voiceblue_usb_config }, |
157 | { OMAP_TAG_MMC, &voiceblue_mmc_config }, | ||
158 | { OMAP_TAG_UART, &voiceblue_uart_config }, | 150 | { OMAP_TAG_UART, &voiceblue_uart_config }, |
159 | }; | 151 | }; |
160 | 152 | ||
@@ -168,29 +160,27 @@ static void __init voiceblue_init_irq(void) | |||
168 | static void __init voiceblue_init(void) | 160 | static void __init voiceblue_init(void) |
169 | { | 161 | { |
170 | /* Watchdog */ | 162 | /* Watchdog */ |
171 | omap_request_gpio(0); | 163 | gpio_request(0, "Watchdog"); |
172 | /* smc91x reset */ | 164 | /* smc91x reset */ |
173 | omap_request_gpio(7); | 165 | gpio_request(7, "SMC91x reset"); |
174 | omap_set_gpio_direction(7, 0); | 166 | gpio_direction_output(7, 1); |
175 | omap_set_gpio_dataout(7, 1); | ||
176 | udelay(2); /* wait at least 100ns */ | 167 | udelay(2); /* wait at least 100ns */ |
177 | omap_set_gpio_dataout(7, 0); | 168 | gpio_set_value(7, 0); |
178 | mdelay(50); /* 50ms until PHY ready */ | 169 | mdelay(50); /* 50ms until PHY ready */ |
179 | /* smc91x interrupt pin */ | 170 | /* smc91x interrupt pin */ |
180 | omap_request_gpio(8); | 171 | gpio_request(8, "SMC91x irq"); |
181 | /* 16C554 reset*/ | 172 | /* 16C554 reset*/ |
182 | omap_request_gpio(6); | 173 | gpio_request(6, "16C554 reset"); |
183 | omap_set_gpio_direction(6, 0); | 174 | gpio_direction_output(6, 0); |
184 | omap_set_gpio_dataout(6, 0); | ||
185 | /* 16C554 interrupt pins */ | 175 | /* 16C554 interrupt pins */ |
186 | omap_request_gpio(12); | 176 | gpio_request(12, "16C554 irq"); |
187 | omap_request_gpio(13); | 177 | gpio_request(13, "16C554 irq"); |
188 | omap_request_gpio(14); | 178 | gpio_request(14, "16C554 irq"); |
189 | omap_request_gpio(15); | 179 | gpio_request(15, "16C554 irq"); |
190 | set_irq_type(OMAP_GPIO_IRQ(12), IRQ_TYPE_EDGE_RISING); | 180 | set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING); |
191 | set_irq_type(OMAP_GPIO_IRQ(13), IRQ_TYPE_EDGE_RISING); | 181 | set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING); |
192 | set_irq_type(OMAP_GPIO_IRQ(14), IRQ_TYPE_EDGE_RISING); | 182 | set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING); |
193 | set_irq_type(OMAP_GPIO_IRQ(15), IRQ_TYPE_EDGE_RISING); | 183 | set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING); |
194 | 184 | ||
195 | platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices)); | 185 | platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices)); |
196 | omap_board_config = voiceblue_config; | 186 | omap_board_config = voiceblue_config; |
@@ -244,19 +234,18 @@ static int wdt_gpio_state; | |||
244 | 234 | ||
245 | void voiceblue_wdt_enable(void) | 235 | void voiceblue_wdt_enable(void) |
246 | { | 236 | { |
247 | omap_set_gpio_direction(0, 0); | 237 | gpio_direction_output(0, 0); |
248 | omap_set_gpio_dataout(0, 0); | 238 | gpio_set_value(0, 1); |
249 | omap_set_gpio_dataout(0, 1); | 239 | gpio_set_value(0, 0); |
250 | omap_set_gpio_dataout(0, 0); | ||
251 | wdt_gpio_state = 0; | 240 | wdt_gpio_state = 0; |
252 | } | 241 | } |
253 | 242 | ||
254 | void voiceblue_wdt_disable(void) | 243 | void voiceblue_wdt_disable(void) |
255 | { | 244 | { |
256 | omap_set_gpio_dataout(0, 0); | 245 | gpio_set_value(0, 0); |
257 | omap_set_gpio_dataout(0, 1); | 246 | gpio_set_value(0, 1); |
258 | omap_set_gpio_dataout(0, 0); | 247 | gpio_set_value(0, 0); |
259 | omap_set_gpio_direction(0, 1); | 248 | gpio_direction_input(0); |
260 | } | 249 | } |
261 | 250 | ||
262 | void voiceblue_wdt_ping(void) | 251 | void voiceblue_wdt_ping(void) |
@@ -265,7 +254,7 @@ void voiceblue_wdt_ping(void) | |||
265 | return; | 254 | return; |
266 | 255 | ||
267 | wdt_gpio_state = !wdt_gpio_state; | 256 | wdt_gpio_state = !wdt_gpio_state; |
268 | omap_set_gpio_dataout(0, wdt_gpio_state); | 257 | gpio_set_value(0, wdt_gpio_state); |
269 | } | 258 | } |
270 | 259 | ||
271 | void voiceblue_reset(void) | 260 | void voiceblue_reset(void) |