]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/mmc/sdhci.c
mmc: sdhci: don't clobber adjacent registers
[people/ms/u-boot.git] / drivers / mmc / sdhci.c
index de88e19609f37aaba48665e9bff60f6a7b63f31b..1f8917b1ce1b29daec32efe1dd71468156f21aaa 100644 (file)
@@ -374,7 +374,8 @@ static void sdhci_set_ios(struct mmc *mmc)
                                (host->quirks & SDHCI_QUIRK_USE_WIDE8))
                        ctrl |= SDHCI_CTRL_8BITBUS;
        } else {
-               if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300)
+               if ((SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) ||
+                               (host->quirks & SDHCI_QUIRK_USE_WIDE8))
                        ctrl &= ~SDHCI_CTRL_8BITBUS;
                if (mmc->bus_width == 4)
                        ctrl |= SDHCI_CTRL_4BITBUS;
@@ -411,7 +412,7 @@ static int sdhci_init(struct mmc *mmc)
        if (host->quirks & SDHCI_QUIRK_NO_CD) {
                unsigned int status;
 
-               sdhci_writel(host, SDHCI_CTRL_CD_TEST_INS | SDHCI_CTRL_CD_TEST,
+               sdhci_writeb(host, SDHCI_CTRL_CD_TEST_INS | SDHCI_CTRL_CD_TEST,
                        SDHCI_HOST_CONTROL);
 
                status = sdhci_readl(host, SDHCI_PRESENT_STATE);