diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-n8x0.c')
-rw-r--r-- | arch/arm/mach-omap2/board-n8x0.c | 65 |
1 files changed, 34 insertions, 31 deletions
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 3f7966873507..e823c7042ab3 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/spi/spi.h> | 21 | #include <linux/spi/spi.h> |
22 | #include <linux/usb/musb.h> | 22 | #include <linux/usb/musb.h> |
23 | #include <sound/tlv320aic3x.h> | ||
23 | 24 | ||
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
@@ -383,15 +384,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask) | |||
383 | omap_mmc_notify_cover_event(mmc_device, index, *openp); | 384 | omap_mmc_notify_cover_event(mmc_device, index, *openp); |
384 | } | 385 | } |
385 | 386 | ||
386 | void n8x0_mmc_slot1_cover_handler(void *arg, int closed_state) | ||
387 | { | ||
388 | if (mmc_device == NULL) | ||
389 | return; | ||
390 | |||
391 | slot1_cover_open = !closed_state; | ||
392 | omap_mmc_notify_cover_event(mmc_device, 0, closed_state); | ||
393 | } | ||
394 | |||
395 | static int n8x0_mmc_late_init(struct device *dev) | 387 | static int n8x0_mmc_late_init(struct device *dev) |
396 | { | 388 | { |
397 | int r, bit, *openp; | 389 | int r, bit, *openp; |
@@ -511,7 +503,7 @@ static struct omap_mmc_platform_data mmc1_data = { | |||
511 | 503 | ||
512 | static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC]; | 504 | static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC]; |
513 | 505 | ||
514 | void __init n8x0_mmc_init(void) | 506 | static void __init n8x0_mmc_init(void) |
515 | 507 | ||
516 | { | 508 | { |
517 | int err; | 509 | int err; |
@@ -560,11 +552,6 @@ void __init n8x0_mmc_init(void) | |||
560 | void __init n8x0_mmc_init(void) | 552 | void __init n8x0_mmc_init(void) |
561 | { | 553 | { |
562 | } | 554 | } |
563 | |||
564 | void n8x0_mmc_slot1_cover_handler(void *arg, int state) | ||
565 | { | ||
566 | } | ||
567 | |||
568 | #endif /* CONFIG_MMC_OMAP */ | 555 | #endif /* CONFIG_MMC_OMAP */ |
569 | 556 | ||
570 | #ifdef CONFIG_MENELAUS | 557 | #ifdef CONFIG_MENELAUS |
@@ -614,29 +601,35 @@ static int n8x0_menelaus_late_init(struct device *dev) | |||
614 | return 0; | 601 | return 0; |
615 | } | 602 | } |
616 | 603 | ||
617 | static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] = { | 604 | #else |
605 | static int n8x0_menelaus_late_init(struct device *dev) | ||
606 | { | ||
607 | return 0; | ||
608 | } | ||
609 | #endif | ||
610 | |||
611 | static struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = { | ||
612 | .late_init = n8x0_menelaus_late_init, | ||
613 | }; | ||
614 | |||
615 | static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] __initdata = { | ||
618 | { | 616 | { |
619 | I2C_BOARD_INFO("menelaus", 0x72), | 617 | I2C_BOARD_INFO("menelaus", 0x72), |
620 | .irq = INT_24XX_SYS_NIRQ, | 618 | .irq = INT_24XX_SYS_NIRQ, |
619 | .platform_data = &n8x0_menelaus_platform_data, | ||
621 | }, | 620 | }, |
622 | }; | 621 | }; |
623 | 622 | ||
624 | static struct menelaus_platform_data n8x0_menelaus_platform_data = { | 623 | static struct aic3x_pdata n810_aic33_data __initdata = { |
625 | .late_init = n8x0_menelaus_late_init, | 624 | .gpio_reset = 118, |
626 | }; | 625 | }; |
627 | 626 | ||
628 | static void __init n8x0_menelaus_init(void) | 627 | static struct i2c_board_info n810_i2c_board_info_2[] __initdata = { |
629 | { | 628 | { |
630 | n8x0_i2c_board_info_1[0].platform_data = &n8x0_menelaus_platform_data; | 629 | I2C_BOARD_INFO("tlv320aic3x", 0x18), |
631 | omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1, | 630 | .platform_data = &n810_aic33_data, |
632 | ARRAY_SIZE(n8x0_i2c_board_info_1)); | 631 | }, |
633 | } | 632 | }; |
634 | |||
635 | #else | ||
636 | static inline void __init n8x0_menelaus_init(void) | ||
637 | { | ||
638 | } | ||
639 | #endif | ||
640 | 633 | ||
641 | static void __init n8x0_map_io(void) | 634 | static void __init n8x0_map_io(void) |
642 | { | 635 | { |
@@ -653,6 +646,11 @@ static void __init n8x0_init_irq(void) | |||
653 | 646 | ||
654 | #ifdef CONFIG_OMAP_MUX | 647 | #ifdef CONFIG_OMAP_MUX |
655 | static struct omap_board_mux board_mux[] __initdata = { | 648 | static struct omap_board_mux board_mux[] __initdata = { |
649 | /* I2S codec port pins for McBSP block */ | ||
650 | OMAP2420_MUX(EAC_AC_SCLK, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), | ||
651 | OMAP2420_MUX(EAC_AC_FS, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), | ||
652 | OMAP2420_MUX(EAC_AC_DIN, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), | ||
653 | OMAP2420_MUX(EAC_AC_DOUT, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT), | ||
656 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 654 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
657 | }; | 655 | }; |
658 | #else | 656 | #else |
@@ -665,9 +663,14 @@ static void __init n8x0_init_machine(void) | |||
665 | /* FIXME: add n810 spi devices */ | 663 | /* FIXME: add n810 spi devices */ |
666 | spi_register_board_info(n800_spi_board_info, | 664 | spi_register_board_info(n800_spi_board_info, |
667 | ARRAY_SIZE(n800_spi_board_info)); | 665 | ARRAY_SIZE(n800_spi_board_info)); |
666 | omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1, | ||
667 | ARRAY_SIZE(n8x0_i2c_board_info_1)); | ||
668 | omap_register_i2c_bus(2, 400, NULL, 0); | ||
669 | if (machine_is_nokia_n810()) | ||
670 | i2c_register_board_info(2, n810_i2c_board_info_2, | ||
671 | ARRAY_SIZE(n810_i2c_board_info_2)); | ||
668 | 672 | ||
669 | omap_serial_init(); | 673 | omap_serial_init(); |
670 | n8x0_menelaus_init(); | ||
671 | n8x0_onenand_init(); | 674 | n8x0_onenand_init(); |
672 | n8x0_mmc_init(); | 675 | n8x0_mmc_init(); |
673 | n8x0_usb_init(); | 676 | n8x0_usb_init(); |