aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-h2.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1/board-h2.c')
-rw-r--r--arch/arm/mach-omap1/board-h2.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 3b65914b9141..c5b4a3b718cf 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -250,11 +250,8 @@ static struct platform_device h2_kp_device = {
250#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) 250#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
251static int h2_transceiver_mode(struct device *dev, int state) 251static int h2_transceiver_mode(struct device *dev, int state)
252{ 252{
253 if (state & IR_SIRMODE) 253 /* SIR when low, else MIR/FIR when HIGH */
254 omap_set_gpio_dataout(H2_IRDA_FIRSEL_GPIO_PIN, 0); 254 gpio_set_value(H2_IRDA_FIRSEL_GPIO_PIN, !(state & IR_SIRMODE));
255 else /* MIR/FIR */
256 omap_set_gpio_dataout(H2_IRDA_FIRSEL_GPIO_PIN, 1);
257
258 return 0; 255 return 0;
259} 256}
260#endif 257#endif
@@ -342,7 +339,7 @@ static struct platform_device *h2_devices[] __initdata = {
342 339
343static void __init h2_init_smc91x(void) 340static void __init h2_init_smc91x(void)
344{ 341{
345 if ((omap_request_gpio(0)) < 0) { 342 if (gpio_request(0, "SMC91x irq") < 0) {
346 printk("Error requesting gpio 0 for smc91x irq\n"); 343 printk("Error requesting gpio 0 for smc91x irq\n");
347 return; 344 return;
348 } 345 }
@@ -409,7 +406,7 @@ static struct omap_board_config_kernel h2_config[] __initdata = {
409 406
410static int h2_nand_dev_ready(struct omap_nand_platform_data *data) 407static int h2_nand_dev_ready(struct omap_nand_platform_data *data)
411{ 408{
412 return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN); 409 return gpio_get_value(H2_NAND_RB_GPIO_PIN);
413} 410}
414 411
415static void __init h2_init(void) 412static void __init h2_init(void)
@@ -428,8 +425,9 @@ static void __init h2_init(void)
428 425
429 h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS; 426 h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS;
430 h2_nand_resource.end += SZ_4K - 1; 427 h2_nand_resource.end += SZ_4K - 1;
431 if (!(omap_request_gpio(H2_NAND_RB_GPIO_PIN))) 428 if (gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
432 h2_nand_data.dev_ready = h2_nand_dev_ready; 429 BUG();
430 gpio_direction_input(H2_NAND_RB_GPIO_PIN);
433 431
434 omap_cfg_reg(L3_1610_FLASH_CS2B_OE); 432 omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
435 omap_cfg_reg(M8_1610_FLASH_CS2B_WE); 433 omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
@@ -441,10 +439,10 @@ static void __init h2_init(void)
441 /* Irda */ 439 /* Irda */
442#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) 440#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
443 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);
444 if (!(omap_request_gpio(H2_IRDA_FIRSEL_GPIO_PIN))) { 442 if (gpio_request(H2_IRDA_FIRSEL_GPIO_PIN, "IRDA mode") < 0)
445 omap_set_gpio_direction(H2_IRDA_FIRSEL_GPIO_PIN, 0); 443 BUG();
446 h2_irda_data.transceiver_mode = h2_transceiver_mode; 444 gpio_direction_output(H2_IRDA_FIRSEL_GPIO_PIN, 0);
447 } 445 h2_irda_data.transceiver_mode = h2_transceiver_mode;
448#endif 446#endif
449 447
450 platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); 448 platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));