aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorR Sricharan <r.sricharan@ti.com>2011-03-11 01:04:45 -0500
committerTony Lindgren <tony@atomide.com>2011-03-11 14:32:40 -0500
commit626dda8a4e17bb2b0f16dd8db5173f20f48d2d22 (patch)
treec9158a2f990ef34101a2efc73497707aa3f58edf /arch/arm/mach-omap2
parentdae335265561bf6ade66be494888a24b6419e345 (diff)
omap3: board-3430sdp: Initialise the serial pads
Use the mux framework to initialise the serial pads. Signed-off-by: sricharan <r.sricharan@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c102
1 files changed, 101 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 5464bec156ad..b3918044e059 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -652,6 +652,106 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
652static struct omap_board_mux board_mux[] __initdata = { 652static struct omap_board_mux board_mux[] __initdata = {
653 { .reg_offset = OMAP_MUX_TERMINATOR }, 653 { .reg_offset = OMAP_MUX_TERMINATOR },
654}; 654};
655
656static struct omap_device_pad serial1_pads[] __initdata = {
657 /*
658 * Note that off output enable is an active low
659 * signal. So setting this means pin is a
660 * input enabled in off mode
661 */
662 OMAP_MUX_STATIC("uart1_cts.uart1_cts",
663 OMAP_PIN_INPUT |
664 OMAP_PIN_OFF_INPUT_PULLDOWN |
665 OMAP_OFFOUT_EN |
666 OMAP_MUX_MODE0),
667 OMAP_MUX_STATIC("uart1_rts.uart1_rts",
668 OMAP_PIN_OUTPUT |
669 OMAP_OFF_EN |
670 OMAP_MUX_MODE0),
671 OMAP_MUX_STATIC("uart1_rx.uart1_rx",
672 OMAP_PIN_INPUT |
673 OMAP_PIN_OFF_INPUT_PULLDOWN |
674 OMAP_OFFOUT_EN |
675 OMAP_MUX_MODE0),
676 OMAP_MUX_STATIC("uart1_tx.uart1_tx",
677 OMAP_PIN_OUTPUT |
678 OMAP_OFF_EN |
679 OMAP_MUX_MODE0),
680};
681
682static struct omap_device_pad serial2_pads[] __initdata = {
683 OMAP_MUX_STATIC("uart2_cts.uart2_cts",
684 OMAP_PIN_INPUT_PULLUP |
685 OMAP_PIN_OFF_INPUT_PULLDOWN |
686 OMAP_OFFOUT_EN |
687 OMAP_MUX_MODE0),
688 OMAP_MUX_STATIC("uart2_rts.uart2_rts",
689 OMAP_PIN_OUTPUT |
690 OMAP_OFF_EN |
691 OMAP_MUX_MODE0),
692 OMAP_MUX_STATIC("uart2_rx.uart2_rx",
693 OMAP_PIN_INPUT |
694 OMAP_PIN_OFF_INPUT_PULLDOWN |
695 OMAP_OFFOUT_EN |
696 OMAP_MUX_MODE0),
697 OMAP_MUX_STATIC("uart2_tx.uart2_tx",
698 OMAP_PIN_OUTPUT |
699 OMAP_OFF_EN |
700 OMAP_MUX_MODE0),
701};
702
703static struct omap_device_pad serial3_pads[] __initdata = {
704 OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx",
705 OMAP_PIN_INPUT_PULLDOWN |
706 OMAP_PIN_OFF_INPUT_PULLDOWN |
707 OMAP_OFFOUT_EN |
708 OMAP_MUX_MODE0),
709 OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd",
710 OMAP_PIN_OUTPUT |
711 OMAP_OFF_EN |
712 OMAP_MUX_MODE0),
713 OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx",
714 OMAP_PIN_INPUT |
715 OMAP_PIN_OFF_INPUT_PULLDOWN |
716 OMAP_OFFOUT_EN |
717 OMAP_MUX_MODE0),
718 OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx",
719 OMAP_PIN_OUTPUT |
720 OMAP_OFF_EN |
721 OMAP_MUX_MODE0),
722};
723
724static struct omap_board_data serial1_data = {
725 .id = 0,
726 .pads = serial1_pads,
727 .pads_cnt = ARRAY_SIZE(serial1_pads),
728};
729
730static struct omap_board_data serial2_data = {
731 .id = 1,
732 .pads = serial2_pads,
733 .pads_cnt = ARRAY_SIZE(serial2_pads),
734};
735
736static struct omap_board_data serial3_data = {
737 .id = 2,
738 .pads = serial3_pads,
739 .pads_cnt = ARRAY_SIZE(serial3_pads),
740};
741
742static inline void board_serial_init(void)
743{
744 omap_serial_init_port(&serial1_data);
745 omap_serial_init_port(&serial2_data);
746 omap_serial_init_port(&serial3_data);
747}
748#else
749#define board_mux NULL
750
751static inline void board_serial_init(void)
752{
753 omap_serial_init();
754}
655#endif 755#endif
656 756
657/* 757/*
@@ -796,7 +896,7 @@ static void __init omap_3430sdp_init(void)
796 spi_register_board_info(sdp3430_spi_board_info, 896 spi_register_board_info(sdp3430_spi_board_info,
797 ARRAY_SIZE(sdp3430_spi_board_info)); 897 ARRAY_SIZE(sdp3430_spi_board_info));
798 ads7846_dev_init(); 898 ads7846_dev_init();
799 omap_serial_init(); 899 board_serial_init();
800 usb_musb_init(&musb_board_data); 900 usb_musb_init(&musb_board_data);
801 board_smc91x_init(); 901 board_smc91x_init();
802 board_flash_init(sdp_flash_partitions, chip_sel_3430, 0); 902 board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);