projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42182c9
)
mmc: omap_hsmmc: allow mmc clock to be gated
author
Kishon Vijay Abraham I
<
[email protected]
>
Tue, 30 Jan 2018 15:01:45 +0000
(16:01 +0100)
committer
Jaehoon Chung
<
[email protected]
>
Mon, 19 Feb 2018 07:58:55 +0000
(16:58 +0900)
mmc core has defined a new parameter *clk_disable* to gate the clock.
Disable the clock here if *clk_disable* is set.
Signed-off-by: Kishon Vijay Abraham I <
[email protected]
>
Signed-off-by: Jean-Jacques Hiblot <
[email protected]
>
drivers/mmc/omap_hsmmc.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/omap_hsmmc.c
b/drivers/mmc/omap_hsmmc.c
index 71608d18e20b7d35c135d462d1353e47f6f44365..0e80420d8bdbe999d3d06d11a0c73e84cc23438b 100644
(file)
--- a/
drivers/mmc/omap_hsmmc.c
+++ b/
drivers/mmc/omap_hsmmc.c
@@
-1207,6
+1207,7
@@
static int omap_hsmmc_set_ios(struct udevice *dev)
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct mmc *mmc = upriv->mmc;
#endif
+ struct hsmmc *mmc_base = priv->base_addr;
if (priv->bus_width != mmc->bus_width)
omap_hsmmc_set_bus_width(mmc);
@@
-1214,6
+1215,11
@@
static int omap_hsmmc_set_ios(struct udevice *dev)
if (priv->clock != mmc->clock)
omap_hsmmc_set_clock(mmc);
+ if (mmc->clk_disable)
+ omap_hsmmc_stop_clock(mmc_base);
+ else
+ omap_hsmmc_start_clock(mmc_base);
+
#if CONFIG_IS_ENABLED(DM_MMC)
if (priv->mode != mmc->selected_mode)
omap_hsmmc_set_timing(mmc);