mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
fb7c3beb51
commit
35f6782055
3 changed files with 18 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue