diff options
-rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 4 | ||||
-rwxr-xr-x | arch/arm/mach-omap2/board-3630sdp.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3pandora.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-overo.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 62 | ||||
-rw-r--r-- | arch/arm/mach-omap2/usb-ehci.c | 166 |
11 files changed, 177 insertions, 102 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index e5d911881534..ded3e875ec80 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -626,7 +626,9 @@ static inline void board_smc91x_init(void) | |||
626 | 626 | ||
627 | static void enable_board_wakeup_source(void) | 627 | static void enable_board_wakeup_source(void) |
628 | { | 628 | { |
629 | omap_cfg_reg(AF26_34XX_SYS_NIRQ); /* T2 interrupt line (keypad) */ | 629 | /* T2 interrupt line (keypad) */ |
630 | omap_mux_init_signal("sys_nirq", | ||
631 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); | ||
630 | } | 632 | } |
631 | 633 | ||
632 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 634 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index 348b70b98336..e6cbc27dd107 100755 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <mach/board-zoom.h> | 24 | #include <mach/board-zoom.h> |
25 | 25 | ||
26 | #include "mux.h" | ||
26 | #include "sdram-hynix-h8mbx00u0mer-0em.h" | 27 | #include "sdram-hynix-h8mbx00u0mer-0em.h" |
27 | 28 | ||
28 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 29 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
@@ -48,7 +49,9 @@ static inline void board_smc91x_init(void) | |||
48 | 49 | ||
49 | static void enable_board_wakeup_source(void) | 50 | static void enable_board_wakeup_source(void) |
50 | { | 51 | { |
51 | omap_cfg_reg(AF26_34XX_SYS_NIRQ); /* T2 interrupt line (keypad) */ | 52 | /* T2 interrupt line (keypad) */ |
53 | omap_mux_init_signal("sys_nirq", | ||
54 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); | ||
52 | } | 55 | } |
53 | 56 | ||
54 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 57 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 84321f67e7f1..10a595548724 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -503,7 +503,8 @@ static void __init cm_t35_init(void) | |||
503 | 503 | ||
504 | usb_musb_init(); | 504 | usb_musb_init(); |
505 | 505 | ||
506 | omap_cfg_reg(AF26_34XX_SYS_NIRQ); | 506 | omap_mux_init_signal("sys_nirq", |
507 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); | ||
507 | } | 508 | } |
508 | 509 | ||
509 | MACHINE_START(CM_T35, "Compulab CM-T35") | 510 | MACHINE_START(CM_T35, "Compulab CM-T35") |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index e669dbb23b7e..9e606b107ee6 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -141,10 +141,10 @@ static int beagle_twl_gpio_setup(struct device *dev, | |||
141 | unsigned gpio, unsigned ngpio) | 141 | unsigned gpio, unsigned ngpio) |
142 | { | 142 | { |
143 | if (system_rev >= 0x20 && system_rev <= 0x34301000) { | 143 | if (system_rev >= 0x20 && system_rev <= 0x34301000) { |
144 | omap_cfg_reg(AG9_34XX_GPIO23); | 144 | omap_mux_init_gpio(23, OMAP_PIN_INPUT); |
145 | mmc[0].gpio_wp = 23; | 145 | mmc[0].gpio_wp = 23; |
146 | } else { | 146 | } else { |
147 | omap_cfg_reg(AH8_34XX_GPIO29); | 147 | omap_mux_init_gpio(29, OMAP_PIN_INPUT); |
148 | } | 148 | } |
149 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 149 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
150 | mmc[0].gpio_cd = gpio + 0; | 150 | mmc[0].gpio_cd = gpio + 0; |
@@ -439,7 +439,7 @@ static void __init omap3_beagle_init(void) | |||
439 | ARRAY_SIZE(omap3_beagle_devices)); | 439 | ARRAY_SIZE(omap3_beagle_devices)); |
440 | omap_serial_init(); | 440 | omap_serial_init(); |
441 | 441 | ||
442 | omap_cfg_reg(J25_34XX_GPIO170); | 442 | omap_mux_init_gpio(170, OMAP_PIN_INPUT); |
443 | gpio_request(170, "DVI_nPD"); | 443 | gpio_request(170, "DVI_nPD"); |
444 | /* REVISIT leave DVI powered down until it's needed ... */ | 444 | /* REVISIT leave DVI powered down until it's needed ... */ |
445 | gpio_direction_output(170, true); | 445 | gpio_direction_output(170, true); |
@@ -449,8 +449,8 @@ static void __init omap3_beagle_init(void) | |||
449 | omap3beagle_flash_init(); | 449 | omap3beagle_flash_init(); |
450 | 450 | ||
451 | /* Ensure SDRC pins are mux'd for self-refresh */ | 451 | /* Ensure SDRC pins are mux'd for self-refresh */ |
452 | omap_cfg_reg(H16_34XX_SDRC_CKE0); | 452 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
453 | omap_cfg_reg(H17_34XX_SDRC_CKE1); | 453 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
454 | } | 454 | } |
455 | 455 | ||
456 | static void __init omap3_beagle_map_io(void) | 456 | static void __init omap3_beagle_map_io(void) |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index ad174aeb6101..0457f615339f 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -224,7 +224,7 @@ static int omap3evm_twl_gpio_setup(struct device *dev, | |||
224 | unsigned gpio, unsigned ngpio) | 224 | unsigned gpio, unsigned ngpio) |
225 | { | 225 | { |
226 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 226 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
227 | omap_cfg_reg(L8_34XX_GPIO63); | 227 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); |
228 | mmc[0].gpio_cd = gpio + 0; | 228 | mmc[0].gpio_cd = gpio + 0; |
229 | twl4030_mmc_init(mmc); | 229 | twl4030_mmc_init(mmc); |
230 | 230 | ||
@@ -450,24 +450,24 @@ static void __init omap3_evm_init(void) | |||
450 | #endif | 450 | #endif |
451 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { | 451 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { |
452 | /* enable EHCI VBUS using GPIO22 */ | 452 | /* enable EHCI VBUS using GPIO22 */ |
453 | omap_cfg_reg(AF9_34XX_GPIO22); | 453 | omap_mux_init_gpio(22, OMAP_PIN_INPUT_PULLUP); |
454 | gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS"); | 454 | gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS"); |
455 | gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0); | 455 | gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0); |
456 | gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1); | 456 | gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1); |
457 | 457 | ||
458 | /* Select EHCI port on main board */ | 458 | /* Select EHCI port on main board */ |
459 | omap_cfg_reg(U3_34XX_GPIO61); | 459 | omap_mux_init_gpio(61, OMAP_PIN_INPUT_PULLUP); |
460 | gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port"); | 460 | gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port"); |
461 | gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0); | 461 | gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0); |
462 | gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0); | 462 | gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0); |
463 | 463 | ||
464 | /* setup EHCI phy reset config */ | 464 | /* setup EHCI phy reset config */ |
465 | omap_cfg_reg(AH14_34XX_GPIO21); | 465 | omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP); |
466 | ehci_pdata.reset_gpio_port[1] = 21; | 466 | ehci_pdata.reset_gpio_port[1] = 21; |
467 | 467 | ||
468 | } else { | 468 | } else { |
469 | /* setup EHCI phy reset on MDC */ | 469 | /* setup EHCI phy reset on MDC */ |
470 | omap_cfg_reg(AF4_34XX_GPIO135_OUT); | 470 | omap_mux_init_gpio(135, OMAP_PIN_OUTPUT); |
471 | ehci_pdata.reset_gpio_port[1] = 135; | 471 | ehci_pdata.reset_gpio_port[1] = 135; |
472 | } | 472 | } |
473 | usb_musb_init(); | 473 | usb_musb_init(); |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 9f59c03d7808..bca5ad9efe9c 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -433,8 +433,8 @@ static void __init omap3pandora_init(void) | |||
433 | usb_musb_init(); | 433 | usb_musb_init(); |
434 | 434 | ||
435 | /* Ensure SDRC pins are mux'd for self-refresh */ | 435 | /* Ensure SDRC pins are mux'd for self-refresh */ |
436 | omap_cfg_reg(H16_34XX_SDRC_CKE0); | 436 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
437 | omap_cfg_reg(H17_34XX_SDRC_CKE1); | 437 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
438 | } | 438 | } |
439 | 439 | ||
440 | static void __init omap3pandora_map_io(void) | 440 | static void __init omap3pandora_map_io(void) |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 40f3c85cba30..1ebde4c3bf46 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -427,8 +427,8 @@ static void __init overo_init(void) | |||
427 | overo_init_smsc911x(); | 427 | overo_init_smsc911x(); |
428 | 428 | ||
429 | /* Ensure SDRC pins are mux'd for self-refresh */ | 429 | /* Ensure SDRC pins are mux'd for self-refresh */ |
430 | omap_cfg_reg(H16_34XX_SDRC_CKE0); | 430 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
431 | omap_cfg_reg(H17_34XX_SDRC_CKE1); | 431 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
432 | 432 | ||
433 | if ((gpio_request(OVERO_GPIO_W2W_NRESET, | 433 | if ((gpio_request(OVERO_GPIO_W2W_NRESET, |
434 | "OVERO_GPIO_W2W_NRESET") == 0) && | 434 | "OVERO_GPIO_W2W_NRESET") == 0) && |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 15ce6514c5fd..81444209700e 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <plat/onenand.h> | 33 | #include <plat/onenand.h> |
34 | #include <plat/gpmc-smc91x.h> | 34 | #include <plat/gpmc-smc91x.h> |
35 | 35 | ||
36 | #include "mux.h" | ||
36 | #include "mmc-twl4030.h" | 37 | #include "mmc-twl4030.h" |
37 | 38 | ||
38 | #define SYSTEM_REV_B_USES_VAUX3 0x1699 | 39 | #define SYSTEM_REV_B_USES_VAUX3 0x1699 |
@@ -630,9 +631,9 @@ static struct omap_smc91x_platform_data board_smc91x_data = { | |||
630 | 631 | ||
631 | static void __init board_smc91x_init(void) | 632 | static void __init board_smc91x_init(void) |
632 | { | 633 | { |
633 | omap_cfg_reg(U8_34XX_GPIO54_DOWN); | 634 | omap_mux_init_gpio(54, OMAP_PIN_INPUT_PULLDOWN); |
634 | omap_cfg_reg(G25_34XX_GPIO86_OUT); | 635 | omap_mux_init_gpio(86, OMAP_PIN_OUTPUT); |
635 | omap_cfg_reg(H19_34XX_GPIO164_OUT); | 636 | omap_mux_init_gpio(164, OMAP_PIN_OUTPUT); |
636 | 637 | ||
637 | gpmc_smc91x_init(&board_smc91x_data); | 638 | gpmc_smc91x_init(&board_smc91x_data); |
638 | } | 639 | } |
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index c0c99adc4320..fd71c005105d 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
@@ -87,8 +87,8 @@ static void __init rx51_init(void) | |||
87 | rx51_peripherals_init(); | 87 | rx51_peripherals_init(); |
88 | 88 | ||
89 | /* Ensure SDRC pins are mux'd for self-refresh */ | 89 | /* Ensure SDRC pins are mux'd for self-refresh */ |
90 | omap_cfg_reg(H16_34XX_SDRC_CKE0); | 90 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
91 | omap_cfg_reg(H17_34XX_SDRC_CKE1); | 91 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
92 | } | 92 | } |
93 | 93 | ||
94 | static void __init rx51_map_io(void) | 94 | static void __init rx51_map_io(void) |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 733d3dcff98b..18ad93160abb 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <mach/gpio.h> | 27 | #include <mach/gpio.h> |
28 | #include <plat/mmc.h> | 28 | #include <plat/mmc.h> |
29 | 29 | ||
30 | #include "mux.h" | ||
31 | |||
30 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) | 32 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) |
31 | 33 | ||
32 | static struct resource cam_resources[] = { | 34 | static struct resource cam_resources[] = { |
@@ -595,27 +597,40 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, | |||
595 | 597 | ||
596 | if (cpu_is_omap34xx()) { | 598 | if (cpu_is_omap34xx()) { |
597 | if (controller_nr == 0) { | 599 | if (controller_nr == 0) { |
598 | omap_cfg_reg(N28_3430_MMC1_CLK); | 600 | omap_mux_init_signal("sdmmc1_clk", |
599 | omap_cfg_reg(M27_3430_MMC1_CMD); | 601 | OMAP_PIN_INPUT_PULLUP); |
600 | omap_cfg_reg(N27_3430_MMC1_DAT0); | 602 | omap_mux_init_signal("sdmmc1_cmd", |
603 | OMAP_PIN_INPUT_PULLUP); | ||
604 | omap_mux_init_signal("sdmmc1_dat0", | ||
605 | OMAP_PIN_INPUT_PULLUP); | ||
601 | if (mmc_controller->slots[0].wires == 4 || | 606 | if (mmc_controller->slots[0].wires == 4 || |
602 | mmc_controller->slots[0].wires == 8) { | 607 | mmc_controller->slots[0].wires == 8) { |
603 | omap_cfg_reg(N26_3430_MMC1_DAT1); | 608 | omap_mux_init_signal("sdmmc1_dat1", |
604 | omap_cfg_reg(N25_3430_MMC1_DAT2); | 609 | OMAP_PIN_INPUT_PULLUP); |
605 | omap_cfg_reg(P28_3430_MMC1_DAT3); | 610 | omap_mux_init_signal("sdmmc1_dat2", |
611 | OMAP_PIN_INPUT_PULLUP); | ||
612 | omap_mux_init_signal("sdmmc1_dat3", | ||
613 | OMAP_PIN_INPUT_PULLUP); | ||
606 | } | 614 | } |
607 | if (mmc_controller->slots[0].wires == 8) { | 615 | if (mmc_controller->slots[0].wires == 8) { |
608 | omap_cfg_reg(P27_3430_MMC1_DAT4); | 616 | omap_mux_init_signal("sdmmc1_dat4", |
609 | omap_cfg_reg(P26_3430_MMC1_DAT5); | 617 | OMAP_PIN_INPUT_PULLUP); |
610 | omap_cfg_reg(R27_3430_MMC1_DAT6); | 618 | omap_mux_init_signal("sdmmc1_dat5", |
611 | omap_cfg_reg(R25_3430_MMC1_DAT7); | 619 | OMAP_PIN_INPUT_PULLUP); |
620 | omap_mux_init_signal("sdmmc1_dat6", | ||
621 | OMAP_PIN_INPUT_PULLUP); | ||
622 | omap_mux_init_signal("sdmmc1_dat7", | ||
623 | OMAP_PIN_INPUT_PULLUP); | ||
612 | } | 624 | } |
613 | } | 625 | } |
614 | if (controller_nr == 1) { | 626 | if (controller_nr == 1) { |
615 | /* MMC2 */ | 627 | /* MMC2 */ |
616 | omap_cfg_reg(AE2_3430_MMC2_CLK); | 628 | omap_mux_init_signal("sdmmc2_clk", |
617 | omap_cfg_reg(AG5_3430_MMC2_CMD); | 629 | OMAP_PIN_INPUT_PULLUP); |
618 | omap_cfg_reg(AH5_3430_MMC2_DAT0); | 630 | omap_mux_init_signal("sdmmc2_cmd", |
631 | OMAP_PIN_INPUT_PULLUP); | ||
632 | omap_mux_init_signal("sdmmc2_dat0", | ||
633 | OMAP_PIN_INPUT_PULLUP); | ||
619 | 634 | ||
620 | /* | 635 | /* |
621 | * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed | 636 | * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed |
@@ -623,15 +638,22 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, | |||
623 | */ | 638 | */ |
624 | if (mmc_controller->slots[0].wires == 4 || | 639 | if (mmc_controller->slots[0].wires == 4 || |
625 | mmc_controller->slots[0].wires == 8) { | 640 | mmc_controller->slots[0].wires == 8) { |
626 | omap_cfg_reg(AH4_3430_MMC2_DAT1); | 641 | omap_mux_init_signal("sdmmc2_dat1", |
627 | omap_cfg_reg(AG4_3430_MMC2_DAT2); | 642 | OMAP_PIN_INPUT_PULLUP); |
628 | omap_cfg_reg(AF4_3430_MMC2_DAT3); | 643 | omap_mux_init_signal("sdmmc2_dat2", |
644 | OMAP_PIN_INPUT_PULLUP); | ||
645 | omap_mux_init_signal("sdmmc2_dat3", | ||
646 | OMAP_PIN_INPUT_PULLUP); | ||
629 | } | 647 | } |
630 | if (mmc_controller->slots[0].wires == 8) { | 648 | if (mmc_controller->slots[0].wires == 8) { |
631 | omap_cfg_reg(AE4_3430_MMC2_DAT4); | 649 | omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4", |
632 | omap_cfg_reg(AH3_3430_MMC2_DAT5); | 650 | OMAP_PIN_INPUT_PULLUP); |
633 | omap_cfg_reg(AF3_3430_MMC2_DAT6); | 651 | omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5", |
634 | omap_cfg_reg(AE3_3430_MMC2_DAT7); | 652 | OMAP_PIN_INPUT_PULLUP); |
653 | omap_mux_init_signal("sdmmc2_dat6.sdmmc2_dat6", | ||
654 | OMAP_PIN_INPUT_PULLUP); | ||
655 | omap_mux_init_signal("sdmmc2_dat7.sdmmc2_dat7", | ||
656 | OMAP_PIN_INPUT_PULLUP); | ||
635 | } | 657 | } |
636 | } | 658 | } |
637 | 659 | ||
diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c index e448abd5ec5d..f1df873d59db 100644 --- a/arch/arm/mach-omap2/usb-ehci.c +++ b/arch/arm/mach-omap2/usb-ehci.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <mach/irqs.h> | 27 | #include <mach/irqs.h> |
28 | #include <plat/usb.h> | 28 | #include <plat/usb.h> |
29 | 29 | ||
30 | #include "mux.h" | ||
31 | |||
30 | #if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_EHCI_HCD_MODULE) | 32 | #if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_EHCI_HCD_MODULE) |
31 | 33 | ||
32 | static struct resource ehci_resources[] = { | 34 | static struct resource ehci_resources[] = { |
@@ -72,32 +74,44 @@ static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode) | |||
72 | { | 74 | { |
73 | switch (port_mode[0]) { | 75 | switch (port_mode[0]) { |
74 | case EHCI_HCD_OMAP_MODE_PHY: | 76 | case EHCI_HCD_OMAP_MODE_PHY: |
75 | omap_cfg_reg(Y9_3430_USB1HS_PHY_STP); | 77 | omap_mux_init_signal("hsusb1_stp", OMAP_PIN_OUTPUT); |
76 | omap_cfg_reg(Y8_3430_USB1HS_PHY_CLK); | 78 | omap_mux_init_signal("hsusb1_clk", OMAP_PIN_OUTPUT); |
77 | omap_cfg_reg(AA14_3430_USB1HS_PHY_DIR); | 79 | omap_mux_init_signal("hsusb1_dir", OMAP_PIN_INPUT_PULLDOWN); |
78 | omap_cfg_reg(AA11_3430_USB1HS_PHY_NXT); | 80 | omap_mux_init_signal("hsusb1_nxt", OMAP_PIN_INPUT_PULLDOWN); |
79 | omap_cfg_reg(W13_3430_USB1HS_PHY_DATA0); | 81 | omap_mux_init_signal("hsusb1_data0", OMAP_PIN_INPUT_PULLDOWN); |
80 | omap_cfg_reg(W12_3430_USB1HS_PHY_DATA1); | 82 | omap_mux_init_signal("hsusb1_data1", OMAP_PIN_INPUT_PULLDOWN); |
81 | omap_cfg_reg(W11_3430_USB1HS_PHY_DATA2); | 83 | omap_mux_init_signal("hsusb1_data2", OMAP_PIN_INPUT_PULLDOWN); |
82 | omap_cfg_reg(Y11_3430_USB1HS_PHY_DATA3); | 84 | omap_mux_init_signal("hsusb1_data3", OMAP_PIN_INPUT_PULLDOWN); |
83 | omap_cfg_reg(W9_3430_USB1HS_PHY_DATA4); | 85 | omap_mux_init_signal("hsusb1_data4", OMAP_PIN_INPUT_PULLDOWN); |
84 | omap_cfg_reg(Y12_3430_USB1HS_PHY_DATA5); | 86 | omap_mux_init_signal("hsusb1_data5", OMAP_PIN_INPUT_PULLDOWN); |
85 | omap_cfg_reg(W8_3430_USB1HS_PHY_DATA6); | 87 | omap_mux_init_signal("hsusb1_data6", OMAP_PIN_INPUT_PULLDOWN); |
86 | omap_cfg_reg(Y13_3430_USB1HS_PHY_DATA7); | 88 | omap_mux_init_signal("hsusb1_data7", OMAP_PIN_INPUT_PULLDOWN); |
87 | break; | 89 | break; |
88 | case EHCI_HCD_OMAP_MODE_TLL: | 90 | case EHCI_HCD_OMAP_MODE_TLL: |
89 | omap_cfg_reg(Y9_3430_USB1HS_TLL_STP); | 91 | omap_mux_init_signal("hsusb1_tll_stp", |
90 | omap_cfg_reg(Y8_3430_USB1HS_TLL_CLK); | 92 | OMAP_PIN_INPUT_PULLUP); |
91 | omap_cfg_reg(AA14_3430_USB1HS_TLL_DIR); | 93 | omap_mux_init_signal("hsusb1_tll_clk", |
92 | omap_cfg_reg(AA11_3430_USB1HS_TLL_NXT); | 94 | OMAP_PIN_INPUT_PULLDOWN); |
93 | omap_cfg_reg(W13_3430_USB1HS_TLL_DATA0); | 95 | omap_mux_init_signal("hsusb1_tll_dir", |
94 | omap_cfg_reg(W12_3430_USB1HS_TLL_DATA1); | 96 | OMAP_PIN_INPUT_PULLDOWN); |
95 | omap_cfg_reg(W11_3430_USB1HS_TLL_DATA2); | 97 | omap_mux_init_signal("hsusb1_tll_nxt", |
96 | omap_cfg_reg(Y11_3430_USB1HS_TLL_DATA3); | 98 | OMAP_PIN_INPUT_PULLDOWN); |
97 | omap_cfg_reg(W9_3430_USB1HS_TLL_DATA4); | 99 | omap_mux_init_signal("hsusb1_tll_data0", |
98 | omap_cfg_reg(Y12_3430_USB1HS_TLL_DATA5); | 100 | OMAP_PIN_INPUT_PULLDOWN); |
99 | omap_cfg_reg(W8_3430_USB1HS_TLL_DATA6); | 101 | omap_mux_init_signal("hsusb1_tll_data1", |
100 | omap_cfg_reg(Y13_3430_USB1HS_TLL_DATA7); | 102 | OMAP_PIN_INPUT_PULLDOWN); |
103 | omap_mux_init_signal("hsusb1_tll_data2", | ||
104 | OMAP_PIN_INPUT_PULLDOWN); | ||
105 | omap_mux_init_signal("hsusb1_tll_data3", | ||
106 | OMAP_PIN_INPUT_PULLDOWN); | ||
107 | omap_mux_init_signal("hsusb1_tll_data4", | ||
108 | OMAP_PIN_INPUT_PULLDOWN); | ||
109 | omap_mux_init_signal("hsusb1_tll_data5", | ||
110 | OMAP_PIN_INPUT_PULLDOWN); | ||
111 | omap_mux_init_signal("hsusb1_tll_data6", | ||
112 | OMAP_PIN_INPUT_PULLDOWN); | ||
113 | omap_mux_init_signal("hsusb1_tll_data7", | ||
114 | OMAP_PIN_INPUT_PULLDOWN); | ||
101 | break; | 115 | break; |
102 | case EHCI_HCD_OMAP_MODE_UNKNOWN: | 116 | case EHCI_HCD_OMAP_MODE_UNKNOWN: |
103 | /* FALLTHROUGH */ | 117 | /* FALLTHROUGH */ |
@@ -107,32 +121,52 @@ static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode) | |||
107 | 121 | ||
108 | switch (port_mode[1]) { | 122 | switch (port_mode[1]) { |
109 | case EHCI_HCD_OMAP_MODE_PHY: | 123 | case EHCI_HCD_OMAP_MODE_PHY: |
110 | omap_cfg_reg(AA10_3430_USB2HS_PHY_STP); | 124 | omap_mux_init_signal("hsusb2_stp", OMAP_PIN_OUTPUT); |
111 | omap_cfg_reg(AA8_3430_USB2HS_PHY_CLK); | 125 | omap_mux_init_signal("hsusb2_clk", OMAP_PIN_OUTPUT); |
112 | omap_cfg_reg(AA9_3430_USB2HS_PHY_DIR); | 126 | omap_mux_init_signal("hsusb2_dir", OMAP_PIN_INPUT_PULLDOWN); |
113 | omap_cfg_reg(AB11_3430_USB2HS_PHY_NXT); | 127 | omap_mux_init_signal("hsusb2_nxt", OMAP_PIN_INPUT_PULLDOWN); |
114 | omap_cfg_reg(AB10_3430_USB2HS_PHY_DATA0); | 128 | omap_mux_init_signal("hsusb2_data0", |
115 | omap_cfg_reg(AB9_3430_USB2HS_PHY_DATA1); | 129 | OMAP_PIN_INPUT_PULLDOWN); |
116 | omap_cfg_reg(W3_3430_USB2HS_PHY_DATA2); | 130 | omap_mux_init_signal("hsusb2_data1", |
117 | omap_cfg_reg(T4_3430_USB2HS_PHY_DATA3); | 131 | OMAP_PIN_INPUT_PULLDOWN); |
118 | omap_cfg_reg(T3_3430_USB2HS_PHY_DATA4); | 132 | omap_mux_init_signal("hsusb2_data2", |
119 | omap_cfg_reg(R3_3430_USB2HS_PHY_DATA5); | 133 | OMAP_PIN_INPUT_PULLDOWN); |
120 | omap_cfg_reg(R4_3430_USB2HS_PHY_DATA6); | 134 | omap_mux_init_signal("hsusb2_data3", |
121 | omap_cfg_reg(T2_3430_USB2HS_PHY_DATA7); | 135 | OMAP_PIN_INPUT_PULLDOWN); |
136 | omap_mux_init_signal("hsusb2_data4", | ||
137 | OMAP_PIN_INPUT_PULLDOWN); | ||
138 | omap_mux_init_signal("hsusb2_data5", | ||
139 | OMAP_PIN_INPUT_PULLDOWN); | ||
140 | omap_mux_init_signal("hsusb2_data6", | ||
141 | OMAP_PIN_INPUT_PULLDOWN); | ||
142 | omap_mux_init_signal("hsusb2_data7", | ||
143 | OMAP_PIN_INPUT_PULLDOWN); | ||
122 | break; | 144 | break; |
123 | case EHCI_HCD_OMAP_MODE_TLL: | 145 | case EHCI_HCD_OMAP_MODE_TLL: |
124 | omap_cfg_reg(AA10_3430_USB2HS_TLL_STP); | 146 | omap_mux_init_signal("hsusb2_tll_stp", |
125 | omap_cfg_reg(AA8_3430_USB2HS_TLL_CLK); | 147 | OMAP_PIN_INPUT_PULLUP); |
126 | omap_cfg_reg(AA9_3430_USB2HS_TLL_DIR); | 148 | omap_mux_init_signal("hsusb2_tll_clk", |
127 | omap_cfg_reg(AB11_3430_USB2HS_TLL_NXT); | 149 | OMAP_PIN_INPUT_PULLDOWN); |
128 | omap_cfg_reg(AB10_3430_USB2HS_TLL_DATA0); | 150 | omap_mux_init_signal("hsusb2_tll_dir", |
129 | omap_cfg_reg(AB9_3430_USB2HS_TLL_DATA1); | 151 | OMAP_PIN_INPUT_PULLDOWN); |
130 | omap_cfg_reg(W3_3430_USB2HS_TLL_DATA2); | 152 | omap_mux_init_signal("hsusb2_tll_nxt", |
131 | omap_cfg_reg(T4_3430_USB2HS_TLL_DATA3); | 153 | OMAP_PIN_INPUT_PULLDOWN); |
132 | omap_cfg_reg(T3_3430_USB2HS_TLL_DATA4); | 154 | omap_mux_init_signal("hsusb2_tll_data0", |
133 | omap_cfg_reg(R3_3430_USB2HS_TLL_DATA5); | 155 | OMAP_PIN_INPUT_PULLDOWN); |
134 | omap_cfg_reg(R4_3430_USB2HS_TLL_DATA6); | 156 | omap_mux_init_signal("hsusb2_tll_data1", |
135 | omap_cfg_reg(T2_3430_USB2HS_TLL_DATA7); | 157 | OMAP_PIN_INPUT_PULLDOWN); |
158 | omap_mux_init_signal("hsusb2_tll_data2", | ||
159 | OMAP_PIN_INPUT_PULLDOWN); | ||
160 | omap_mux_init_signal("hsusb2_tll_data3", | ||
161 | OMAP_PIN_INPUT_PULLDOWN); | ||
162 | omap_mux_init_signal("hsusb2_tll_data4", | ||
163 | OMAP_PIN_INPUT_PULLDOWN); | ||
164 | omap_mux_init_signal("hsusb2_tll_data5", | ||
165 | OMAP_PIN_INPUT_PULLDOWN); | ||
166 | omap_mux_init_signal("hsusb2_tll_data6", | ||
167 | OMAP_PIN_INPUT_PULLDOWN); | ||
168 | omap_mux_init_signal("hsusb2_tll_data7", | ||
169 | OMAP_PIN_INPUT_PULLDOWN); | ||
136 | break; | 170 | break; |
137 | case EHCI_HCD_OMAP_MODE_UNKNOWN: | 171 | case EHCI_HCD_OMAP_MODE_UNKNOWN: |
138 | /* FALLTHROUGH */ | 172 | /* FALLTHROUGH */ |
@@ -145,18 +179,30 @@ static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode) | |||
145 | printk(KERN_WARNING "Port3 can't be used in PHY mode\n"); | 179 | printk(KERN_WARNING "Port3 can't be used in PHY mode\n"); |
146 | break; | 180 | break; |
147 | case EHCI_HCD_OMAP_MODE_TLL: | 181 | case EHCI_HCD_OMAP_MODE_TLL: |
148 | omap_cfg_reg(AB3_3430_USB3HS_TLL_STP); | 182 | omap_mux_init_signal("hsusb3_tll_stp", |
149 | omap_cfg_reg(AA6_3430_USB3HS_TLL_CLK); | 183 | OMAP_PIN_INPUT_PULLUP); |
150 | omap_cfg_reg(AA3_3430_USB3HS_TLL_DIR); | 184 | omap_mux_init_signal("hsusb3_tll_clk", |
151 | omap_cfg_reg(Y3_3430_USB3HS_TLL_NXT); | 185 | OMAP_PIN_INPUT_PULLDOWN); |
152 | omap_cfg_reg(AA5_3430_USB3HS_TLL_DATA0); | 186 | omap_mux_init_signal("hsusb3_tll_dir", |
153 | omap_cfg_reg(Y4_3430_USB3HS_TLL_DATA1); | 187 | OMAP_PIN_INPUT_PULLDOWN); |
154 | omap_cfg_reg(Y5_3430_USB3HS_TLL_DATA2); | 188 | omap_mux_init_signal("hsusb3_tll_nxt", |
155 | omap_cfg_reg(W5_3430_USB3HS_TLL_DATA3); | 189 | OMAP_PIN_INPUT_PULLDOWN); |
156 | omap_cfg_reg(AB12_3430_USB3HS_TLL_DATA4); | 190 | omap_mux_init_signal("hsusb3_tll_data0", |
157 | omap_cfg_reg(AB13_3430_USB3HS_TLL_DATA5); | 191 | OMAP_PIN_INPUT_PULLDOWN); |
158 | omap_cfg_reg(AA13_3430_USB3HS_TLL_DATA6); | 192 | omap_mux_init_signal("hsusb3_tll_data1", |
159 | omap_cfg_reg(AA12_3430_USB3HS_TLL_DATA7); | 193 | OMAP_PIN_INPUT_PULLDOWN); |
194 | omap_mux_init_signal("hsusb3_tll_data2", | ||
195 | OMAP_PIN_INPUT_PULLDOWN); | ||
196 | omap_mux_init_signal("hsusb3_tll_data3", | ||
197 | OMAP_PIN_INPUT_PULLDOWN); | ||
198 | omap_mux_init_signal("hsusb3_tll_data4", | ||
199 | OMAP_PIN_INPUT_PULLDOWN); | ||
200 | omap_mux_init_signal("hsusb3_tll_data5", | ||
201 | OMAP_PIN_INPUT_PULLDOWN); | ||
202 | omap_mux_init_signal("hsusb3_tll_data6", | ||
203 | OMAP_PIN_INPUT_PULLDOWN); | ||
204 | omap_mux_init_signal("hsusb3_tll_data7", | ||
205 | OMAP_PIN_INPUT_PULLDOWN); | ||
160 | break; | 206 | break; |
161 | case EHCI_HCD_OMAP_MODE_UNKNOWN: | 207 | case EHCI_HCD_OMAP_MODE_UNKNOWN: |
162 | /* FALLTHROUGH */ | 208 | /* FALLTHROUGH */ |