aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/devices.c
diff options
context:
space:
mode:
authorSukumar Ghorai <s-ghorai@ti.com>2010-09-15 10:49:23 -0400
committerTony Lindgren <tony@atomide.com>2010-09-27 13:15:26 -0400
commit3a63833ec3002816a759a49ebda4e229c089114e (patch)
tree0ba266febb87cd181ed414b2f3ee103c37470e88 /arch/arm/mach-omap2/devices.c
parent7193559af4243279790fd8dbfef82f8536d9c514 (diff)
omap: mmc: extended to pass host capabilities from board file
wires variable is renamed, extended and this single variable to be used to pass the platform capabilities, e.g DDR mode. Also removed the hardcoded value was using as bus-width. Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com> 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.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index dc49c07dc161..9e5d51bee94a 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -694,7 +694,7 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
694 omap_mux_init_signal("sdmmc_dat0", 0); 694 omap_mux_init_signal("sdmmc_dat0", 0);
695 omap_mux_init_signal("sdmmc_dat_dir0", 0); 695 omap_mux_init_signal("sdmmc_dat_dir0", 0);
696 omap_mux_init_signal("sdmmc_cmd_dir", 0); 696 omap_mux_init_signal("sdmmc_cmd_dir", 0);
697 if (mmc_controller->slots[0].wires == 4) { 697 if (mmc_controller->slots[0].caps & MMC_CAP_4_BIT_DATA) {
698 omap_mux_init_signal("sdmmc_dat1", 0); 698 omap_mux_init_signal("sdmmc_dat1", 0);
699 omap_mux_init_signal("sdmmc_dat2", 0); 699 omap_mux_init_signal("sdmmc_dat2", 0);
700 omap_mux_init_signal("sdmmc_dat3", 0); 700 omap_mux_init_signal("sdmmc_dat3", 0);
@@ -722,8 +722,8 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
722 OMAP_PIN_INPUT_PULLUP); 722 OMAP_PIN_INPUT_PULLUP);
723 omap_mux_init_signal("sdmmc1_dat0", 723 omap_mux_init_signal("sdmmc1_dat0",
724 OMAP_PIN_INPUT_PULLUP); 724 OMAP_PIN_INPUT_PULLUP);
725 if (mmc_controller->slots[0].wires == 4 || 725 if (mmc_controller->slots[0].caps &
726 mmc_controller->slots[0].wires == 8) { 726 (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
727 omap_mux_init_signal("sdmmc1_dat1", 727 omap_mux_init_signal("sdmmc1_dat1",
728 OMAP_PIN_INPUT_PULLUP); 728 OMAP_PIN_INPUT_PULLUP);
729 omap_mux_init_signal("sdmmc1_dat2", 729 omap_mux_init_signal("sdmmc1_dat2",
@@ -731,7 +731,8 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
731 omap_mux_init_signal("sdmmc1_dat3", 731 omap_mux_init_signal("sdmmc1_dat3",
732 OMAP_PIN_INPUT_PULLUP); 732 OMAP_PIN_INPUT_PULLUP);
733 } 733 }
734 if (mmc_controller->slots[0].wires == 8) { 734 if (mmc_controller->slots[0].caps &
735 MMC_CAP_8_BIT_DATA) {
735 omap_mux_init_signal("sdmmc1_dat4", 736 omap_mux_init_signal("sdmmc1_dat4",
736 OMAP_PIN_INPUT_PULLUP); 737 OMAP_PIN_INPUT_PULLUP);
737 omap_mux_init_signal("sdmmc1_dat5", 738 omap_mux_init_signal("sdmmc1_dat5",
@@ -755,8 +756,8 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
755 * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed 756 * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed
756 * in the board-*.c files 757 * in the board-*.c files
757 */ 758 */
758 if (mmc_controller->slots[0].wires == 4 || 759 if (mmc_controller->slots[0].caps &
759 mmc_controller->slots[0].wires == 8) { 760 (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
760 omap_mux_init_signal("sdmmc2_dat1", 761 omap_mux_init_signal("sdmmc2_dat1",
761 OMAP_PIN_INPUT_PULLUP); 762 OMAP_PIN_INPUT_PULLUP);
762 omap_mux_init_signal("sdmmc2_dat2", 763 omap_mux_init_signal("sdmmc2_dat2",
@@ -764,7 +765,8 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
764 omap_mux_init_signal("sdmmc2_dat3", 765 omap_mux_init_signal("sdmmc2_dat3",
765 OMAP_PIN_INPUT_PULLUP); 766 OMAP_PIN_INPUT_PULLUP);
766 } 767 }
767 if (mmc_controller->slots[0].wires == 8) { 768 if (mmc_controller->slots[0].caps &
769 MMC_CAP_8_BIT_DATA) {
768 omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4", 770 omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4",
769 OMAP_PIN_INPUT_PULLUP); 771 OMAP_PIN_INPUT_PULLUP);
770 omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5", 772 omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5",