diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2011-03-29 20:37:40 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2011-03-29 20:37:40 +0000 |
commit | 8351a1aa9db98bab1f66274ee7b7e33839a31c60 (patch) | |
tree | cafc2917b01d38257cef76de46173676f3462e7c /firmware/target | |
parent | 8c3fc23ae6d26b657724f5998dd4f467a39b0cc9 (diff) |
AMSv2 sd: do not try to switch sd cards into high-speed mode.
High-speed mode is only half implemented (sd controller still uses normal speed) and causes card detection problems.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29660 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525v2.c | 29 |
1 files changed, 0 insertions, 29 deletions
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 */ |