summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/SOURCES1
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c29
2 files changed, 1 insertions, 29 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index 7afd97309f..96008a9c20 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -1,3 +1,4 @@
+test_disk.c
/* plugins common to all models */
chessclock.c
credits.c
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index 67ef7b34ef..73816e5537 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -549,40 +549,11 @@ static int sd_init_card(const int drive)
/* Card back to full speed */
MCI_CLKDIV &= ~(0xFF); /* CLK_DIV_0 : bits 7:0 = 0x00 */
- if (sd_v2)
- {
- /* Attempt to switch cards to HS timings, non HS cards just ignore this */
- /* CMD7 w/rca: Select card to put it in TRAN state */
- if(!send_cmd(drive, SD_SELECT_CARD, card_info[drive].rca, MCI_RESP, &response))
- return -7;
-
- if(sd_wait_for_tran_state(drive))
- return -8;
-
- /* CMD6 */
- if(!send_cmd(drive, SD_SWITCH_FUNC, 0x80fffff1, MCI_RESP, &response))
- return -9;
-
- /* This delay is a bit of a hack, but seems to fix card detection
- problems with some SD cards (particularly 16 GB and bigger cards).
- Preferably we should handle this properly instead of using a delay,
- see also FS#11870. */
- sleep(HZ/10);
-
- /* We need to go back to STBY state now so we can read csd */
- /* CMD7 w/rca=0: Deselect card to put it in STBY state */
- if(!send_cmd(drive, SD_DESELECT_CARD, 0, MCI_NO_RESP, NULL))
- return -10;
- }
-
/* CMD9 send CSD */
if(!send_cmd(drive, SD_SEND_CSD, card_info[drive].rca,
MCI_RESP|MCI_LONG_RESP, card_info[drive].csd))
return -11;
- /* Another delay hack, see FS#11798 */
- mci_delay();
-
sd_parse_csd(&card_info[drive]);
if(drive == INTERNAL_AS3525) /* The OF is stored in the first blocks */