aboutsummaryrefslogtreecommitdiff
path: root/include/mmc.h
diff options
context:
space:
mode:
authorKishon Vijay Abraham I2017-09-21 16:30:03 +0200
committerJaehoon Chung2018-01-12 18:11:04 +0900
commit35f6782055c99410fbeae33ab28ea68de154360c (patch)
treea9687137937bbd349e0d72e6e73de756e809d0c7 /include/mmc.h
parentfb7c3beb5178e5c81a00642e71a4b73427b52429 (diff)
mmc: add a new mmc parameter to disable mmc clock
mmc clock has to be disabled in certain cases like during the voltage switch sequence. Modify mmc_set_clock function to take disable as an argument that signifies if the clock has to be enabled or disabled. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Diffstat (limited to 'include/mmc.h')
-rw-r--r--include/mmc.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/mmc.h b/include/mmc.h
index bd096aeb218..8d6e0f8fb04 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -472,6 +472,7 @@ struct mmc {
void *priv;
uint has_init;
int high_capacity;
+ bool clk_disable; /* true if the clock can be turned off */
uint bus_width;
uint clock;
enum mmc_voltage signal_voltage;
@@ -567,7 +568,16 @@ int mmc_unbind(struct udevice *dev);
int mmc_initialize(bd_t *bis);
int mmc_init(struct mmc *mmc);
int mmc_read(struct mmc *mmc, u64 src, uchar *dst, int size);
-int mmc_set_clock(struct mmc *mmc, uint clock);
+
+/**
+ * mmc_set_clock() - change the bus clock
+ * @mmc: MMC struct
+ * @clock: bus frequency in Hz
+ * @disable: flag indicating if the clock must on or off
+ * @return 0 if OK, -ve on error
+ */
+int mmc_set_clock(struct mmc *mmc, uint clock, bool disable);
+
struct mmc *find_mmc_device(int dev_num);
int mmc_set_dev(int dev_num);
void print_mmc_devices(char separator);