From: Kevin Lemoi <kevin.le...@savant.com>

SDHCI_QUIRK2_NO_1_8_V flag should disable MMC_CAP_1_8V_DDR.

Otherwise we get the following errors when accessing eMMC on a mx6sl
board:

mmc0: MAN_BKOPS_EN bit is not set
mmc0: power class selection to bus width 8 ddr 4 failed
mmc0: error -110 whilst initialising MMC card
mmc0: MAN_BKOPS_EN bit is not set
mmc0: power class selection to bus width 8 ddr 4 failed
mmc0: error -110 whilst initialising MMC card
mmc0: MAN_BKOPS_EN bit is not set
mmc0: power class selection to bus width 8 ddr 4 failed
mmc0: error -110 whilst initialising MMC card

With this fix in place it is possible to successfully mount the rootfs
from the emmc on the mx6sl board with 'no-1-8-v' property passed in the
device tree.

Cc: sta...@vger.kernel.org
Signed-off-by: Kevin Lemoi <kevin.le...@savant.com>
Signed-off-by: Fabio Estevam <fabio.este...@freescale.com>
---
 drivers/mmc/host/sdhci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 706bb60..10304cc 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3140,9 +3140,11 @@ int sdhci_add_host(struct sdhci_host *host)
                }
        }
 
-       if (host->quirks2 & SDHCI_QUIRK2_NO_1_8_V)
+       if (host->quirks2 & SDHCI_QUIRK2_NO_1_8_V) {
                caps[1] &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
                       SDHCI_SUPPORT_DDR50);
+               mmc->caps &= ~MMC_CAP_1_8V_DDR;
+       }
 
        /* Any UHS-I mode in caps implies SDR12 and SDR25 support. */
        if (caps[1] & (SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to