]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mmc/dw_mmc.c
mmc: dw_mmc: Stop bounce buffer even in case of failure
[karo-tx-uboot.git] / drivers / mmc / dw_mmc.c
index b18c75dee2c815a7a9ddd82eac826109544cc3c0..3fffa7116647618a1fa3c60b45bb11728941c95c 100644 (file)
@@ -215,6 +215,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
                        mask = dwmci_readl(host, DWMCI_RINTSTS);
                        if (mask & (DWMCI_DATA_ERR | DWMCI_DATA_TOUT)) {
                                printf("%s: DATA ERROR!\n", __func__);
+                               bounce_buffer_stop(&bbstate);
                                return -1;
                        }
                } while (!(mask & DWMCI_INTMSK_DTO));
@@ -321,7 +322,7 @@ static void dwmci_set_ios(struct mmc *mmc)
        if (mmc->ddr_mode)
                regs |= DWMCI_DDR_MODE;
        else
-               regs &= DWMCI_DDR_MODE;
+               regs &= ~DWMCI_DDR_MODE;
 
        dwmci_writel(host, DWMCI_UHS_REG, regs);
 
@@ -388,7 +389,7 @@ int add_dwmci(struct dwmci_host *host, u32 max_clk, u32 min_clk)
                host->cfg.host_caps |= MMC_MODE_4BIT;
                host->cfg.host_caps &= ~MMC_MODE_8BIT;
        }
-       host->cfg.host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_HC;
+       host->cfg.host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;
 
        host->cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;