diff options
Diffstat (limited to 'arch/arm/mach-omap1/board-innovator.c')
-rw-r--r-- | arch/arm/mach-omap1/board-innovator.c | 50 |
1 files changed, 42 insertions, 8 deletions
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index a21e365a7a87..8ffb06fc0f08 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <mach/common.h> | 39 | #include <mach/common.h> |
40 | #include <mach/mcbsp.h> | 40 | #include <mach/mcbsp.h> |
41 | #include <mach/omap-alsa.h> | 41 | #include <mach/omap-alsa.h> |
42 | #include <mach/mmc.h> | ||
42 | 43 | ||
43 | static int innovator_keymap[] = { | 44 | static int innovator_keymap[] = { |
44 | KEY(0, 0, KEY_F1), | 45 | KEY(0, 0, KEY_F1), |
@@ -360,16 +361,49 @@ static struct omap_lcd_config innovator1610_lcd_config __initdata = { | |||
360 | }; | 361 | }; |
361 | #endif | 362 | #endif |
362 | 363 | ||
363 | static struct omap_mmc_config innovator_mmc_config __initdata = { | 364 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) |
364 | .mmc [0] = { | 365 | |
365 | .enabled = 1, | 366 | static int mmc_set_power(struct device *dev, int slot, int power_on, |
366 | .wire4 = 1, | 367 | int vdd) |
367 | .wp_pin = OMAP_MPUIO(3), | 368 | { |
368 | .power_pin = -1, /* FPGA F3 UIO42 */ | 369 | if (power_on) |
369 | .switch_pin = -1, /* FPGA F4 UIO43 */ | 370 | fpga_write(fpga_read(OMAP1510_FPGA_POWER) | (1 << 3), |
371 | OMAP1510_FPGA_POWER); | ||
372 | else | ||
373 | fpga_write(fpga_read(OMAP1510_FPGA_POWER) & ~(1 << 3), | ||
374 | OMAP1510_FPGA_POWER); | ||
375 | |||
376 | return 0; | ||
377 | } | ||
378 | |||
379 | /* | ||
380 | * Innovator could use the following functions tested: | ||
381 | * - mmc_get_wp that uses OMAP_MPUIO(3) | ||
382 | * - mmc_get_cover_state that uses FPGA F4 UIO43 | ||
383 | */ | ||
384 | static struct omap_mmc_platform_data mmc1_data = { | ||
385 | .nr_slots = 1, | ||
386 | .slots[0] = { | ||
387 | .set_power = mmc_set_power, | ||
388 | .wire4 = 1, | ||
389 | .name = "mmcblk", | ||
370 | }, | 390 | }, |
371 | }; | 391 | }; |
372 | 392 | ||
393 | static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC]; | ||
394 | |||
395 | void __init innovator_mmc_init(void) | ||
396 | { | ||
397 | mmc_data[0] = &mmc1_data; | ||
398 | omap1_init_mmc(mmc_data, OMAP15XX_NR_MMC); | ||
399 | } | ||
400 | |||
401 | #else | ||
402 | static inline void innovator_mmc_init(void) | ||
403 | { | ||
404 | } | ||
405 | #endif | ||
406 | |||
373 | static struct omap_uart_config innovator_uart_config __initdata = { | 407 | static struct omap_uart_config innovator_uart_config __initdata = { |
374 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | 408 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), |
375 | }; | 409 | }; |
@@ -377,7 +411,6 @@ static struct omap_uart_config innovator_uart_config __initdata = { | |||
377 | static struct omap_board_config_kernel innovator_config[] = { | 411 | static struct omap_board_config_kernel innovator_config[] = { |
378 | { OMAP_TAG_USB, NULL }, | 412 | { OMAP_TAG_USB, NULL }, |
379 | { OMAP_TAG_LCD, NULL }, | 413 | { OMAP_TAG_LCD, NULL }, |
380 | { OMAP_TAG_MMC, &innovator_mmc_config }, | ||
381 | { OMAP_TAG_UART, &innovator_uart_config }, | 414 | { OMAP_TAG_UART, &innovator_uart_config }, |
382 | }; | 415 | }; |
383 | 416 | ||
@@ -412,6 +445,7 @@ static void __init innovator_init(void) | |||
412 | omap_board_config_size = ARRAY_SIZE(innovator_config); | 445 | omap_board_config_size = ARRAY_SIZE(innovator_config); |
413 | omap_serial_init(); | 446 | omap_serial_init(); |
414 | omap_register_i2c_bus(1, 100, NULL, 0); | 447 | omap_register_i2c_bus(1, 100, NULL, 0); |
448 | innovator_mmc_init(); | ||
415 | } | 449 | } |
416 | 450 | ||
417 | static void __init innovator_map_io(void) | 451 | static void __init innovator_map_io(void) |