Skip to contentSkip to conversation

mmc: rtsx: add delay before power on

PATCH In review [email protected] 2 participants 2 messages Jan 13, 2021 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mmc: rtsx: add delay before power on

From: Ricky Wu <[email protected]>

Make sure voltage below 0.5V before power on when do power cycle
At mmc-core recognition card phase will do power cycle quickly so our device need at least 100ms to make voltage down to below 0.5V

---
 drivers/mmc/host/rtsx_pci_sdmmc.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/host/rtsx_pci_sdmmc.c +2 -0
index e6f5bbce5685..0e5043a03965 100644
@@ -906,6 +906,8 @@ static int sd_power_on(struct realtek_pci_sdmmc *host)
 	if (host->power_state == SDMMC_POWER_ON)
 		return 0;
 
+	msleep(100);
+
 	rtsx_pci_init_cmd(pcr);
 	rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SELECT, 0x07, SD_MOD_SEL);
 	rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SHARE_MODE,
Signature · 1 line
2.17.1
#1 lore raw
Quoted 10 lines · On Wed, 13 Jan 2021 at 11:57, <[email protected]> wrote:

From: Ricky Wu <[email protected]>

Make sure voltage below 0.5V before power on when do power cycle
At mmc-core recognition card phase will do power cycle quickly so our device need at least 100ms to make voltage down to below 0.5V

Applied for next, by amending the changelog a bit, thanks!

Kind regards
Uffe

Quoted 20 lines
---
 drivers/mmc/host/rtsx_pci_sdmmc.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/host/rtsx_pci_sdmmc.c +2 -1
index e6f5bbce5685..0e5043a03965 100644
@@ -906,6 +906,8 @@ static int sd_power_on(struct realtek_pci_sdmmc *host)
        if (host->power_state == SDMMC_POWER_ON)
                return 0;
 
+       msleep(100);
+
        rtsx_pci_init_cmd(pcr);
        rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SELECT, 0x07, SD_MOD_SEL);
        rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SHARE_MODE,
--

2.17.1