diff options
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/board-fsample.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-innovator.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-nokia770.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmte.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmz71.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-perseus2.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-voiceblue.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-omap1/fpga.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/leds.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap1/serial.c | 4 |
12 files changed, 37 insertions, 33 deletions
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 68da3131f8f8..30308294e7c1 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -223,8 +223,9 @@ static struct omap_board_config_kernel fsample_config[] = { | |||
223 | 223 | ||
224 | static void __init omap_fsample_init(void) | 224 | static void __init omap_fsample_init(void) |
225 | { | 225 | { |
226 | if (!(omap_request_gpio(P2_NAND_RB_GPIO_PIN))) | 226 | if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0) |
227 | nand_data.dev_ready = nand_dev_ready; | 227 | BUG(); |
228 | nand_data.dev_ready = nand_dev_ready; | ||
228 | 229 | ||
229 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); | 230 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); |
230 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); | 231 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); |
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 7329ad549a98..c5b4a3b718cf 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -339,7 +339,7 @@ static struct platform_device *h2_devices[] __initdata = { | |||
339 | 339 | ||
340 | static void __init h2_init_smc91x(void) | 340 | static void __init h2_init_smc91x(void) |
341 | { | 341 | { |
342 | if ((omap_request_gpio(0)) < 0) { | 342 | if (gpio_request(0, "SMC91x irq") < 0) { |
343 | printk("Error requesting gpio 0 for smc91x irq\n"); | 343 | printk("Error requesting gpio 0 for smc91x irq\n"); |
344 | return; | 344 | return; |
345 | } | 345 | } |
@@ -425,8 +425,9 @@ static void __init h2_init(void) | |||
425 | 425 | ||
426 | h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS; | 426 | h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS; |
427 | h2_nand_resource.end += SZ_4K - 1; | 427 | h2_nand_resource.end += SZ_4K - 1; |
428 | if (!(omap_request_gpio(H2_NAND_RB_GPIO_PIN))) | 428 | if (gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0) |
429 | h2_nand_data.dev_ready = h2_nand_dev_ready; | 429 | BUG(); |
430 | gpio_direction_input(H2_NAND_RB_GPIO_PIN); | ||
430 | 431 | ||
431 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); | 432 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); |
432 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); | 433 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); |
@@ -438,10 +439,10 @@ static void __init h2_init(void) | |||
438 | /* Irda */ | 439 | /* Irda */ |
439 | #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) | 440 | #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) |
440 | omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A); | 441 | omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A); |
441 | if (!(omap_request_gpio(H2_IRDA_FIRSEL_GPIO_PIN))) { | 442 | if (gpio_request(H2_IRDA_FIRSEL_GPIO_PIN, "IRDA mode") < 0) |
442 | gpio_direction_output(H2_IRDA_FIRSEL_GPIO_PIN, 0); | 443 | BUG(); |
443 | h2_irda_data.transceiver_mode = h2_transceiver_mode; | 444 | gpio_direction_output(H2_IRDA_FIRSEL_GPIO_PIN, 0); |
444 | } | 445 | h2_irda_data.transceiver_mode = h2_transceiver_mode; |
445 | #endif | 446 | #endif |
446 | 447 | ||
447 | platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); | 448 | platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index c524f47cf862..0332203bd53d 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -516,8 +516,9 @@ static void __init h3_init(void) | |||
516 | 516 | ||
517 | nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS; | 517 | nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS; |
518 | nand_resource.end += SZ_4K - 1; | 518 | nand_resource.end += SZ_4K - 1; |
519 | if (!(omap_request_gpio(H3_NAND_RB_GPIO_PIN))) | 519 | if (gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0) |
520 | nand_data.dev_ready = nand_dev_ready; | 520 | BUG(); |
521 | nand_data.dev_ready = nand_dev_ready; | ||
521 | 522 | ||
522 | /* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */ | 523 | /* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */ |
523 | /* GPIO10 pullup/down register, Enable pullup on GPIO10 */ | 524 | /* GPIO10 pullup/down register, Enable pullup on GPIO10 */ |
@@ -537,7 +538,7 @@ static void __init h3_init(void) | |||
537 | static void __init h3_init_smc91x(void) | 538 | static void __init h3_init_smc91x(void) |
538 | { | 539 | { |
539 | omap_cfg_reg(W15_1710_GPIO40); | 540 | omap_cfg_reg(W15_1710_GPIO40); |
540 | if (omap_request_gpio(40) < 0) { | 541 | if (gpio_request(40, "SMC91x irq") < 0) { |
541 | printk("Error requesting gpio 40 for smc91x irq\n"); | 542 | printk("Error requesting gpio 40 for smc91x irq\n"); |
542 | return; | 543 | return; |
543 | } | 544 | } |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index cbc11be5cd2a..a21e365a7a87 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -301,7 +301,7 @@ static void __init innovator_init_smc91x(void) | |||
301 | OMAP1510_FPGA_RST); | 301 | OMAP1510_FPGA_RST); |
302 | udelay(750); | 302 | udelay(750); |
303 | } else { | 303 | } else { |
304 | if ((omap_request_gpio(0)) < 0) { | 304 | if (gpio_request(0, "SMC91x irq") < 0) { |
305 | printk("Error requesting gpio 0 for smc91x irq\n"); | 305 | printk("Error requesting gpio 0 for smc91x irq\n"); |
306 | return; | 306 | return; |
307 | } | 307 | } |
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index e0576f5bcdab..b26782471e59 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -124,7 +124,7 @@ static void mipid_dev_init(void) | |||
124 | 124 | ||
125 | static void ads7846_dev_init(void) | 125 | static void ads7846_dev_init(void) |
126 | { | 126 | { |
127 | if (omap_request_gpio(ADS7846_PENDOWN_GPIO) < 0) | 127 | if (gpio_request(ADS7846_PENDOWN_GPIO, "ADS7846 pendown") < 0) |
128 | printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); | 128 | printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); |
129 | } | 129 | } |
130 | 130 | ||
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 0995a0fc1dd0..4141e3917d7c 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -347,14 +347,14 @@ static void palmte_headphones_detect(void *data, int state) | |||
347 | static void __init palmte_misc_gpio_setup(void) | 347 | static void __init palmte_misc_gpio_setup(void) |
348 | { | 348 | { |
349 | /* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */ | 349 | /* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */ |
350 | if (omap_request_gpio(PALMTE_PINTDAV_GPIO)) { | 350 | if (gpio_request(PALMTE_PINTDAV_GPIO, "TSC2102 PINTDAV") < 0) { |
351 | printk(KERN_ERR "Could not reserve PINTDAV GPIO!\n"); | 351 | printk(KERN_ERR "Could not reserve PINTDAV GPIO!\n"); |
352 | return; | 352 | return; |
353 | } | 353 | } |
354 | gpio_direction_input(PALMTE_PINTDAV_GPIO); | 354 | gpio_direction_input(PALMTE_PINTDAV_GPIO); |
355 | 355 | ||
356 | /* Set USB-or-DC-IN pin as input (unused) */ | 356 | /* Set USB-or-DC-IN pin as input (unused) */ |
357 | if (omap_request_gpio(PALMTE_USB_OR_DC_GPIO)) { | 357 | if (gpio_request(PALMTE_USB_OR_DC_GPIO, "USB/DC-IN") < 0) { |
358 | printk(KERN_ERR "Could not reserve cable signal GPIO!\n"); | 358 | printk(KERN_ERR "Could not reserve cable signal GPIO!\n"); |
359 | return; | 359 | return; |
360 | } | 360 | } |
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index 1b7d3580d148..801fb5f62ed7 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c | |||
@@ -326,14 +326,14 @@ palmz71_gpio_setup(int early) | |||
326 | gpio_direction_output(1, 1); | 326 | gpio_direction_output(1, 1); |
327 | } else { | 327 | } else { |
328 | /* Set MMC/SD host WP pin as input */ | 328 | /* Set MMC/SD host WP pin as input */ |
329 | if (omap_request_gpio(PALMZ71_MMC_WP_GPIO)) { | 329 | if (gpio_request(PALMZ71_MMC_WP_GPIO, "MMC WP") < 0) { |
330 | printk(KERN_ERR "Could not reserve WP GPIO!\n"); | 330 | printk(KERN_ERR "Could not reserve WP GPIO!\n"); |
331 | return; | 331 | return; |
332 | } | 332 | } |
333 | gpio_direction_input(PALMZ71_MMC_WP_GPIO); | 333 | gpio_direction_input(PALMZ71_MMC_WP_GPIO); |
334 | 334 | ||
335 | /* Monitor the Power-cable-connected signal */ | 335 | /* Monitor the Power-cable-connected signal */ |
336 | if (omap_request_gpio(PALMZ71_USBDETECT_GPIO)) { | 336 | if (gpio_request(PALMZ71_USBDETECT_GPIO, "USB detect") < 0) { |
337 | printk(KERN_ERR | 337 | printk(KERN_ERR |
338 | "Could not reserve cable signal GPIO!\n"); | 338 | "Could not reserve cable signal GPIO!\n"); |
339 | return; | 339 | return; |
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index b8f0077f9c77..3b9f907aa899 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -223,8 +223,9 @@ static struct omap_board_config_kernel perseus2_config[] __initdata = { | |||
223 | 223 | ||
224 | static void __init omap_perseus2_init(void) | 224 | static void __init omap_perseus2_init(void) |
225 | { | 225 | { |
226 | if (!(omap_request_gpio(P2_NAND_RB_GPIO_PIN))) | 226 | if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0) |
227 | nand_data.dev_ready = nand_dev_ready; | 227 | BUG(); |
228 | nand_data.dev_ready = nand_dev_ready; | ||
228 | 229 | ||
229 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); | 230 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); |
230 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); | 231 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); |
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index bb4f4a8aea32..92c9de1090a9 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -168,23 +168,23 @@ static void __init voiceblue_init_irq(void) | |||
168 | static void __init voiceblue_init(void) | 168 | static 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 | gpio_direction_output(7, 1); | 174 | gpio_direction_output(7, 1); |
175 | udelay(2); /* wait at least 100ns */ | 175 | udelay(2); /* wait at least 100ns */ |
176 | gpio_set_value(7, 0); | 176 | gpio_set_value(7, 0); |
177 | mdelay(50); /* 50ms until PHY ready */ | 177 | mdelay(50); /* 50ms until PHY ready */ |
178 | /* smc91x interrupt pin */ | 178 | /* smc91x interrupt pin */ |
179 | omap_request_gpio(8); | 179 | gpio_request(8, "SMC91x irq"); |
180 | /* 16C554 reset*/ | 180 | /* 16C554 reset*/ |
181 | omap_request_gpio(6); | 181 | gpio_request(6, "16C554 reset"); |
182 | gpio_direction_output(6, 0); | 182 | gpio_direction_output(6, 0); |
183 | /* 16C554 interrupt pins */ | 183 | /* 16C554 interrupt pins */ |
184 | omap_request_gpio(12); | 184 | gpio_request(12, "16C554 irq"); |
185 | omap_request_gpio(13); | 185 | gpio_request(13, "16C554 irq"); |
186 | omap_request_gpio(14); | 186 | gpio_request(14, "16C554 irq"); |
187 | omap_request_gpio(15); | 187 | gpio_request(15, "16C554 irq"); |
188 | set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING); | 188 | set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING); |
189 | set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING); | 189 | set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING); |
190 | set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING); | 190 | set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING); |
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c index 55748ec26e19..4f2b8a7adb19 100644 --- a/arch/arm/mach-omap1/fpga.c +++ b/arch/arm/mach-omap1/fpga.c | |||
@@ -177,7 +177,7 @@ void omap1510_fpga_init_irq(void) | |||
177 | * NOTE: For general GPIO/MPUIO access and interrupts, please see | 177 | * NOTE: For general GPIO/MPUIO access and interrupts, please see |
178 | * gpio.[ch] | 178 | * gpio.[ch] |
179 | */ | 179 | */ |
180 | omap_request_gpio(13); | 180 | gpio_request(13, "FPGA irq"); |
181 | gpio_direction_input(13); | 181 | gpio_direction_input(13); |
182 | set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING); | 182 | set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING); |
183 | set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux); | 183 | set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux); |
diff --git a/arch/arm/mach-omap1/leds.c b/arch/arm/mach-omap1/leds.c index 540434e38f22..8cbf2562dcaa 100644 --- a/arch/arm/mach-omap1/leds.c +++ b/arch/arm/mach-omap1/leds.c | |||
@@ -47,13 +47,13 @@ omap_leds_init(void) | |||
47 | * that's a different kind of LED (just one color at a time). | 47 | * that's a different kind of LED (just one color at a time). |
48 | */ | 48 | */ |
49 | omap_cfg_reg(P18_1610_GPIO3); | 49 | omap_cfg_reg(P18_1610_GPIO3); |
50 | if (omap_request_gpio(3) == 0) | 50 | if (gpio_request(3, "LED red") == 0) |
51 | gpio_direction_output(3, 1); | 51 | gpio_direction_output(3, 1); |
52 | else | 52 | else |
53 | printk(KERN_WARNING "LED: can't get GPIO3/red?\n"); | 53 | printk(KERN_WARNING "LED: can't get GPIO3/red?\n"); |
54 | 54 | ||
55 | omap_cfg_reg(MPUIO4); | 55 | omap_cfg_reg(MPUIO4); |
56 | if (omap_request_gpio(OMAP_MPUIO(4)) == 0) | 56 | if (gpio_request(OMAP_MPUIO(4), "LED green") == 0) |
57 | gpio_direction_output(OMAP_MPUIO(4), 1); | 57 | gpio_direction_output(OMAP_MPUIO(4), 1); |
58 | else | 58 | else |
59 | printk(KERN_WARNING "LED: can't get MPUIO4/green?\n"); | 59 | printk(KERN_WARNING "LED: can't get MPUIO4/green?\n"); |
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index b63da3f70c3f..0002084e0655 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c | |||
@@ -244,7 +244,7 @@ static void __init omap_serial_set_port_wakeup(int gpio_nr) | |||
244 | { | 244 | { |
245 | int ret; | 245 | int ret; |
246 | 246 | ||
247 | ret = omap_request_gpio(gpio_nr); | 247 | ret = gpio_request(gpio_nr, "UART wake"); |
248 | if (ret < 0) { | 248 | if (ret < 0) { |
249 | printk(KERN_ERR "Could not request UART wake GPIO: %i\n", | 249 | printk(KERN_ERR "Could not request UART wake GPIO: %i\n", |
250 | gpio_nr); | 250 | gpio_nr); |
@@ -254,7 +254,7 @@ static void __init omap_serial_set_port_wakeup(int gpio_nr) | |||
254 | ret = request_irq(gpio_to_irq(gpio_nr), &omap_serial_wake_interrupt, | 254 | ret = request_irq(gpio_to_irq(gpio_nr), &omap_serial_wake_interrupt, |
255 | IRQF_TRIGGER_RISING, "serial wakeup", NULL); | 255 | IRQF_TRIGGER_RISING, "serial wakeup", NULL); |
256 | if (ret) { | 256 | if (ret) { |
257 | omap_free_gpio(gpio_nr); | 257 | gpio_free(gpio_nr); |
258 | printk(KERN_ERR "No interrupt for UART wake GPIO: %i\n", | 258 | printk(KERN_ERR "No interrupt for UART wake GPIO: %i\n", |
259 | gpio_nr); | 259 | gpio_nr); |
260 | return; | 260 | return; |