summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/as3525/ata_sd_as3525.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c
index 2270894..cb1666c 100644
--- a/firmware/target/arm/as3525/ata_sd_as3525.c
+++ b/firmware/target/arm/as3525/ata_sd_as3525.c
@@ -406,7 +406,9 @@ int sd_init(void)
#endif
/* init mutex */
+#ifndef BOOTLOADER
sd_enable(false);
+#endif
mutex_init(&sd_mtx);
@@ -496,7 +498,9 @@ static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start,
#endif
mutex_lock(&sd_mtx);
+#ifndef BOOTLOADER
sd_enable(true);
+#endif
#ifdef HAVE_MULTIVOLUME
if (drive != 0 && !card_detect_target())
@@ -583,7 +587,9 @@ static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start,
while (1)
{
+#ifndef BOOTLOADER
sd_enable(false);
+#endif
mutex_unlock(&sd_mtx);
return ret;