aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-apollon.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-apollon.c')
-rw-r--r--arch/arm/mach-omap2/board-apollon.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index f4f8374a0298..f3beb8eeef77 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -202,6 +202,7 @@ static inline void __init apollon_init_smc91x(void)
202 unsigned int rate; 202 unsigned int rate;
203 struct clk *gpmc_fck; 203 struct clk *gpmc_fck;
204 int eth_cs; 204 int eth_cs;
205 int err;
205 206
206 gpmc_fck = clk_get(NULL, "gpmc_fck"); /* Always on ENABLE_ON_INIT */ 207 gpmc_fck = clk_get(NULL, "gpmc_fck"); /* Always on ENABLE_ON_INIT */
207 if (IS_ERR(gpmc_fck)) { 208 if (IS_ERR(gpmc_fck)) {
@@ -245,15 +246,13 @@ static inline void __init apollon_init_smc91x(void)
245 apollon_smc91x_resources[0].end = base + 0x30f; 246 apollon_smc91x_resources[0].end = base + 0x30f;
246 udelay(100); 247 udelay(100);
247 248
248 omap_mux_init_gpio(74, 0); 249 omap_mux_init_gpio(APOLLON_ETHR_GPIO_IRQ, 0);
249 if (gpio_request(APOLLON_ETHR_GPIO_IRQ, "SMC91x irq") < 0) { 250 err = gpio_request_one(APOLLON_ETHR_GPIO_IRQ, GPIOF_IN, "SMC91x irq");
251 if (err) {
250 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", 252 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n",
251 APOLLON_ETHR_GPIO_IRQ); 253 APOLLON_ETHR_GPIO_IRQ);
252 gpmc_cs_free(APOLLON_ETH_CS); 254 gpmc_cs_free(APOLLON_ETH_CS);
253 goto out;
254 } 255 }
255 gpio_direction_input(APOLLON_ETHR_GPIO_IRQ);
256
257out: 256out:
258 clk_disable(gpmc_fck); 257 clk_disable(gpmc_fck);
259 clk_put(gpmc_fck); 258 clk_put(gpmc_fck);
@@ -280,20 +279,19 @@ static void __init omap_apollon_init_early(void)
280 omap2_init_common_devices(NULL, NULL); 279 omap2_init_common_devices(NULL, NULL);
281} 280}
282 281
282static struct gpio apollon_gpio_leds[] __initdata = {
283 { LED0_GPIO13, GPIOF_OUT_INIT_LOW, "LED0" }, /* LED0 - AA10 */
284 { LED1_GPIO14, GPIOF_OUT_INIT_LOW, "LED1" }, /* LED1 - AA6 */
285 { LED2_GPIO15, GPIOF_OUT_INIT_LOW, "LED2" }, /* LED2 - AA4 */
286};
287
283static void __init apollon_led_init(void) 288static void __init apollon_led_init(void)
284{ 289{
285 /* LED0 - AA10 */
286 omap_mux_init_signal("vlynq_clk.gpio_13", 0); 290 omap_mux_init_signal("vlynq_clk.gpio_13", 0);
287 gpio_request(LED0_GPIO13, "LED0");
288 gpio_direction_output(LED0_GPIO13, 0);
289 /* LED1 - AA6 */
290 omap_mux_init_signal("vlynq_rx1.gpio_14", 0); 291 omap_mux_init_signal("vlynq_rx1.gpio_14", 0);
291 gpio_request(LED1_GPIO14, "LED1");
292 gpio_direction_output(LED1_GPIO14, 0);
293 /* LED2 - AA4 */
294 omap_mux_init_signal("vlynq_rx0.gpio_15", 0); 292 omap_mux_init_signal("vlynq_rx0.gpio_15", 0);
295 gpio_request(LED2_GPIO15, "LED2"); 293
296 gpio_direction_output(LED2_GPIO15, 0); 294 gpio_request_array(apollon_gpio_leds, ARRAY_SIZE(apollon_gpio_leds));
297} 295}
298 296
299static void __init apollon_usb_init(void) 297static void __init apollon_usb_init(void)
@@ -301,8 +299,7 @@ static void __init apollon_usb_init(void)
301 /* USB device */ 299 /* USB device */
302 /* DEVICE_SUSPEND */ 300 /* DEVICE_SUSPEND */
303 omap_mux_init_signal("mcbsp2_clkx.gpio_12", 0); 301 omap_mux_init_signal("mcbsp2_clkx.gpio_12", 0);
304 gpio_request(12, "USB suspend"); 302 gpio_request_one(12, GPIOF_OUT_INIT_LOW, "USB suspend");
305 gpio_direction_output(12, 0);
306 omap2_usbfs_init(&apollon_usb_config); 303 omap2_usbfs_init(&apollon_usb_config);
307} 304}
308 305