summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2011-03-26 19:52:42 +0000
committerBertrik Sikken <bertrik@sikken.nl>2011-03-26 19:52:42 +0000
commit2543340bf4ee69f9005b14e5fb335187125a5e94 (patch)
tree16ad184f36cd5f34b4f057d64fad8ef6365f8155 /firmware
parentd9bc251de1fd9a34b34bff44c6cd76659ea96c98 (diff)
downloadrockbox-2543340bf4ee69f9005b14e5fb335187125a5e94.tar.gz
rockbox-2543340bf4ee69f9005b14e5fb335187125a5e94.zip
AMSv2 SD: sd card communication speed can be changed back to full speed after CMD3 (SEND_RCA)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29647 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index c87a15ea09..6d07bcca97 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -546,6 +546,9 @@ static int sd_init_card(const int drive)
#endif
/* End of Card Identification Mode ************************************/
+ /* 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 */
@@ -585,9 +588,6 @@ static int sd_init_card(const int drive)
if(drive == INTERNAL_AS3525) /* The OF is stored in the first blocks */
card_info[INTERNAL_AS3525].numblocks -= AMS_OF_SIZE;
- /* Card back to full speed */
- MCI_CLKDIV &= ~(0xFF); /* CLK_DIV_0 : bits 7:0 = 0x00 */
-
/* 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 -12;