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(-)
@@ -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;
@@ -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