sdhci-s3c: Add SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirk for Samsung SoC
Subsystems (4)
PATCH 1/1 sdhci-s3c: Add SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirk for Samsung SoC
From: Lee Hyuk <[email protected]>
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.
--- drivers/mmc/host/sdhci-s3c.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-)
drivers/mmc/host/sdhci-s3c.c +3 -7
@@ -110,11 +110,6 @@ static unsigned int sdhci_s3c_get_max_clk(struct sdhci_host *host)return max; } -static unsigned int sdhci_s3c_get_timeout_clk (struct sdhci_host *host) -{ -return sdhci_s3c_get_max_clk (host) /1000000 ; -} -/** * sdhci_s3c_consider_clock - consider one the bus clocks for current setting * @ourhost: Our SDHCI instance.
@@ -188,7 +183,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, unsigned int clock) ourhost->cur_clk = best_src; host->max_clk =clk_get_rate (clk); - host->timeout_clk =sdhci_s3c_get_timeout_clk (host); ctrl =readl (host->ioaddr +S3C_SDHCI_CONTROL2 ); ctrl &= ~S3C_SDHCI_CTRL2_SELBASECLK_MASK ;
@@ -211,7 +205,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, unsigned int clock)static struct sdhci_ops sdhci_s3c_ops = { .get_max_clock = sdhci_s3c_get_max_clk, - .get_timeout_clock = sdhci_s3c_get_timeout_clk, .set_clock = sdhci_s3c_set_clock, };
@@ -335,6 +328,9 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) host->quirks |= (SDHCI_QUIRK_32BIT_DMA_ADDR |SDHCI_QUIRK_32BIT_DMA_SIZE ); +/* HSMMC on Samsung SoCs uses SDCLK as timeout clock. */ + host->quirks |=SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK ; + ret =sdhci_add_host (host);if (ret) {dev_err (dev,"sdhci_add_host() failed\n" );
Signature · 1 line
1.6.2.5
PATCH 1/1 sdhci-s3c: Add SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirk for Samsung SoC
Hi,
Quoted 49 lines · Kukjin Kim
From: Lee Hyuk <[email protected]>
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 <[email protected]>Signed-off-by Kukjin Kim <[email protected]>---
?drivers/mmc/host/sdhci-s3c.c | ? 10 +++-------
?1 files changed, 3 insertions(+), 7 deletions(-)drivers/mmc/host/sdhci-s3c.c +0
-5@@ -110,11 +110,6 @@ static unsigned int sdhci_s3c_get_max_clk(struct sdhci_host *host) ? ? ? ?return max; ?} -static unsigned int sdhci_s3c_get_timeout_clk (struct sdhci_host *host) -{ - ? ? ? return sdhci_s3c_get_max_clk(host) / 1000000; -} -?/**
?*sdhci_s3c_consider_clock- consider one the bus clocks for current setting ?* @ourhost: Our SDHCI instance.drivers/mmc/host/sdhci-s3c.c +0
-2@@ -188,7 +183,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, unsigned int clock) ? ? ? ? ? ? ? ?ourhost->cur_clk = best_src; ? ? ? ? ? ? ? ?host->max_clk = clk_get_rate(clk); - ? ? ? ? ? ? ? host->timeout_clk = sdhci_s3c_get_timeout_clk(host); ? ? ? ? ? ? ? ?ctrl = readl(host->ioaddr + S3C_SDHCI_CONTROL2); ? ? ? ? ? ? ? ?ctrl &= ~S3C_SDHCI_CTRL2_SELBASECLK_MASK;@@ -211,7 +205,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, unsigned int clock) ?static struct sdhci_ops sdhci_s3c_ops = { ? ? ? ?.get_max_clock ? ? ? ? ?= sdhci_s3c_get_max_clk, - ? ? ? .get_timeout_clock ? ? ?= sdhci_s3c_get_timeout_clk, ? ? ? ?.set_clock ? ? ? ? ? ? ?= sdhci_s3c_set_clock, ?};@@ -335,6 +328,9 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)? ? ? ?host->quirks |= (
SDHCI_QUIRK_32BIT_DMA_ADDR| ? ? ? ? ? ? ? ? ? ? ? ?SDHCI_QUIRK_32BIT_DMA_SIZE);
Quoted 2 lines
+ ? ? ? /* HSMMC on Samsung SoCs uses SDCLK as timeout clock. */
+ ? ? ?host->quirks|=SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK;
How do you know Samsung SoCs use SDCLK in the spec?
Is it also true at s3c64xx series?
Thank you,
Kyungmin Park
Quoted 12 lines
+
? ? ? ?ret =sdhci_add_host(host);
? ? ? ?if (ret) {
? ? ? ? ? ? ? ?dev_err(dev, "sdhci_add_host()failed\n"); --
1.6.2.5--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html
PATCH 1/1 sdhci-s3c: Add SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirk for Samsung SoC
Quoted 26 lines · Kyungmin Park
Hi,
drivers/mmc/host/sdhci-s3c.c static unsigned int sdhci_s3c_get_max_clk(struct
Quoted 18 lines · Kukjin Kim
From: Lee Hyuk <[email protected]>
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 <[email protected]>Signed-off-by Kukjin Kim <[email protected]>---
?drivers/mmc/host/sdhci-s3c.c | ? 10 +++-------
?1 files changed, 3 insertions(+), 7 deletions(-)drivers/mmc/host/sdhci-s3c.c +0
-0@@ -110,11 +110,6 @@ static unsigned int sdhci_s3c_get_max_clk(struct
sdhci_host*host)Quoted 3 lines
drivers/mmc/host/sdhci-s3c.c +0
-0? ? ? ?return max; ?}
Quoted 7 lines
Quoted 7 lines
drivers/mmc/host/sdhci-s3c.c +0
-5-static unsigned int sdhci_s3c_get_timeout_clk (struct sdhci_host *host) -{ - ? ? ? return sdhci_s3c_get_max_clk(host) / 1000000; -} -?/**
?*sdhci_s3c_consider_clock- consider one the bus clocks for current
setting
Quoted 2 lines
drivers/mmc/host/sdhci-s3c.c static void sdhci_s3c_set_clock(struct sdhci_host
Quoted 2 lines
?* @ourhost: Our SDHCI instance.
drivers/mmc/host/sdhci-s3c.c +0
-0@@ -188,7 +183,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host
*host,
Quoted 9 lines
unsigned int clock)
drivers/mmc/host/sdhci-s3c.c static void sdhci_s3c_set_clock(struct sdhci_host
Quoted 8 lines
drivers/mmc/host/sdhci-s3c.c +0
-1? ? ? ? ? ? ? ?ourhost->cur_clk = best_src; ? ? ? ? ? ? ? ?host->max_clk = clk_get_rate(clk); - ? ? ? ? ? ? ? host->timeout_clk = sdhci_s3c_get_timeout_clk(host); ? ? ? ? ? ? ? ?ctrl = readl(host->ioaddr + S3C_SDHCI_CONTROL2); ? ? ? ? ? ? ? ?ctrl &= ~S3C_SDHCI_CTRL2_SELBASECLK_MASK;@@ -211,7 +205,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host
*host,
Quoted 10 lines
unsigned int clock)
drivers/mmc/host/sdhci-s3c.c static int __devinit sdhci_s3c_probe(struct
Quoted 8 lines
drivers/mmc/host/sdhci-s3c.c +0
-1?static struct sdhci_ops sdhci_s3c_ops = { ? ? ? ?.get_max_clock ? ? ? ? ?= sdhci_s3c_get_max_clk, - ? ? ? .get_timeout_clock ? ? ?= sdhci_s3c_get_timeout_clk, ? ? ? ?.set_clock ? ? ? ? ? ? ?= sdhci_s3c_set_clock, ?};@@ -335,6 +328,9 @@ static int __devinit sdhci_s3c_probe(struct
platform_device*pdev)
Quoted 8 lines
Quoted 5 lines
? ? ? ?host->quirks |= (
SDHCI_QUIRK_32BIT_DMA_ADDR| ? ? ? ? ? ? ? ? ? ? ? ?SDHCI_QUIRK_32BIT_DMA_SIZE);+ ? ? ? /* HSMMC on Samsung SoCs uses SDCLK as timeout clock. */
+ ? ? ?host->quirks|=SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK;How do you know Samsung SoCs use SDCLK in the spec?
Samsung SoC hardware engineer guided about that.
Quoted 2 lines
Is it also true at s3c64xx series?
Yes, of course.
Quoted 9 lines
Quoted 9 lines
+
? ? ? ?ret =sdhci_add_host(host);
? ? ? ?if (ret) {
? ? ? ? ? ? ? ?dev_err(dev, "sdhci_add_host()failed\n"); --
1.6.2.5--
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/1 sdhci-s3c: Add SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirk for Samsung SoC
Quoted 61 lines · Kukjin Kim
Quoted 26 lines · Kyungmin Park
Hi,
drivers/mmc/host/sdhci-s3c.c static unsigned int sdhci_s3c_get_max_clk(struct
Quoted 18 lines · Kukjin Kim
From: Lee Hyuk <[email protected]>
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 <[email protected]>Signed-off-by Kukjin Kim <[email protected]>---
?drivers/mmc/host/sdhci-s3c.c | ? 10 +++-------
?1 files changed, 3 insertions(+), 7 deletions(-)drivers/mmc/host/sdhci-s3c.c +0
-0@@ -110,11 +110,6 @@ static unsigned int sdhci_s3c_get_max_clk(struct
sdhci_host*host)Quoted 3 lines
drivers/mmc/host/sdhci-s3c.c +0
-0? ? ? ?return max; ?}Quoted 7 lines
Quoted 7 lines
drivers/mmc/host/sdhci-s3c.c +0
-5-static unsigned int sdhci_s3c_get_timeout_clk (struct sdhci_host *host) -{ - ? ? ? return sdhci_s3c_get_max_clk(host) / 1000000; -} -?/**
?*sdhci_s3c_consider_clock- consider one the bus clocks for currentsetting
Quoted 2 lines
drivers/mmc/host/sdhci-s3c.c static void sdhci_s3c_set_clock(struct sdhci_host
Quoted 2 lines
?* @ourhost: Our SDHCI instance.
drivers/mmc/host/sdhci-s3c.c +0
-0@@ -188,7 +183,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host*host,
Quoted 9 lines
unsigned int clock)
drivers/mmc/host/sdhci-s3c.c static void sdhci_s3c_set_clock(struct sdhci_host
Quoted 8 lines
drivers/mmc/host/sdhci-s3c.c +0
-1? ? ? ? ? ? ? ?ourhost->cur_clk = best_src; ? ? ? ? ? ? ? ?host->max_clk = clk_get_rate(clk); - ? ? ? ? ? ? ? host->timeout_clk = sdhci_s3c_get_timeout_clk(host); ? ? ? ? ? ? ? ?ctrl = readl(host->ioaddr + S3C_SDHCI_CONTROL2); ? ? ? ? ? ? ? ?ctrl &= ~S3C_SDHCI_CTRL2_SELBASECLK_MASK;@@ -211,7 +205,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host*host,
Quoted 13 lines
unsigned int clock)
drivers/mmc/host/sdhci-s3c.c static int __devinit sdhci_s3c_probe(struct
Quoted 8 lines
drivers/mmc/host/sdhci-s3c.c +0
-1?static struct sdhci_ops sdhci_s3c_ops = { ? ? ? ?.get_max_clock ? ? ? ? ?= sdhci_s3c_get_max_clk, - ? ? ? .get_timeout_clock ? ? ?= sdhci_s3c_get_timeout_clk, ? ? ? ?.set_clock ? ? ? ? ? ? ?= sdhci_s3c_set_clock, ?};@@ -335,6 +328,9 @@ static int __devinit sdhci_s3c_probe(struct
platform_device*pdev)Quoted 3 lines
? ? ? ?host->quirks |= (
SDHCI_QUIRK_32BIT_DMA_ADDR| ? ? ? ? ? ? ? ? ? ? ? ?SDHCI_QUIRK_32BIT_DMA_SIZE);
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
+ ? ? ? /* HSMMC on Samsung SoCs uses SDCLK as timeout clock. */
+ ? ? ?host->quirks|=SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK;How do you know Samsung SoCs use SDCLK in the spec?
Samsung SoC hardware engineer guided about that.
Of course H/W team know it. they made it. I mean how can we know it at Spec?
If MMC developer don't know the samsung socs well, then how to set it quirk from Spec.
Thank you,
Kyungmin Park
Quoted 30 lines
Quoted 3 lines
Is it also true at s3c64xx series?
Yes, of course.
Quoted 9 lines
Quoted 9 lines
+
? ? ? ?ret =sdhci_add_host(host);
? ? ? ?if (ret) {
? ? ? ? ? ? ? ?dev_err(dev, "sdhci_add_host()failed\n"); --
1.6.2.5--
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html
PATCH 1/1 sdhci-s3c: Add SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirk for Samsung SoC
In reply to Kukjin KimHi,
This wasn't merged, after some questions from Kyungmin Park -- is the patch still desirable?
Quoted 57 lines · Kukjin Kim
From: Lee Hyuk <[email protected]>
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 <[email protected]>Signed-off-by Kukjin Kim <[email protected]>--- drivers/mmc/host/sdhci-s3c.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-)drivers/mmc/host/sdhci-s3c.c +3
-7@@ -110,11 +110,6 @@ static unsigned int sdhci_s3c_get_max_clk(struct sdhci_host *host)return max; } -static unsigned int sdhci_s3c_get_timeout_clk (struct sdhci_host *host) -{ -return sdhci_s3c_get_max_clk (host) /1000000 ; -} -/** * sdhci_s3c_consider_clock - consider one the bus clocks for current setting * @ourhost: Our SDHCI instance. @@ -188,7 +183,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, unsigned int clock) ourhost->cur_clk = best_src; host->max_clk =clk_get_rate (clk); - host->timeout_clk =sdhci_s3c_get_timeout_clk (host); ctrl =readl (host->ioaddr +S3C_SDHCI_CONTROL2 ); ctrl &= ~S3C_SDHCI_CTRL2_SELBASECLK_MASK ;@@ -211,7 +205,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, unsigned int clock)static struct sdhci_ops sdhci_s3c_ops = { .get_max_clock = sdhci_s3c_get_max_clk, - .get_timeout_clock = sdhci_s3c_get_timeout_clk, .set_clock = sdhci_s3c_set_clock, };@@ -335,6 +328,9 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) host->quirks |= (SDHCI_QUIRK_32BIT_DMA_ADDR |SDHCI_QUIRK_32BIT_DMA_SIZE ); +/* HSMMC on Samsung SoCs uses SDCLK as timeout clock. */ + host->quirks |=SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK ; + ret =sdhci_add_host (host);if (ret) {dev_err (dev,"sdhci_add_host() failed\n" );Signature · 1 line
1.6.2.5
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
PATCH 1/1 sdhci-s3c: Add SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirk for Samsung SoC
Quoted 3 lines · Chris Ball
Hi,
Hi :-)
Quoted 3 lines
This wasn't merged, after some questions from Kyungmin Park -- is the patch still desirable?
This patch is being in mainline now.
(Commit ID: 3fe42e077f65351503f5004031549db330bb105e)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Quoted 24 lines · Kukjin Kim
Quoted 5 lines
From: Lee Hyuk <[email protected]>
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 andremoved
drivers/mmc/host/sdhci-s3c.c static unsigned int sdhci_s3c_get_max_clk(struct
Quoted 13 lines
'
sdhci_s3c_get_timeout_clk' callback which doesn't need any more.Signed-off-by Hyuk Lee <[email protected]>Signed-off-by Kukjin Kim <[email protected]>--- drivers/mmc/host/sdhci-s3c.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-)drivers/mmc/host/sdhci-s3c.c +0
-0@@ -110,11 +110,6 @@ static unsigned int sdhci_s3c_get_max_clk(struct
sdhci_host*host)Quoted 3 lines
drivers/mmc/host/sdhci-s3c.c +0
-0return max; }
Quoted 7 lines
drivers/mmc/host/sdhci-s3c.c static unsigned int sdhci_s3c_get_max_clk(struct sdhci_host *host)
Quoted 7 lines
drivers/mmc/host/sdhci-s3c.c +0
-5-static unsigned int sdhci_s3c_get_timeout_clk (struct sdhci_host *host) -{ -return sdhci_s3c_get_max_clk (host) /1000000 ; -} -/** * sdhci_s3c_consider_clock - consider one the bus clocks for current
setting
Quoted 2 lines
drivers/mmc/host/sdhci-s3c.c static void sdhci_s3c_set_clock(struct sdhci_host
Quoted 2 lines
drivers/mmc/host/sdhci-s3c.c +0
-0* @ourhost: Our SDHCI instance. @@ -188,7 +183,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host
*host,
Quoted 9 lines
unsigned int clock)
drivers/mmc/host/sdhci-s3c.c static void sdhci_s3c_set_clock(struct sdhci_host
Quoted 8 lines
drivers/mmc/host/sdhci-s3c.c +0
-1ourhost->cur_clk = best_src; host->max_clk =clk_get_rate (clk); - host->timeout_clk =sdhci_s3c_get_timeout_clk (host); ctrl =readl (host->ioaddr +S3C_SDHCI_CONTROL2 ); ctrl &= ~S3C_SDHCI_CTRL2_SELBASECLK_MASK ;@@ -211,7 +205,6 @@ static void sdhci_s3c_set_clock(struct sdhci_host
*host,
Quoted 25 lines
unsigned int clock)
drivers/mmc/host/sdhci-s3c.c static int __devinit sdhci_s3c_probe(struct
Quoted 8 lines
drivers/mmc/host/sdhci-s3c.c +0
-1static struct sdhci_ops sdhci_s3c_ops = { .get_max_clock = sdhci_s3c_get_max_clk, - .get_timeout_clock = sdhci_s3c_get_timeout_clk, .set_clock = sdhci_s3c_set_clock, };@@ -335,6 +328,9 @@ static int __devinit sdhci_s3c_probe(struct
platform_device*pdev)Quoted 11 lines
drivers/mmc/host/sdhci-s3c.c +3
-1host->quirks |= (SDHCI_QUIRK_32BIT_DMA_ADDR |SDHCI_QUIRK_32BIT_DMA_SIZE ); +/* HSMMC on Samsung SoCs uses SDCLK as timeout clock. */ + host->quirks |=SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK ; + ret =sdhci_add_host (host);if (ret) {dev_err (dev,"sdhci_add_host() failed\n" ); --1.6.2.5
--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child