summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target')
-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 2270894be5..cb1666c029 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)
406#endif 406#endif
407 /* init mutex */ 407 /* init mutex */
408 408
409#ifndef BOOTLOADER
409 sd_enable(false); 410 sd_enable(false);
411#endif
410 412
411 mutex_init(&sd_mtx); 413 mutex_init(&sd_mtx);
412 414
@@ -496,7 +498,9 @@ static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start,
496#endif 498#endif
497 499
498 mutex_lock(&sd_mtx); 500 mutex_lock(&sd_mtx);
501#ifndef BOOTLOADER
499 sd_enable(true); 502 sd_enable(true);
503#endif
500 504
501#ifdef HAVE_MULTIVOLUME 505#ifdef HAVE_MULTIVOLUME
502 if (drive != 0 && !card_detect_target()) 506 if (drive != 0 && !card_detect_target())
@@ -583,7 +587,9 @@ static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start,
583 587
584 while (1) 588 while (1)
585 { 589 {
590#ifndef BOOTLOADER
586 sd_enable(false); 591 sd_enable(false);
592#endif
587 mutex_unlock(&sd_mtx); 593 mutex_unlock(&sd_mtx);
588 594
589 return ret; 595 return ret;