aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-osk.c
diff options
context:
space:
mode:
authorTarun Kanti DebBarma <tarun.kanti@ti.com>2012-03-29 11:41:01 -0400
committerTony Lindgren <tony@atomide.com>2012-03-29 11:41:01 -0400
commit46a0a5402f7b477bc98bf26596c2234f2ddbf473 (patch)
treea42f80deeecb3d59b2fa771c1ab031c68307f7b2 /arch/arm/mach-omap1/board-osk.c
parenta26d3c4fcd4bb875ae5adc32f27fab7a478bb00d (diff)
ARM: OMAP: boards: Fix OMAP_GPIO_IRQ usage with gpio_to_irq()
The following commits change gpio-omap to use dynamic IRQ allocation: 25db711 gpio/omap: Fix IRQ handling for SPARSE_IRQ 384ebe1 gpio/omap: Add DT support to GPIO driver With dynamic allocation of IRQ the usage of OMAP_GPIO_IRQ is no longer valid. We must be using gpio_to_irq() instead. Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> [tony@atomide.com: updated comments] Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/board-osk.c')
-rw-r--r--arch/arm/mach-omap1/board-osk.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index e2d7ae4418f2..a0c1a1c15e75 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -128,8 +128,6 @@ static struct resource osk5912_smc91x_resources[] = {
128 .flags = IORESOURCE_MEM, 128 .flags = IORESOURCE_MEM,
129 }, 129 },
130 [1] = { 130 [1] = {
131 .start = OMAP_GPIO_IRQ(0),
132 .end = OMAP_GPIO_IRQ(0),
133 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, 131 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
134 }, 132 },
135}; 133};
@@ -146,8 +144,6 @@ static struct platform_device osk5912_smc91x_device = {
146 144
147static struct resource osk5912_cf_resources[] = { 145static struct resource osk5912_cf_resources[] = {
148 [0] = { 146 [0] = {
149 .start = OMAP_GPIO_IRQ(62),
150 .end = OMAP_GPIO_IRQ(62),
151 .flags = IORESOURCE_IRQ, 147 .flags = IORESOURCE_IRQ,
152 }, 148 },
153}; 149};
@@ -239,7 +235,6 @@ static struct tps65010_board tps_board = {
239static struct i2c_board_info __initdata osk_i2c_board_info[] = { 235static struct i2c_board_info __initdata osk_i2c_board_info[] = {
240 { 236 {
241 I2C_BOARD_INFO("tps65010", 0x48), 237 I2C_BOARD_INFO("tps65010", 0x48),
242 .irq = OMAP_GPIO_IRQ(OMAP_MPUIO(1)),
243 .platform_data = &tps_board, 238 .platform_data = &tps_board,
244 239
245 }, 240 },
@@ -413,7 +408,6 @@ static struct spi_board_info __initdata mistral_boardinfo[] = { {
413 /* MicroWire (bus 2) CS0 has an ads7846e */ 408 /* MicroWire (bus 2) CS0 has an ads7846e */
414 .modalias = "ads7846", 409 .modalias = "ads7846",
415 .platform_data = &mistral_ts_info, 410 .platform_data = &mistral_ts_info,
416 .irq = OMAP_GPIO_IRQ(4),
417 .max_speed_hz = 120000 /* max sample rate at 3V */ 411 .max_speed_hz = 120000 /* max sample rate at 3V */
418 * 26 /* command + data + overhead */, 412 * 26 /* command + data + overhead */,
419 .bus_num = 2, 413 .bus_num = 2,
@@ -476,6 +470,7 @@ static void __init osk_mistral_init(void)
476 gpio_direction_input(4); 470 gpio_direction_input(4);
477 irq_set_irq_type(gpio_to_irq(4), IRQ_TYPE_EDGE_FALLING); 471 irq_set_irq_type(gpio_to_irq(4), IRQ_TYPE_EDGE_FALLING);
478 472
473 mistral_boardinfo[0].irq = gpio_to_irq(4);
479 spi_register_board_info(mistral_boardinfo, 474 spi_register_board_info(mistral_boardinfo,
480 ARRAY_SIZE(mistral_boardinfo)); 475 ARRAY_SIZE(mistral_boardinfo));
481 476
@@ -547,6 +542,10 @@ static void __init osk_init(void)
547 542
548 osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys(); 543 osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys();
549 osk_flash_resource.end += SZ_32M - 1; 544 osk_flash_resource.end += SZ_32M - 1;
545 osk5912_smc91x_resources[1].start = gpio_to_irq(0);
546 osk5912_smc91x_resources[1].end = gpio_to_irq(0);
547 osk5912_cf_resources[0].start = gpio_to_irq(62);
548 osk5912_cf_resources[0].end = gpio_to_irq(62);
550 platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices)); 549 platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices));
551 omap_board_config = osk_config; 550 omap_board_config = osk_config;
552 omap_board_config_size = ARRAY_SIZE(osk_config); 551 omap_board_config_size = ARRAY_SIZE(osk_config);
@@ -563,6 +562,7 @@ static void __init osk_init(void)
563 gpio_direction_input(OMAP_MPUIO(1)); 562 gpio_direction_input(OMAP_MPUIO(1));
564 563
565 omap_serial_init(); 564 omap_serial_init();
565 osk_i2c_board_info[0].irq = gpio_to_irq(OMAP_MPUIO(1));
566 omap_register_i2c_bus(1, 400, osk_i2c_board_info, 566 omap_register_i2c_bus(1, 400, osk_i2c_board_info,
567 ARRAY_SIZE(osk_i2c_board_info)); 567 ARRAY_SIZE(osk_i2c_board_info));
568 osk_mistral_init(); 568 osk_mistral_init();