Thread (1 message) 1 message, 1 author, 2010-09-02
STALE5794d

[PATCH] sdhci-s3c: support non-standard clock setting for c210

From: Kukjin Kim <hidden>
Date: 2010-09-02 11:00:48
Also in: linux-mmc

Kukjin Kim wrote:
Kyungmin Park wrote:
quoted
On Thu, Sep 2, 2010 at 7:20 PM, Kukjin Kim [off-list ref]
wrote:
quoted
quoted
Jaehoon Chung wrote:
quoted
This is sdhci-s3c patch for c210.
c210 didn't use divider of host controller.

Host Controller need other clock setting methods.

So I add the callback functions for s5pc210.
also I set 400KHz for initial clock.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
?Signed-off-by: Kyungmin Park [off-list ref]
   ^^^
Unnecessary whitespace

If your patch includes arch/arm stuff, please add Linux-arm-kernel
maillinglist.
(Cc'ed that)
quoted
quoted
quoted
---
?arch/arm/plat-samsung/include/plat/sdhci.h | ? 19 ++++++++
?drivers/mmc/host/sdhci-s3c.c ? ? ? ? ? ? ? | ? 68
++++++++++++++++++++++++++++
?2 files changed, 87 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h
b/arch/arm/plat-
quoted
quoted
quoted
samsung/include/plat/sdhci.h
index 30844c2..7c75ee3 100644
--- a/arch/arm/plat-samsung/include/plat/sdhci.h
+++ b/arch/arm/plat-samsung/include/plat/sdhci.h
(snip)
quoted
quoted
quoted
diff --git a/drivers/mmc/host/sdhci-s3c.c
b/drivers/mmc/host/sdhci-s3c.c
quoted
quoted
quoted
index 71ad416..3927793 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
(snip)
quoted
quoted
How do you think about using quirk to separate S5PV310 case as
following?
quoted
quoted
I think this is more general method in here...And will be submitted
soon
quoted
quoted
after fixing something.
mm...I will think about your comments again. Then let's discuss about this
issue.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim [off-list ref], Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
quoted
What's the meaning of "general method"?
I'd like to ask you why there is quirk in sdmmc driver.
quoted
and how/where do you set the host->quirks? when board or platform set
the these quirks? who know it uses nonstandard quirk?
How about following?

static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
...
+	if (pdev->id_entry->driver_data == TYPE_S5PV310)
+		host->quirks |= SDHCI_QUIRK_BROKEN_CLOCK_DIVIDER;
...
quoted
In case s5pc210 don't have standard host controller. it's more clear
to use own functions instead of quirks.
Why do we add another callback function?
quoted
quoted
From: Hyuk Lee <redacted>
diff --git a/drivers/mmc/host/sdhci-s3c.c
b/drivers/mmc/host/sdhci-s3c.c
quoted
quoted
index 71ad416..1ac2f36 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
(snip)
quoted
quoted
@@ -221,6 +257,11 @@ static unsigned int
sdhci_s3c_get_min_clock(struct
quoted
quoted
sdhci_host *host)
? ? ? ?unsigned int delta, min = UINT_MAX;
? ? ? ?int src;

+ ? ? ? /* There is only one clock source(sclk) if there is no clock
divider
quoted
quoted
+ ? ? ? ?* in the host controller */
+ ? ? ? if(host->quirks & SDHCI_QUIRK_BROKEN_CLOCK_DIVIDER)
+ ? ? ? ? ? ? ? return clk_round_rate(ourhost->clk_bus[2], 400000);
what's the clk_bus[2]?
Should be clk_bus[ourhost->cur_clk]

(snip)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help