diff options
author | Tobias Diedrich <ranma+coreboot@tdiedrich.de> | 2010-06-22 21:44:42 +0000 |
---|---|---|
committer | Tobias Diedrich <ranma+coreboot@tdiedrich.de> | 2010-06-22 21:44:42 +0000 |
commit | 6e45f87e0f69619e721377a43eeb178c98b071bb (patch) | |
tree | c53ef696c15821b7d03c95a6e980047bd5487ca6 /firmware/target | |
parent | 9b8d53adfe21bc62e404f0e1a83183e637bc43b2 (diff) | |
download | rockbox-6e45f87e0f69619e721377a43eeb178c98b071bb.tar.gz rockbox-6e45f87e0f69619e721377a43eeb178c98b071bb.zip |
Give 4-bit mode another chance on AMSv1 since other bugs were fixed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27065 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525.c b/firmware/target/arm/as3525/sd-as3525.c index 9e55c16be6..02b0d725f7 100644 --- a/firmware/target/arm/as3525/sd-as3525.c +++ b/firmware/target/arm/as3525/sd-as3525.c | |||
@@ -363,6 +363,26 @@ static int sd_init_card(const int drive) | |||
363 | return -10; | 363 | return -10; |
364 | mci_delay(); | 364 | mci_delay(); |
365 | 365 | ||
366 | #ifndef BOOTLOADER | ||
367 | /* Switch to to 4 bit widebus mode */ | ||
368 | if(sd_wait_for_tran_state(drive) < 0) | ||
369 | return -11; | ||
370 | /* CMD55 */ /* Response is requested due to timing issue */ | ||
371 | if(!send_cmd(drive, SD_APP_CMD, card_info[drive].rca, MCI_ARG|MCI_RESP, &response)) | ||
372 | return -14; | ||
373 | /* ACMD42 */ | ||
374 | if(!send_cmd(drive, SD_SET_CLR_CARD_DETECT, 0, MCI_ARG|MCI_RESP, &response)) | ||
375 | return -15; | ||
376 | /* CMD55 */ /* Response is requested due to timing issue */ | ||
377 | if(!send_cmd(drive, SD_APP_CMD, card_info[drive].rca, MCI_ARG|MCI_RESP, &response)) | ||
378 | return -12; | ||
379 | /* ACMD6 */ | ||
380 | if(!send_cmd(drive, SD_SET_BUS_WIDTH, 2, MCI_ARG|MCI_RESP, &response)) | ||
381 | return -13; | ||
382 | /* Now that card is widebus make controller aware */ | ||
383 | MCI_CLOCK(drive) |= MCI_CLOCK_WIDEBUS; | ||
384 | #endif | ||
385 | |||
366 | /* | 386 | /* |
367 | * enable bank switching | 387 | * enable bank switching |
368 | * without issuing this command, we only have access to 1/4 of the blocks | 388 | * without issuing this command, we only have access to 1/4 of the blocks |