aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/stm32_sdmmc2.c
diff options
context:
space:
mode:
authorPatrick Delaunay2018-02-07 17:19:58 +0100
committerTom Rini2018-03-13 21:45:37 -0400
commita72dd8ed95992be67a03073dd28dad27618e5a39 (patch)
tree6a6322b3be4e51d4195d8b6f4a70e51fbd0b33c0 /drivers/mmc/stm32_sdmmc2.c
parentaa5e3e22f4d648c09b6b63eac8eec8d7a2fc2994 (diff)
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 <patrick.delaunay@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'drivers/mmc/stm32_sdmmc2.c')
-rw-r--r--drivers/mmc/stm32_sdmmc2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index bd2200a05c4..3e578359e02 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;
}