From 91fc77241c7032fd3f517a60f0b1070ea32dad65 Mon Sep 17 00:00:00 2001 From: langerhans Date: Sun, 10 Jun 2018 20:50:51 +0200 Subject: [PATCH] fusee: Run periodic autocal only on the uSD controller --- fusee/fusee-primary/src/sdmmc.c | 5 ++++- fusee/fusee-secondary/src/sdmmc.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fusee/fusee-primary/src/sdmmc.c b/fusee/fusee-primary/src/sdmmc.c index 1b36bfd3b..4deb1066d 100644 --- a/fusee/fusee-primary/src/sdmmc.c +++ b/fusee/fusee-primary/src/sdmmc.c @@ -2175,7 +2175,10 @@ static int sdmmc_send_command(struct mmc *mmc, enum sdmmc_command command, } } - sdmmc_run_autocal(mmc, true); + // Periodically recalibrate the SD controller + if (mmc->controller == SWITCH_MICROSD) { + sdmmc_run_autocal(mmc, true); + } // If we have data to send, prepare it. sdmmc_prepare_command_data(mmc, blocks_to_transfer, is_write, auto_terminate, mmc->use_dma, argument); diff --git a/fusee/fusee-secondary/src/sdmmc.c b/fusee/fusee-secondary/src/sdmmc.c index 78f2baff5..1f6879e3a 100644 --- a/fusee/fusee-secondary/src/sdmmc.c +++ b/fusee/fusee-secondary/src/sdmmc.c @@ -2176,7 +2176,10 @@ static int sdmmc_send_command(struct mmc *mmc, enum sdmmc_command command, } } - sdmmc_run_autocal(mmc, true); + // Periodically recalibrate the SD controller + if (mmc->controller == SWITCH_MICROSD) { + sdmmc_run_autocal(mmc, true); + } // If we have data to send, prepare it. sdmmc_prepare_command_data(mmc, blocks_to_transfer, is_write, auto_terminate, mmc->use_dma, argument);