diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-n8x0.c')
-rw-r--r-- | arch/arm/mach-omap2/board-n8x0.c | 70 |
1 files changed, 48 insertions, 22 deletions
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index e823c7042ab3..147d9005f320 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -184,23 +184,15 @@ static struct mtd_partition onenand_partitions[] = { | |||
184 | }, | 184 | }, |
185 | }; | 185 | }; |
186 | 186 | ||
187 | static struct omap_onenand_platform_data board_onenand_data = { | 187 | static struct omap_onenand_platform_data board_onenand_data[] = { |
188 | .cs = 0, | 188 | { |
189 | .gpio_irq = 26, | 189 | .cs = 0, |
190 | .parts = onenand_partitions, | 190 | .gpio_irq = 26, |
191 | .nr_parts = ARRAY_SIZE(onenand_partitions), | 191 | .parts = onenand_partitions, |
192 | .flags = ONENAND_SYNC_READ, | 192 | .nr_parts = ARRAY_SIZE(onenand_partitions), |
193 | .flags = ONENAND_SYNC_READ, | ||
194 | } | ||
193 | }; | 195 | }; |
194 | |||
195 | static void __init n8x0_onenand_init(void) | ||
196 | { | ||
197 | gpmc_onenand_init(&board_onenand_data); | ||
198 | } | ||
199 | |||
200 | #else | ||
201 | |||
202 | static void __init n8x0_onenand_init(void) {} | ||
203 | |||
204 | #endif | 196 | #endif |
205 | 197 | ||
206 | #if defined(CONFIG_MENELAUS) && \ | 198 | #if defined(CONFIG_MENELAUS) && \ |
@@ -639,9 +631,9 @@ static void __init n8x0_map_io(void) | |||
639 | 631 | ||
640 | static void __init n8x0_init_irq(void) | 632 | static void __init n8x0_init_irq(void) |
641 | { | 633 | { |
642 | omap2_init_common_hw(NULL, NULL); | 634 | omap2_init_common_infrastructure(); |
635 | omap2_init_common_devices(NULL, NULL); | ||
643 | omap_init_irq(); | 636 | omap_init_irq(); |
644 | omap_gpio_init(); | ||
645 | } | 637 | } |
646 | 638 | ||
647 | #ifdef CONFIG_OMAP_MUX | 639 | #ifdef CONFIG_OMAP_MUX |
@@ -653,8 +645,43 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
653 | OMAP2420_MUX(EAC_AC_DOUT, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT), | 645 | OMAP2420_MUX(EAC_AC_DOUT, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT), |
654 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 646 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
655 | }; | 647 | }; |
648 | |||
649 | static struct omap_device_pad serial2_pads[] __initdata = { | ||
650 | { | ||
651 | .name = "uart3_rx_irrx.uart3_rx_irrx", | ||
652 | .flags = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP, | ||
653 | .enable = OMAP_MUX_MODE0, | ||
654 | .idle = OMAP_MUX_MODE3 /* Mux as GPIO for idle */ | ||
655 | }, | ||
656 | }; | ||
657 | |||
658 | static inline void board_serial_init(void) | ||
659 | { | ||
660 | struct omap_board_data bdata; | ||
661 | |||
662 | bdata.flags = 0; | ||
663 | bdata.pads = NULL; | ||
664 | bdata.pads_cnt = 0; | ||
665 | |||
666 | bdata.id = 0; | ||
667 | omap_serial_init_port(&bdata); | ||
668 | |||
669 | bdata.id = 1; | ||
670 | omap_serial_init_port(&bdata); | ||
671 | |||
672 | bdata.id = 2; | ||
673 | bdata.pads = serial2_pads; | ||
674 | bdata.pads_cnt = ARRAY_SIZE(serial2_pads); | ||
675 | omap_serial_init_port(&bdata); | ||
676 | } | ||
677 | |||
656 | #else | 678 | #else |
657 | #define board_mux NULL | 679 | |
680 | static inline void board_serial_init(void) | ||
681 | { | ||
682 | omap_serial_init(); | ||
683 | } | ||
684 | |||
658 | #endif | 685 | #endif |
659 | 686 | ||
660 | static void __init n8x0_init_machine(void) | 687 | static void __init n8x0_init_machine(void) |
@@ -669,9 +696,8 @@ static void __init n8x0_init_machine(void) | |||
669 | if (machine_is_nokia_n810()) | 696 | if (machine_is_nokia_n810()) |
670 | i2c_register_board_info(2, n810_i2c_board_info_2, | 697 | i2c_register_board_info(2, n810_i2c_board_info_2, |
671 | ARRAY_SIZE(n810_i2c_board_info_2)); | 698 | ARRAY_SIZE(n810_i2c_board_info_2)); |
672 | 699 | board_serial_init(); | |
673 | omap_serial_init(); | 700 | gpmc_onenand_init(board_onenand_data); |
674 | n8x0_onenand_init(); | ||
675 | n8x0_mmc_init(); | 701 | n8x0_mmc_init(); |
676 | n8x0_usb_init(); | 702 | n8x0_usb_init(); |
677 | } | 703 | } |