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>
This commit is contained in:
committed by
Tony Lindgren
parent
7193559af4
commit
3a63833ec3
@@ -694,7 +694,7 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
|
||||
omap_mux_init_signal("sdmmc_dat0", 0);
|
||||
omap_mux_init_signal("sdmmc_dat_dir0", 0);
|
||||
omap_mux_init_signal("sdmmc_cmd_dir", 0);
|
||||
if (mmc_controller->slots[0].wires == 4) {
|
||||
if (mmc_controller->slots[0].caps & MMC_CAP_4_BIT_DATA) {
|
||||
omap_mux_init_signal("sdmmc_dat1", 0);
|
||||
omap_mux_init_signal("sdmmc_dat2", 0);
|
||||
omap_mux_init_signal("sdmmc_dat3", 0);
|
||||
@@ -722,8 +722,8 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat0",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
if (mmc_controller->slots[0].wires == 4 ||
|
||||
mmc_controller->slots[0].wires == 8) {
|
||||
if (mmc_controller->slots[0].caps &
|
||||
(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
|
||||
omap_mux_init_signal("sdmmc1_dat1",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat2",
|
||||
@@ -731,7 +731,8 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
|
||||
omap_mux_init_signal("sdmmc1_dat3",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
if (mmc_controller->slots[0].wires == 8) {
|
||||
if (mmc_controller->slots[0].caps &
|
||||
MMC_CAP_8_BIT_DATA) {
|
||||
omap_mux_init_signal("sdmmc1_dat4",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat5",
|
||||
@@ -755,8 +756,8 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
|
||||
* For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed
|
||||
* in the board-*.c files
|
||||
*/
|
||||
if (mmc_controller->slots[0].wires == 4 ||
|
||||
mmc_controller->slots[0].wires == 8) {
|
||||
if (mmc_controller->slots[0].caps &
|
||||
(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
|
||||
omap_mux_init_signal("sdmmc2_dat1",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat2",
|
||||
@@ -764,7 +765,8 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
|
||||
omap_mux_init_signal("sdmmc2_dat3",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
if (mmc_controller->slots[0].wires == 8) {
|
||||
if (mmc_controller->slots[0].caps &
|
||||
MMC_CAP_8_BIT_DATA) {
|
||||
omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5",
|
||||
|
Reference in New Issue
Block a user