Skip to content

Commit

Permalink
mmc: sdhci-s3c: fix the wrong register value, when clock is disabled
Browse files Browse the repository at this point in the history
When use the QUIRK_NONSTANDARD_CLOCK, then never set to 0 at clock control
register.  This patch fixes this problem.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
  • Loading branch information
Jaehoon Chung authored and Chris Ball committed Aug 30, 2013
1 parent 490104a commit 7ef2a5e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/mmc/host/sdhci-s3c.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,12 @@ static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock)
unsigned long timeout;
u16 clk = 0;

/* don't bother if the clock is going off */
if (clock == 0)
/* If the clock is going off, set to 0 at clock control register */
if (clock == 0) {
sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
host->clock = clock;
return;
}

sdhci_s3c_set_clock(host, clock);

Expand Down

0 comments on commit 7ef2a5e

Please sign in to comment.