Skip to content

Commit 06c06f4

Browse files
Ziyuan Xuwzyy2
authored andcommitted
MINIARM: HACK: mmc: dw_mmc-rockchip: enable vmmc supply for reboot
Mmc core has already power off the vmmc since shutdown, re-enable it so that card is active in next reboot. Change-Id: Id64ed02844db9d834c820ed5b8c5bf7a0afe4ed5 Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
1 parent 6d5f884 commit 06c06f4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/mmc/host/dw_mmc-rockchip.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/of_address.h>
1616
#include <linux/regulator/consumer.h>
1717
#include <linux/slab.h>
18+
#include <linux/delay.h>
1819

1920
#include "dw_mmc.h"
2021
#include "dw_mmc-pltfm.h"
@@ -290,6 +291,12 @@ static void dw_mci_rockchip_platfm_shutdown(struct platform_device *pdev)
290291
{
291292
struct dw_mci *host = platform_get_drvdata(pdev);
292293
struct mmc_host *mmc = host->cur_slot->mmc;
294+
int ret;
295+
296+
mdelay(20);
297+
298+
if (!IS_ERR(mmc->supply.vmmc))
299+
ret = regulator_enable(mmc->supply.vmmc);
293300

294301
if (!IS_ERR(mmc->supply.vqmmc))
295302
regulator_set_voltage(mmc->supply.vqmmc, 3000000, 3300000);

0 commit comments

Comments
 (0)