mmc: dw_mmc: remove the unnecessary arguments for dwmci_setup_cfg
Some arguments don't need to pass to dwmci_setup_cfg.
They are already included in dwmci_host structure.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 074f86c..d6ac46c 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -488,10 +488,10 @@
};
#endif
-void dwmci_setup_cfg(struct mmc_config *cfg, const char *name, int buswidth,
- uint caps, u32 max_clk, u32 min_clk)
+void dwmci_setup_cfg(struct mmc_config *cfg, struct dwmci_host *host,
+ u32 max_clk, u32 min_clk)
{
- cfg->name = name;
+ cfg->name = host->name;
#ifndef CONFIG_DM_MMC_OPS
cfg->ops = &dwmci_ops;
#endif
@@ -500,9 +500,9 @@
cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
- cfg->host_caps = caps;
+ cfg->host_caps = host->caps;
- if (buswidth == 8) {
+ if (host->buswidth == 8) {
cfg->host_caps |= MMC_MODE_8BIT;
cfg->host_caps &= ~MMC_MODE_4BIT;
} else {
@@ -522,8 +522,7 @@
#else
int add_dwmci(struct dwmci_host *host, u32 max_clk, u32 min_clk)
{
- dwmci_setup_cfg(&host->cfg, host->name, host->buswidth, host->caps,
- max_clk, min_clk);
+ dwmci_setup_cfg(&host->cfg, host, max_clk, min_clk);
host->mmc = mmc_create(&host->cfg, host);
if (host->mmc == NULL)
diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
index 568fed7..c440399 100644
--- a/drivers/mmc/exynos_dw_mmc.c
+++ b/drivers/mmc/exynos_dw_mmc.c
@@ -271,8 +271,7 @@
if (err)
return err;
- dwmci_setup_cfg(&plat->cfg, host->name, host->buswidth, host->caps,
- DWMMC_MAX_FREQ, DWMMC_MIN_FREQ);
+ dwmci_setup_cfg(&plat->cfg, host, DWMMC_MAX_FREQ, DWMMC_MIN_FREQ);
host->mmc = &plat->mmc;
host->mmc->priv = &priv->host;
host->priv = dev;
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index 859760b..47db678 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -129,8 +129,7 @@
return ret;
}
#endif
- dwmci_setup_cfg(&plat->cfg, dev->name, host->buswidth, host->caps,
- priv->minmax[1], priv->minmax[0]);
+ dwmci_setup_cfg(&plat->cfg, host, priv->minmax[1], priv->minmax[0]);
host->mmc = &plat->mmc;
host->mmc->priv = &priv->host;
host->mmc->dev = dev;
diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c
index 8a96302..5a3a4ff 100644
--- a/drivers/mmc/socfpga_dw_mmc.c
+++ b/drivers/mmc/socfpga_dw_mmc.c
@@ -111,8 +111,7 @@
struct dwmci_host *host = &priv->host;
#ifdef CONFIG_BLK
- dwmci_setup_cfg(&plat->cfg, dev->name, host->buswidth, host->caps,
- host->bus_hz, 400000);
+ dwmci_setup_cfg(&plat->cfg, host, host->bus_hz, 400000);
host->mmc = &plat->mmc;
#else
int ret;