[U-Boot] mmc: stm32_sdmmc2: Fix stm32_sdmmc2_start_cmd()

Message ID 1526568837-15563-1-git-send-email-patrice.chotard@st.com
State Accepted
Delegated to: Tom Rini
Headers show
Series
  • [U-Boot] mmc: stm32_sdmmc2: Fix stm32_sdmmc2_start_cmd()
Related show

Commit Message

Patrice Chotard May 17, 2018, 2:53 p.m.
SDMMC_CMD_CPSMEN bit is wrongly check and set in
SDMMC_ARG register instead of SDMMC_CMD register.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---

 drivers/mmc/stm32_sdmmc2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tom Rini May 28, 2018, 7:13 p.m. | #1
On Thu, May 17, 2018 at 04:53:57PM +0200, Patrice Chotard wrote:

> SDMMC_CMD_CPSMEN bit is wrongly check and set in
> SDMMC_ARG register instead of SDMMC_CMD register.
> 
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>

Applied to u-boot/master, thanks!

Patch

diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index a0224ca3909c..ae0af48ef330 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -238,8 +238,8 @@  static void stm32_sdmmc2_start_data(struct stm32_sdmmc2_priv *priv,
 static void stm32_sdmmc2_start_cmd(struct stm32_sdmmc2_priv *priv,
 				   struct mmc_cmd *cmd, u32 cmd_param)
 {
-	if (readl(priv->base + SDMMC_ARG) & SDMMC_CMD_CPSMEN)
-		writel(0, priv->base + SDMMC_ARG);
+	if (readl(priv->base + SDMMC_CMD) & SDMMC_CMD_CPSMEN)
+		writel(0, priv->base + SDMMC_CMD);
 
 	cmd_param |= cmd->cmdidx | SDMMC_CMD_CPSMEN;
 	if (cmd->resp_type & MMC_RSP_PRESENT) {