aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorHyuk Lee <hyuk1.lee@samsung.com>2010-08-10 21:01:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 11:59:05 -0400
commit3fe42e077f65351503f5004031549db330bb105e (patch)
treef05f0090d72573d9092d2f784a707819eb760fce /drivers/mmc
parentf3584e5e6fd7abda4ef4a7aec9acd9d46387b8ab (diff)
sdhci-s3c: add SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirk
On Samsung's SDMMC hosts the timeout clock is derivied from the SD Clock which is set dynamically. So checked SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirk and removed 'sdhci_s3c_get_timeout_clk' callback which doesn't need any more. Signed-off-by: Hyuk Lee <hyuk1.lee@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci-s3c.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index ad30f074ee15..d7058eee95f9 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -110,11 +110,6 @@ static unsigned int sdhci_s3c_get_max_clk(struct sdhci_host *host)
110 return max; 110 return max;
111} 111}
112 112
113static unsigned int sdhci_s3c_get_timeout_clk(struct sdhci_host *host)
114{
115 return sdhci_s3c_get_max_clk(host) / 1000000;
116}
117
118/** 113/**
119 * sdhci_s3c_consider_clock - consider one the bus clocks for current setting 114 * sdhci_s3c_consider_clock - consider one the bus clocks for current setting
120 * @ourhost: Our SDHCI instance. 115 * @ourhost: Our SDHCI instance.
@@ -188,7 +183,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, unsigned int clock)
188 183
189 ourhost->cur_clk = best_src; 184 ourhost->cur_clk = best_src;
190 host->max_clk = clk_get_rate(clk); 185 host->max_clk = clk_get_rate(clk);
191 host->timeout_clk = sdhci_s3c_get_timeout_clk(host);
192 186
193 ctrl = readl(host->ioaddr + S3C_SDHCI_CONTROL2); 187 ctrl = readl(host->ioaddr + S3C_SDHCI_CONTROL2);
194 ctrl &= ~S3C_SDHCI_CTRL2_SELBASECLK_MASK; 188 ctrl &= ~S3C_SDHCI_CTRL2_SELBASECLK_MASK;
@@ -211,7 +205,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, unsigned int clock)
211 205
212static struct sdhci_ops sdhci_s3c_ops = { 206static struct sdhci_ops sdhci_s3c_ops = {
213 .get_max_clock = sdhci_s3c_get_max_clk, 207 .get_max_clock = sdhci_s3c_get_max_clk,
214 .get_timeout_clock = sdhci_s3c_get_timeout_clk,
215 .set_clock = sdhci_s3c_set_clock, 208 .set_clock = sdhci_s3c_set_clock,
216}; 209};
217 210
@@ -335,6 +328,9 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
335 host->quirks |= (SDHCI_QUIRK_32BIT_DMA_ADDR | 328 host->quirks |= (SDHCI_QUIRK_32BIT_DMA_ADDR |
336 SDHCI_QUIRK_32BIT_DMA_SIZE); 329 SDHCI_QUIRK_32BIT_DMA_SIZE);
337 330
331 /* HSMMC on Samsung SoCs uses SDCLK as timeout clock */
332 host->quirks |= SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK;
333
338 ret = sdhci_add_host(host); 334 ret = sdhci_add_host(host);
339 if (ret) { 335 if (ret) {
340 dev_err(dev, "sdhci_add_host() failed\n"); 336 dev_err(dev, "sdhci_add_host() failed\n");