diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-apollon.c | 64 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-ldp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mcbsp.c | 1 |
4 files changed, 13 insertions, 63 deletions
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index bf1e5d32c2a3..0a7b24ba1652 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c | |||
@@ -22,8 +22,6 @@ | |||
22 | #include <linux/mtd/mtd.h> | 22 | #include <linux/mtd/mtd.h> |
23 | #include <linux/mtd/partitions.h> | 23 | #include <linux/mtd/partitions.h> |
24 | #include <linux/mtd/onenand.h> | 24 | #include <linux/mtd/onenand.h> |
25 | #include <linux/irq.h> | ||
26 | #include <linux/interrupt.h> | ||
27 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
28 | #include <linux/leds.h> | 26 | #include <linux/leds.h> |
29 | #include <linux/err.h> | 27 | #include <linux/err.h> |
@@ -282,65 +280,16 @@ static void __init apollon_led_init(void) | |||
282 | { | 280 | { |
283 | /* LED0 - AA10 */ | 281 | /* LED0 - AA10 */ |
284 | omap_cfg_reg(AA10_242X_GPIO13); | 282 | omap_cfg_reg(AA10_242X_GPIO13); |
285 | omap_request_gpio(LED0_GPIO13); | 283 | gpio_request(LED0_GPIO13, "LED0"); |
286 | omap_set_gpio_direction(LED0_GPIO13, 0); | 284 | gpio_direction_output(LED0_GPIO13, 0); |
287 | omap_set_gpio_dataout(LED0_GPIO13, 0); | ||
288 | /* LED1 - AA6 */ | 285 | /* LED1 - AA6 */ |
289 | omap_cfg_reg(AA6_242X_GPIO14); | 286 | omap_cfg_reg(AA6_242X_GPIO14); |
290 | omap_request_gpio(LED1_GPIO14); | 287 | gpio_request(LED1_GPIO14, "LED1"); |
291 | omap_set_gpio_direction(LED1_GPIO14, 0); | 288 | gpio_direction_output(LED1_GPIO14, 0); |
292 | omap_set_gpio_dataout(LED1_GPIO14, 0); | ||
293 | /* LED2 - AA4 */ | 289 | /* LED2 - AA4 */ |
294 | omap_cfg_reg(AA4_242X_GPIO15); | 290 | omap_cfg_reg(AA4_242X_GPIO15); |
295 | omap_request_gpio(LED2_GPIO15); | 291 | gpio_request(LED2_GPIO15, "LED2"); |
296 | omap_set_gpio_direction(LED2_GPIO15, 0); | 292 | gpio_direction_output(LED2_GPIO15, 0); |
297 | omap_set_gpio_dataout(LED2_GPIO15, 0); | ||
298 | } | ||
299 | |||
300 | static irqreturn_t apollon_sw_interrupt(int irq, void *ignored) | ||
301 | { | ||
302 | static unsigned int led0, led1, led2; | ||
303 | |||
304 | if (irq == OMAP_GPIO_IRQ(SW_ENTER_GPIO16)) | ||
305 | omap_set_gpio_dataout(LED0_GPIO13, led0 ^= 1); | ||
306 | else if (irq == OMAP_GPIO_IRQ(SW_UP_GPIO17)) | ||
307 | omap_set_gpio_dataout(LED1_GPIO14, led1 ^= 1); | ||
308 | else if (irq == OMAP_GPIO_IRQ(SW_DOWN_GPIO58)) | ||
309 | omap_set_gpio_dataout(LED2_GPIO15, led2 ^= 1); | ||
310 | |||
311 | return IRQ_HANDLED; | ||
312 | } | ||
313 | |||
314 | static void __init apollon_sw_init(void) | ||
315 | { | ||
316 | /* Enter SW - Y11 */ | ||
317 | omap_cfg_reg(Y11_242X_GPIO16); | ||
318 | omap_request_gpio(SW_ENTER_GPIO16); | ||
319 | gpio_direction_input(SW_ENTER_GPIO16); | ||
320 | /* Up SW - AA12 */ | ||
321 | omap_cfg_reg(AA12_242X_GPIO17); | ||
322 | omap_request_gpio(SW_UP_GPIO17); | ||
323 | gpio_direction_input(SW_UP_GPIO17); | ||
324 | /* Down SW - AA8 */ | ||
325 | omap_cfg_reg(AA8_242X_GPIO58); | ||
326 | omap_request_gpio(SW_DOWN_GPIO58); | ||
327 | gpio_direction_input(SW_DOWN_GPIO58); | ||
328 | |||
329 | set_irq_type(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), IRQ_TYPE_EDGE_RISING); | ||
330 | if (request_irq(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), &apollon_sw_interrupt, | ||
331 | IRQF_SHARED, "enter sw", | ||
332 | &apollon_sw_interrupt)) | ||
333 | return; | ||
334 | set_irq_type(OMAP_GPIO_IRQ(SW_UP_GPIO17), IRQ_TYPE_EDGE_RISING); | ||
335 | if (request_irq(OMAP_GPIO_IRQ(SW_UP_GPIO17), &apollon_sw_interrupt, | ||
336 | IRQF_SHARED, "up sw", | ||
337 | &apollon_sw_interrupt)) | ||
338 | return; | ||
339 | set_irq_type(OMAP_GPIO_IRQ(SW_DOWN_GPIO58), IRQ_TYPE_EDGE_RISING); | ||
340 | if (request_irq(OMAP_GPIO_IRQ(SW_DOWN_GPIO58), &apollon_sw_interrupt, | ||
341 | IRQF_SHARED, "down sw", | ||
342 | &apollon_sw_interrupt)) | ||
343 | return; | ||
344 | } | 293 | } |
345 | 294 | ||
346 | static void __init apollon_usb_init(void) | 295 | static void __init apollon_usb_init(void) |
@@ -357,7 +306,6 @@ static void __init omap_apollon_init(void) | |||
357 | u32 v; | 306 | u32 v; |
358 | 307 | ||
359 | apollon_led_init(); | 308 | apollon_led_init(); |
360 | apollon_sw_init(); | ||
361 | apollon_flash_init(); | 309 | apollon_flash_init(); |
362 | apollon_usb_init(); | 310 | apollon_usb_init(); |
363 | 311 | ||
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index aa6972781e4a..f6a13451d1fd 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -88,7 +88,7 @@ static inline void __init ldp_init_smc911x(void) | |||
88 | 88 | ||
89 | ldp_smc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio); | 89 | ldp_smc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio); |
90 | 90 | ||
91 | if (omap_request_gpio(eth_gpio) < 0) { | 91 | if (gpio_request(eth_gpio, "smc911x irq") < 0) { |
92 | printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n", | 92 | printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n", |
93 | eth_gpio); | 93 | eth_gpio); |
94 | return; | 94 | return; |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 9e5ada01b5fa..38c88fbe658d 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <linux/mtd/partitions.h> | 28 | #include <linux/mtd/partitions.h> |
29 | #include <linux/mtd/nand.h> | 29 | #include <linux/mtd/nand.h> |
30 | 30 | ||
31 | #include <linux/i2c/twl4030.h> | ||
32 | |||
31 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
32 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
@@ -120,6 +122,9 @@ static int beagle_twl_gpio_setup(struct device *dev, | |||
120 | unsigned gpio, unsigned ngpio) | 122 | unsigned gpio, unsigned ngpio) |
121 | { | 123 | { |
122 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 124 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
125 | omap_cfg_reg(AH8_34XX_GPIO29); | ||
126 | mmc[0].gpio_cd = gpio + 0; | ||
127 | twl4030_mmc_init(mmc); | ||
123 | 128 | ||
124 | /* REVISIT: need ehci-omap hooks for external VBUS | 129 | /* REVISIT: need ehci-omap hooks for external VBUS |
125 | * power switch and overcurrent detect | 130 | * power switch and overcurrent detect |
@@ -304,10 +309,6 @@ static void __init omap3_beagle_init(void) | |||
304 | omap_board_config_size = ARRAY_SIZE(omap3_beagle_config); | 309 | omap_board_config_size = ARRAY_SIZE(omap3_beagle_config); |
305 | omap_serial_init(); | 310 | omap_serial_init(); |
306 | 311 | ||
307 | omap_cfg_reg(AH8_34XX_GPIO29); | ||
308 | mmc[0].gpio_cd = gpio + 0; | ||
309 | twl4030_mmc_init(mmc); | ||
310 | |||
311 | omap_cfg_reg(J25_34XX_GPIO170); | 312 | omap_cfg_reg(J25_34XX_GPIO170); |
312 | gpio_request(170, "DVI_nPD"); | 313 | gpio_request(170, "DVI_nPD"); |
313 | /* REVISIT leave DVI powered down until it's needed ... */ | 314 | /* REVISIT leave DVI powered down until it's needed ... */ |
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index acdc709901cd..e20023c9d15d 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | 19 | ||
20 | #include <mach/irqs.h> | ||
20 | #include <mach/dma.h> | 21 | #include <mach/dma.h> |
21 | #include <mach/irqs.h> | 22 | #include <mach/irqs.h> |
22 | #include <mach/mux.h> | 23 | #include <mach/mux.h> |