aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/devices.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2009-12-11 19:16:32 -0500
committerTony Lindgren <tony@atomide.com>2009-12-11 19:16:32 -0500
commit4896e3940a063fb03195d05806d28970dc3f102b (patch)
treef3ce32ae903d1ddb831d212d73a93b91c25da03d /arch/arm/mach-omap2/devices.c
parentb63128e81214cc2db2995d690438055c26d213a5 (diff)
omap: mux: Replace omap_cfg_reg() with new style signal or gpio functions
Replace omap_cfg_reg() with new style signal or gpio functions Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r--arch/arm/mach-omap2/devices.c62
1 files changed, 42 insertions, 20 deletions
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
32static struct resource cam_resources[] = { 34static 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