diff options
-rw-r--r-- | firmware/target/arm/as3525/ata_sd_as3525.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index 6270f4363b..43c1a37670 100644 --- a/firmware/target/arm/as3525/ata_sd_as3525.c +++ b/firmware/target/arm/as3525/ata_sd_as3525.c | |||
@@ -312,9 +312,6 @@ static int sd_init_card(const int drive) | |||
312 | 312 | ||
313 | /* End of Card Identification Mode ************************************/ | 313 | /* End of Card Identification Mode ************************************/ |
314 | 314 | ||
315 | /* Boost MCICLK to operating speed */ /*FIXME: v1 at 31 MHz still too high*/ | ||
316 | MCI_CLOCK(drive) = (sd_v2 ? MCI_HALFSPEED : MCI_HALFSPEED); | ||
317 | |||
318 | #ifdef HAVE_MULTIDRIVE /* The internal SDs are v1 */ | 315 | #ifdef HAVE_MULTIDRIVE /* The internal SDs are v1 */ |
319 | 316 | ||
320 | /* Try to switch V2 cards to HS timings, non HS seem to ignore this */ | 317 | /* Try to switch V2 cards to HS timings, non HS seem to ignore this */ |
@@ -323,6 +320,7 @@ static int sd_init_card(const int drive) | |||
323 | /* CMD7 w/rca: Select card to put it in TRAN state */ | 320 | /* CMD7 w/rca: Select card to put it in TRAN state */ |
324 | if(!send_cmd(drive, SD_SELECT_CARD, card_info[drive].rca, MCI_ARG, NULL)) | 321 | if(!send_cmd(drive, SD_SELECT_CARD, card_info[drive].rca, MCI_ARG, NULL)) |
325 | return -5; | 322 | return -5; |
323 | mci_delay(); | ||
326 | 324 | ||
327 | if(sd_wait_for_state(drive, SD_TRAN)) | 325 | if(sd_wait_for_state(drive, SD_TRAN)) |
328 | return -6; | 326 | return -6; |
@@ -338,6 +336,9 @@ static int sd_init_card(const int drive) | |||
338 | } | 336 | } |
339 | #endif /* HAVE_MULTIDRIVE */ | 337 | #endif /* HAVE_MULTIDRIVE */ |
340 | 338 | ||
339 | /* Boost MCICLK to operating speed */ /*FIXME: v1 at 31 MHz still too high*/ | ||
340 | MCI_CLOCK(drive) = (sd_v2 ? MCI_HALFSPEED : MCI_HALFSPEED); | ||
341 | |||
341 | /* CMD9 send CSD */ | 342 | /* CMD9 send CSD */ |
342 | if(!send_cmd(drive, SD_SEND_CSD, card_info[drive].rca, | 343 | if(!send_cmd(drive, SD_SEND_CSD, card_info[drive].rca, |
343 | MCI_RESP|MCI_LONG_RESP|MCI_ARG, temp_reg)) | 344 | MCI_RESP|MCI_LONG_RESP|MCI_ARG, temp_reg)) |