aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorR Sricharan <r.sricharan@ti.com>2011-03-11 01:04:46 -0500
committerTony Lindgren <tony@atomide.com>2011-03-11 14:32:50 -0500
commit573efc2babf76422ebc5b373562a4c40d715b88e (patch)
tree688ecfda639e483211c74c86aab0b08f2bcd77ff /arch/arm
parent626dda8a4e17bb2b0f16dd8db5173f20f48d2d22 (diff)
omap4: board-omap4panda: 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')
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c69
1 files changed, 68 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index a94ce07be72f..1dd4401e6466 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -463,8 +463,75 @@ static struct omap_board_mux board_mux[] __initdata = {
463 OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), 463 OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
464 { .reg_offset = OMAP_MUX_TERMINATOR }, 464 { .reg_offset = OMAP_MUX_TERMINATOR },
465}; 465};
466
467static struct omap_device_pad serial2_pads[] __initdata = {
468 OMAP_MUX_STATIC("uart2_cts.uart2_cts",
469 OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
470 OMAP_MUX_STATIC("uart2_rts.uart2_rts",
471 OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
472 OMAP_MUX_STATIC("uart2_rx.uart2_rx",
473 OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
474 OMAP_MUX_STATIC("uart2_tx.uart2_tx",
475 OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
476};
477
478static struct omap_device_pad serial3_pads[] __initdata = {
479 OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx",
480 OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
481 OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd",
482 OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
483 OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx",
484 OMAP_PIN_INPUT | OMAP_MUX_MODE0),
485 OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx",
486 OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
487};
488
489static struct omap_device_pad serial4_pads[] __initdata = {
490 OMAP_MUX_STATIC("uart4_rx.uart4_rx",
491 OMAP_PIN_INPUT | OMAP_MUX_MODE0),
492 OMAP_MUX_STATIC("uart4_tx.uart4_tx",
493 OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
494};
495
496static struct omap_board_data serial2_data = {
497 .id = 1,
498 .pads = serial2_pads,
499 .pads_cnt = ARRAY_SIZE(serial2_pads),
500};
501
502static struct omap_board_data serial3_data = {
503 .id = 2,
504 .pads = serial3_pads,
505 .pads_cnt = ARRAY_SIZE(serial3_pads),
506};
507
508static struct omap_board_data serial4_data = {
509 .id = 3,
510 .pads = serial4_pads,
511 .pads_cnt = ARRAY_SIZE(serial4_pads),
512};
513
514static inline void board_serial_init(void)
515{
516 struct omap_board_data bdata;
517 bdata.flags = 0;
518 bdata.pads = NULL;
519 bdata.pads_cnt = 0;
520 bdata.id = 0;
521 /* pass dummy data for UART1 */
522 omap_serial_init_port(&bdata);
523
524 omap_serial_init_port(&serial2_data);
525 omap_serial_init_port(&serial3_data);
526 omap_serial_init_port(&serial4_data);
527}
466#else 528#else
467#define board_mux NULL 529#define board_mux NULL
530
531static inline void board_serial_init(void)
532{
533 omap_serial_init();
534}
468#endif 535#endif
469 536
470static void __init omap4_panda_init(void) 537static void __init omap4_panda_init(void)
@@ -481,7 +548,7 @@ static void __init omap4_panda_init(void)
481 omap4_panda_i2c_init(); 548 omap4_panda_i2c_init();
482 platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); 549 platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
483 platform_device_register(&omap_vwlan_device); 550 platform_device_register(&omap_vwlan_device);
484 omap_serial_init(); 551 board_serial_init();
485 omap4_twl6030_hsmmc_init(mmc); 552 omap4_twl6030_hsmmc_init(mmc);
486 omap4_ehci_init(); 553 omap4_ehci_init();
487 usb_musb_init(&musb_board_data); 554 usb_musb_init(&musb_board_data);