summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-08-21 11:10:05 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-08-21 20:18:36 +0200
commit462adf2a0fefbfdbccfafa11c999ac6beb114e8a (patch)
treec913884505143715791afbf64877ce116c501252 /firmware
parente90a5efe543914264bf697518ebf9564ff8a9964 (diff)
downloadrockbox-462adf2a0fefbfdbccfafa11c999ac6beb114e8a.tar.gz
rockbox-462adf2a0fefbfdbccfafa11c999ac6beb114e8a.tar.bz2
rockbox-462adf2a0fefbfdbccfafa11c999ac6beb114e8a.zip
imx233: always keep cards in TRAN mode
Instead of going back and forth between TRAN and STBY modes, stay in TRAN mode all the time, this avoid two commands on each read/write and a potential delay to wait for the card. Change-Id: Iafd456ab9a581d870331b622eeb48dcc254eda7f
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/imx233/sdmmc-imx233.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c
index 5ebf0c7d3b..99dd817ec6 100644
--- a/firmware/target/arm/imx233/sdmmc-imx233.c
+++ b/firmware/target/arm/imx233/sdmmc-imx233.c
@@ -497,9 +497,6 @@ static int init_mmc_drive(int drive)
window_start[drive] = 0;
window_end[drive] = *sec_count;
}
- /* deselect card */
- if(!send_cmd(drive, MMC_DESELECT_CARD, 0, MCI_NO_RESP, NULL))
- return -13;
/* MMC always support CMD23 */
support_set_block_count[drive] = false;
@@ -578,18 +575,6 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf
ret = -201;
goto Lend;
}
- /* select card.
- * NOTE: rely on SD_SELECT_CARD=MMC_SELECT_CARD */
- if(!send_cmd(drive, SD_SELECT_CARD, SDMMC_RCA(drive), MCI_NO_RESP, NULL))
- {
- ret = -20;
- goto Lend;
- }
- /* wait for TRAN state */
- /* NOTE: rely on SD_TRAN=MMC_TRAN */
- ret = wait_for_state(drive, SD_TRAN);
- if(ret < 0)
- goto Ldeselect;
/**
* NOTE: we need to make sure dma transfers are aligned. This is handled
@@ -646,13 +631,6 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf
else
ret = __xfer_sectors(drive, start, count, buf, read);
}
-
- /* deselect card */
- Ldeselect:
- /* CMD7 w/rca =0 : deselects card & puts it in STBY state
- * NOTE: rely on SD_DESELECT_CARD=MMC_DESELECT_CARD */
- if(!send_cmd(drive, SD_DESELECT_CARD, 0, MCI_NO_RESP, NULL))
- ret = -23;
Lend:
/* update led status */
led(false);