From: Patrick Delaunay Date: Wed, 7 Feb 2018 16:19:58 +0000 (+0100) Subject: mmc: stm32: sdmmc2: add hardware flow control support X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=a72dd8ed95992be67a03073dd28dad27618e5a39;p=u-boot.git mmc: stm32: sdmmc2: add hardware flow control support The hardware flow control functionality is used to avoid FIFO underrun (TX mode) and overrun (RX mode) errors. The behavior is to stop SDMMC_CK during data transfer and freeze the SDMMC state machines. Signed-off-by: Patrick Delaunay Signed-off-by: Patrice Chotard --- diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c index bd2200a05c..3e578359e0 100644 --- a/drivers/mmc/stm32_sdmmc2.c +++ b/drivers/mmc/stm32_sdmmc2.c @@ -495,7 +495,8 @@ static int stm32_sdmmc2_set_ios(struct udevice *dev) if (mmc->bus_width == 8) clk |= SDMMC_CLKCR_WIDBUS_8; - writel(clk | priv->clk_reg_msk, priv->base + SDMMC_CLKCR); + writel(clk | priv->clk_reg_msk | SDMMC_CLKCR_HWFC_EN, + priv->base + SDMMC_CLKCR); return 0; }