diff mbox

[3/3] sdhci-pltfm: add call back set_max_speed

Message ID AANLkTimNAnA396gofvckwibOfsGb=11jDRzwHKuLUB4W@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Zhangfei Gao Sept. 27, 2010, 2:59 a.m. UTC
None
diff mbox

Patch

From c75877463fb72e691e1547184f8e2783e5d1fe27 Mon Sep 17 00:00:00 2001
From: Zhangfei Gao <zhangfei.gao@marvell.com>
Date: Mon, 27 Sep 2010 10:39:18 -0400
Subject: [PATCH 3/3] dhci-pltfm: add call back set_max_speed

	set_max_speed should be done after add_host to change mmc->f_max, which set max_clk in add_host by defalut

Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
---
 drivers/mmc/host/sdhci-pltfm.c |    3 +++
 include/linux/sdhci-pltfm.h    |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 5c3c513..f25825b 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -123,6 +123,9 @@  static int __devinit sdhci_pltfm_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_add_host;
 
+	if (pdata && pdata->set_max_speed)
+		pdata->set_max_speed(host);
+
 	platform_set_drvdata(pdev, host);
 
 	return 0;
diff --git a/include/linux/sdhci-pltfm.h b/include/linux/sdhci-pltfm.h
index 0d20cb4..0d8e8f6 100644
--- a/include/linux/sdhci-pltfm.h
+++ b/include/linux/sdhci-pltfm.h
@@ -30,6 +30,7 @@  struct sdhci_pltfm_data {
 	unsigned int quirks;
 	int (*init)(struct sdhci_host *host, struct sdhci_pltfm_data *pdata, void* priv_pdata);
 	void (*exit)(struct sdhci_host *host);
+	void (*set_max_speed)(struct sdhci_host *host);
 	unsigned int  (*get_quirk)(struct sdhci_host *host);
 	struct sdhci_host *(*alloc_host)(struct device *dev);
 };
-- 
1.7.0.4