Skip to content

Commit

Permalink
mmc: dw_mmc: fixed a wrong UHS_REG 16 bit clear
Browse files Browse the repository at this point in the history
In the legacy code, driver clear not only UHS_REG 16 bit also 0-15bit.
If we use UHS-1 mode spec card like SDR50, SDR104. UHS_REG 0-15 should
be set by 1 according to slot id. In this case, legacy code can cause
problems.

In particular, UHS_REG consists of DDR_REG[31:16] and VOLT_REG[15:0].
Before adjusting this patch, bit[15:0] is always cleared.

Signed-off-by: Hyeonsu Kim <hyeonsu.kim@samsung.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
  • Loading branch information
Hyeonsu Kim authored and Chris Ball committed Mar 22, 2013
1 parent 87a74d3 commit c69042a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mmc/host/dw_mmc.c
Original file line number Diff line number Diff line change
@@ -795,9 +795,9 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)

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

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

0 comments on commit c69042a

Please sign in to comment.