From fd88bd1d2c69ceded89da48f98f0ae117a56f195 Mon Sep 17 00:00:00 2001 From: hexkyz Date: Tue, 24 Jul 2018 19:06:41 +0100 Subject: [PATCH] fusee: Disable the SDCLK when switching to low voltage. --- fusee/fusee-secondary/src/sdmmc/sdmmc_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fusee/fusee-secondary/src/sdmmc/sdmmc_core.c b/fusee/fusee-secondary/src/sdmmc/sdmmc_core.c index b99db835d..85cab87ba 100644 --- a/fusee/fusee-secondary/src/sdmmc/sdmmc_core.c +++ b/fusee/fusee-secondary/src/sdmmc/sdmmc_core.c @@ -1712,6 +1712,9 @@ int sdmmc_switch_voltage(sdmmc_t *sdmmc) { volatile tegra_pmc_t *pmc = pmc_get_regs(); + /* Disable the SD clock. */ + sdmmc_disable_sd_clock(sdmmc); + /* Reconfigure the internal clock. */ if (!sdmmc_select_speed(sdmmc, SDMMC_SPEED_SDR12)) { @@ -1978,4 +1981,4 @@ int sdmmc_abort(sdmmc_t *sdmmc, uint32_t opcode) sdmmc_disable_sd_clock(sdmmc); return result; -} \ No newline at end of file +}