diff options
author | Wenyou Yang <wenyou.yang@atmel.com> | 2016-09-27 11:00:34 +0800 |
---|---|---|
committer | Andreas Bießmann <andreas@biessmann.org> | 2016-10-28 18:37:15 +0200 |
commit | 339cb0732ae98ae81b0460f4ed16bd6e3e044efc (patch) | |
tree | 55bac7d4b4fd5d4f014b8e1cea613f7d1c21dbe2 /drivers | |
parent | c6a0f7f1356dd68a269dcfa34aae8f75a01ef7fe (diff) |
mmc: atmel_sdhci: Remove unnecessary clock calling
Due to the peripheral and generated clock driver improvement,
remove the unnecessary clock calling.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/atmel_sdhci.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c index 20bba1a279..6654b54278 100644 --- a/drivers/mmc/atmel_sdhci.c +++ b/drivers/mmc/atmel_sdhci.c @@ -50,29 +50,6 @@ struct atmel_sdhci_plat { struct mmc mmc; }; -static int atmel_sdhci_get_clk(struct udevice *dev, int index, struct clk *clk) -{ - struct udevice *dev_clk; - int periph, ret; - - ret = clk_get_by_index(dev, index, clk); - if (ret) - return ret; - - periph = fdtdec_get_uint(gd->fdt_blob, clk->dev->of_offset, "reg", -1); - if (periph < 0) - return -EINVAL; - - dev_clk = dev_get_parent(clk->dev); - ret = clk_request(dev_clk, clk); - if (ret) - return ret; - - clk->id = periph; - - return 0; -} - static int atmel_sdhci_probe(struct udevice *dev) { struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev); @@ -85,7 +62,7 @@ static int atmel_sdhci_probe(struct udevice *dev) struct clk clk; int ret; - ret = atmel_sdhci_get_clk(dev, 0, &clk); + ret = clk_get_by_index(dev, 0, &clk); if (ret) return ret; @@ -106,7 +83,7 @@ static int atmel_sdhci_probe(struct udevice *dev) clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >> SDHCI_CLOCK_MUL_SHIFT; gck_rate = clk_base * 1000000 * (clk_mul + 1); - ret = atmel_sdhci_get_clk(dev, 1, &clk); + ret = clk_get_by_index(dev, 1, &clk); if (ret) return ret; |