From 2543340bf4ee69f9005b14e5fb335187125a5e94 Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Sat, 26 Mar 2011 19:52:42 +0000 Subject: 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 --- firmware/target/arm/as3525/sd-as3525v2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index c87a15e..6d07bcc 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; -- cgit v1.1