summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/as3525/ata_sd_as3525.c9
-rw-r--r--firmware/target/arm/ata-sd-pp.c9
-rw-r--r--firmware/target/arm/tcc780x/sd-tcc780x.c7
-rw-r--r--firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c4
4 files changed, 21 insertions, 8 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c
index bca52a09f1..995bf932ca 100644
--- a/firmware/target/arm/as3525/ata_sd_as3525.c
+++ b/firmware/target/arm/as3525/ata_sd_as3525.c
@@ -522,7 +522,14 @@ bool sd_present(IF_MD_NONVOID(int drive))
#ifndef HAVE_MULTIDRIVE
const int drive=0;
#endif
- return (card_info[drive].initialized && card_info[drive].numblocks > 0);
+ if(drive==0)
+ {
+ return true;
+ }
+ else
+ {
+ return card_detect_target();
+ }
}
#endif
diff --git a/firmware/target/arm/ata-sd-pp.c b/firmware/target/arm/ata-sd-pp.c
index f963e0ac48..78a2a4f3a4 100644
--- a/firmware/target/arm/ata-sd-pp.c
+++ b/firmware/target/arm/ata-sd-pp.c
@@ -1345,7 +1345,14 @@ bool sd_present(IF_MD_NONVOID(int drive))
#ifndef HAVE_MULTIDRIVE
const int drive=0;
#endif
- return (card_info[drive].initialized && card_info[drive].numblocks > 0);
+ if(drive==0)
+ {
+ return true;
+ }
+ else
+ {
+ return card_detect_target();
+ }
}
#endif
diff --git a/firmware/target/arm/tcc780x/sd-tcc780x.c b/firmware/target/arm/tcc780x/sd-tcc780x.c
index 8b0ac8a8a6..bb426d8125 100644
--- a/firmware/target/arm/tcc780x/sd-tcc780x.c
+++ b/firmware/target/arm/tcc780x/sd-tcc780x.c
@@ -252,11 +252,10 @@ bool sd_removable(IF_MD_NONVOID(int card_no))
bool sd_present(IF_MD_NONVOID(int card_no))
{
-#ifndef HAVE_MULTIDRIVE
- const int card_no = 0;
+#ifdef HAVE_MULTIDRIVE
+ (void)card_no;
#endif
- return (card_info[card_no].initialized &&
- card_info[card_no].numblocks > 0);
+ return card_detect_target();
}
#else
diff --git a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
index b1a9d599d9..544e0cf481 100644
--- a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
+++ b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
@@ -1366,10 +1366,10 @@ bool sd_removable(IF_MV_NONVOID(int drive))
bool sd_present(IF_MV_NONVOID(int drive))
{
-#ifdef HAVE_MULTIVOLUME
+#ifdef HAVE_MULTIDRIVE
(void)drive;
#endif
- return (card.numblocks > 0 && card_detect_target());
+ return card_detect_target();
}
#ifdef CONFIG_STORAGE_MULTI