Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f514291 authored by Seungwon Jeon's avatar Seungwon Jeon Committed by Chris Ball
Browse files

mmc: dw_mmc: Clear the DDR mode for non-DDR



UHS_REG should be cleared for non-DDR mode. But currently there is
no way to clear DDR mode, if it is already set once. This patch adds
clearing DDR mode for non-DDR mode.

Signed-off-by: default avatarSeungwon Jeon <tgih.jun@samsung.com>
Acked-by: default avatarWill Newton <will.newton@imgtec.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent dd8df17f
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -707,12 +707,15 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
		break;
	}

	/* DDR mode set */
	if (ios->timing == MMC_TIMING_UHS_DDR50) {
	regs = mci_readl(slot->host, UHS_REG);

	/* DDR mode set */
	if (ios->timing == MMC_TIMING_UHS_DDR50)
		regs |= (0x1 << slot->id) << 16;
	else
		regs &= ~(0x1 << slot->id) << 16;

	mci_writel(slot->host, UHS_REG, regs);
	}

	if (ios->clock) {
		/*