Commit 002f0d5c authored by Yuvaraj Kumar C D's avatar Yuvaraj Kumar C D Committed by Chris Ball

mmc: dw_mmc: move the platform specific init call

Current platform specific private data initialization call
dw_mci_exynos_priv_init() can be used to do platform specific
initialization of SMU and others in future. So the drv_data->init
call has moved to dw_mci_probe().
Signed-off-by: default avatarYuvaraj Kumar C D <yuvaraj.cd@samsung.com>
Tested-by: default avatarAlim Akhtar <alim.akhtar@samsung.com>
Tested-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
Acked-by: default avatarSeungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 3aa741f3
...@@ -39,7 +39,6 @@ int dw_mci_pltfm_register(struct platform_device *pdev, ...@@ -39,7 +39,6 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
{ {
struct dw_mci *host; struct dw_mci *host;
struct resource *regs; struct resource *regs;
int ret;
host = devm_kzalloc(&pdev->dev, sizeof(struct dw_mci), GFP_KERNEL); host = devm_kzalloc(&pdev->dev, sizeof(struct dw_mci), GFP_KERNEL);
if (!host) if (!host)
...@@ -59,12 +58,6 @@ int dw_mci_pltfm_register(struct platform_device *pdev, ...@@ -59,12 +58,6 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
if (IS_ERR(host->regs)) if (IS_ERR(host->regs))
return PTR_ERR(host->regs); return PTR_ERR(host->regs);
if (drv_data && drv_data->init) {
ret = drv_data->init(host);
if (ret)
return ret;
}
platform_set_drvdata(pdev, host); platform_set_drvdata(pdev, host);
return dw_mci_probe(host); return dw_mci_probe(host);
} }
......
...@@ -2227,6 +2227,15 @@ int dw_mci_probe(struct dw_mci *host) ...@@ -2227,6 +2227,15 @@ int dw_mci_probe(struct dw_mci *host)
host->bus_hz = clk_get_rate(host->ciu_clk); host->bus_hz = clk_get_rate(host->ciu_clk);
} }
if (drv_data && drv_data->init) {
ret = drv_data->init(host);
if (ret) {
dev_err(host->dev,
"implementation specific init failed\n");
goto err_clk_ciu;
}
}
if (drv_data && drv_data->setup_clock) { if (drv_data && drv_data->setup_clock) {
ret = drv_data->setup_clock(host); ret = drv_data->setup_clock(host);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment