aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-voiceblue.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1/board-voiceblue.c')
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c49
1 files changed, 23 insertions, 26 deletions
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 45a01311669..92c9de1090a 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -168,29 +168,27 @@ static void __init voiceblue_init_irq(void)
168static void __init voiceblue_init(void) 168static void __init voiceblue_init(void)
169{ 169{
170 /* Watchdog */ 170 /* Watchdog */
171 omap_request_gpio(0); 171 gpio_request(0, "Watchdog");
172 /* smc91x reset */ 172 /* smc91x reset */
173 omap_request_gpio(7); 173 gpio_request(7, "SMC91x reset");
174 omap_set_gpio_direction(7, 0); 174 gpio_direction_output(7, 1);
175 omap_set_gpio_dataout(7, 1);
176 udelay(2); /* wait at least 100ns */ 175 udelay(2); /* wait at least 100ns */
177 omap_set_gpio_dataout(7, 0); 176 gpio_set_value(7, 0);
178 mdelay(50); /* 50ms until PHY ready */ 177 mdelay(50); /* 50ms until PHY ready */
179 /* smc91x interrupt pin */ 178 /* smc91x interrupt pin */
180 omap_request_gpio(8); 179 gpio_request(8, "SMC91x irq");
181 /* 16C554 reset*/ 180 /* 16C554 reset*/
182 omap_request_gpio(6); 181 gpio_request(6, "16C554 reset");
183 omap_set_gpio_direction(6, 0); 182 gpio_direction_output(6, 0);
184 omap_set_gpio_dataout(6, 0);
185 /* 16C554 interrupt pins */ 183 /* 16C554 interrupt pins */
186 omap_request_gpio(12); 184 gpio_request(12, "16C554 irq");
187 omap_request_gpio(13); 185 gpio_request(13, "16C554 irq");
188 omap_request_gpio(14); 186 gpio_request(14, "16C554 irq");
189 omap_request_gpio(15); 187 gpio_request(15, "16C554 irq");
190 set_irq_type(OMAP_GPIO_IRQ(12), IRQ_TYPE_EDGE_RISING); 188 set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING);
191 set_irq_type(OMAP_GPIO_IRQ(13), IRQ_TYPE_EDGE_RISING); 189 set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
192 set_irq_type(OMAP_GPIO_IRQ(14), IRQ_TYPE_EDGE_RISING); 190 set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING);
193 set_irq_type(OMAP_GPIO_IRQ(15), IRQ_TYPE_EDGE_RISING); 191 set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING);
194 192
195 platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices)); 193 platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
196 omap_board_config = voiceblue_config; 194 omap_board_config = voiceblue_config;
@@ -244,19 +242,18 @@ static int wdt_gpio_state;
244 242
245void voiceblue_wdt_enable(void) 243void voiceblue_wdt_enable(void)
246{ 244{
247 omap_set_gpio_direction(0, 0); 245 gpio_direction_output(0, 0);
248 omap_set_gpio_dataout(0, 0); 246 gpio_set_value(0, 1);
249 omap_set_gpio_dataout(0, 1); 247 gpio_set_value(0, 0);
250 omap_set_gpio_dataout(0, 0);
251 wdt_gpio_state = 0; 248 wdt_gpio_state = 0;
252} 249}
253 250
254void voiceblue_wdt_disable(void) 251void voiceblue_wdt_disable(void)
255{ 252{
256 omap_set_gpio_dataout(0, 0); 253 gpio_set_value(0, 0);
257 omap_set_gpio_dataout(0, 1); 254 gpio_set_value(0, 1);
258 omap_set_gpio_dataout(0, 0); 255 gpio_set_value(0, 0);
259 omap_set_gpio_direction(0, 1); 256 gpio_direction_input(0);
260} 257}
261 258
262void voiceblue_wdt_ping(void) 259void voiceblue_wdt_ping(void)
@@ -265,7 +262,7 @@ void voiceblue_wdt_ping(void)
265 return; 262 return;
266 263
267 wdt_gpio_state = !wdt_gpio_state; 264 wdt_gpio_state = !wdt_gpio_state;
268 omap_set_gpio_dataout(0, wdt_gpio_state); 265 gpio_set_value(0, wdt_gpio_state);
269} 266}
270 267
271void voiceblue_reset(void) 268void voiceblue_reset(void)