diff options
Diffstat (limited to 'arch/arm/mach-omap1/board-h2.c')
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 3b65914b9141..b240c5f861da 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) |
251 | static int h2_transceiver_mode(struct device *dev, int state) | 251 | static 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,16 +339,31 @@ static struct platform_device *h2_devices[] __initdata = { | |||
342 | 339 | ||
343 | static void __init h2_init_smc91x(void) | 340 | static 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 | } |
349 | } | 346 | } |
350 | 347 | ||
348 | static int tps_setup(struct i2c_client *client, void *context) | ||
349 | { | ||
350 | tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V | | ||
351 | TPS_LDO1_ENABLE | TPS_VLDO1_3_0V); | ||
352 | |||
353 | return 0; | ||
354 | } | ||
355 | |||
356 | static struct tps65010_board tps_board = { | ||
357 | .base = H2_TPS_GPIO_BASE, | ||
358 | .outmask = 0x0f, | ||
359 | .setup = tps_setup, | ||
360 | }; | ||
361 | |||
351 | static struct i2c_board_info __initdata h2_i2c_board_info[] = { | 362 | static struct i2c_board_info __initdata h2_i2c_board_info[] = { |
352 | { | 363 | { |
353 | I2C_BOARD_INFO("tps65010", 0x48), | 364 | I2C_BOARD_INFO("tps65010", 0x48), |
354 | .irq = OMAP_GPIO_IRQ(58), | 365 | .irq = OMAP_GPIO_IRQ(58), |
366 | .platform_data = &tps_board, | ||
355 | }, { | 367 | }, { |
356 | I2C_BOARD_INFO("isp1301_omap", 0x2d), | 368 | I2C_BOARD_INFO("isp1301_omap", 0x2d), |
357 | .irq = OMAP_GPIO_IRQ(2), | 369 | .irq = OMAP_GPIO_IRQ(2), |
@@ -381,15 +393,6 @@ static struct omap_usb_config h2_usb_config __initdata = { | |||
381 | .pins[1] = 3, | 393 | .pins[1] = 3, |
382 | }; | 394 | }; |
383 | 395 | ||
384 | static struct omap_mmc_config h2_mmc_config __initdata = { | ||
385 | .mmc[0] = { | ||
386 | .enabled = 1, | ||
387 | .wire4 = 1, | ||
388 | }, | ||
389 | }; | ||
390 | |||
391 | extern struct omap_mmc_platform_data h2_mmc_data; | ||
392 | |||
393 | static struct omap_uart_config h2_uart_config __initdata = { | 396 | static struct omap_uart_config h2_uart_config __initdata = { |
394 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | 397 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), |
395 | }; | 398 | }; |
@@ -400,7 +403,6 @@ static struct omap_lcd_config h2_lcd_config __initdata = { | |||
400 | 403 | ||
401 | static struct omap_board_config_kernel h2_config[] __initdata = { | 404 | static struct omap_board_config_kernel h2_config[] __initdata = { |
402 | { OMAP_TAG_USB, &h2_usb_config }, | 405 | { OMAP_TAG_USB, &h2_usb_config }, |
403 | { OMAP_TAG_MMC, &h2_mmc_config }, | ||
404 | { OMAP_TAG_UART, &h2_uart_config }, | 406 | { OMAP_TAG_UART, &h2_uart_config }, |
405 | { OMAP_TAG_LCD, &h2_lcd_config }, | 407 | { OMAP_TAG_LCD, &h2_lcd_config }, |
406 | }; | 408 | }; |
@@ -409,7 +411,7 @@ static struct omap_board_config_kernel h2_config[] __initdata = { | |||
409 | 411 | ||
410 | static int h2_nand_dev_ready(struct omap_nand_platform_data *data) | 412 | static int h2_nand_dev_ready(struct omap_nand_platform_data *data) |
411 | { | 413 | { |
412 | return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN); | 414 | return gpio_get_value(H2_NAND_RB_GPIO_PIN); |
413 | } | 415 | } |
414 | 416 | ||
415 | static void __init h2_init(void) | 417 | static void __init h2_init(void) |
@@ -428,8 +430,9 @@ static void __init h2_init(void) | |||
428 | 430 | ||
429 | h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS; | 431 | h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS; |
430 | h2_nand_resource.end += SZ_4K - 1; | 432 | h2_nand_resource.end += SZ_4K - 1; |
431 | if (!(omap_request_gpio(H2_NAND_RB_GPIO_PIN))) | 433 | if (gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0) |
432 | h2_nand_data.dev_ready = h2_nand_dev_ready; | 434 | BUG(); |
435 | gpio_direction_input(H2_NAND_RB_GPIO_PIN); | ||
433 | 436 | ||
434 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); | 437 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); |
435 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); | 438 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); |
@@ -441,10 +444,10 @@ static void __init h2_init(void) | |||
441 | /* Irda */ | 444 | /* Irda */ |
442 | #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) | 445 | #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) |
443 | omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A); | 446 | omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A); |
444 | if (!(omap_request_gpio(H2_IRDA_FIRSEL_GPIO_PIN))) { | 447 | if (gpio_request(H2_IRDA_FIRSEL_GPIO_PIN, "IRDA mode") < 0) |
445 | omap_set_gpio_direction(H2_IRDA_FIRSEL_GPIO_PIN, 0); | 448 | BUG(); |
446 | h2_irda_data.transceiver_mode = h2_transceiver_mode; | 449 | gpio_direction_output(H2_IRDA_FIRSEL_GPIO_PIN, 0); |
447 | } | 450 | h2_irda_data.transceiver_mode = h2_transceiver_mode; |
448 | #endif | 451 | #endif |
449 | 452 | ||
450 | platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); | 453 | platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); |