summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-02-21 22:01:13 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-02-21 22:01:13 +0000
commitceae8748b85b1917aeff0155bd19d1bee7a0b05d (patch)
tree7b40b0e64e9e717a5d1373ae4cf37d7dd249b5fd /firmware
parent4be56226c1877afe1532ffcc8d6db33e0a283d3f (diff)
downloadrockbox-ceae8748b85b1917aeff0155bd19d1bee7a0b05d.tar.gz
rockbox-ceae8748b85b1917aeff0155bd19d1bee7a0b05d.tar.bz2
rockbox-ceae8748b85b1917aeff0155bd19d1bee7a0b05d.zip
sd-as3525v2: describe CTYPE bit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24827 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index 47cc690971..035dac7490 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -157,7 +157,10 @@ static void printf(const char *format, ...)
#define MCI_CLKSRC SD_REG(0x0C) /* clock source */
#define MCI_CLKENA SD_REG(0x10) /* clock enable */
#define MCI_TMOUT SD_REG(0x14) /* timeout */
+
#define MCI_CTYPE SD_REG(0x18) /* card type */
+ /* 1 bit per card, set = wide bus */
+
#define MCI_BLKSIZ SD_REG(0x1C) /* block size */
#define MCI_BYTCNT SD_REG(0x20) /* byte count */
#define MCI_MASK SD_REG(0x24) /* interrupt mask */
@@ -423,8 +426,7 @@ static int sd_init_card(void)
if(!send_cmd(SD_SET_BUS_WIDTH, card_info.rca | 2, MCI_NO_RESP, NULL))
return -11;
- MCI_CTYPE &= ~(0x10001);
- MCI_CTYPE |= 0x1;
+ MCI_CTYPE = (1<<0); /* Bus width = 4 */
if(!send_cmd(SD_SELECT_CARD, card_info.rca, MCI_NO_RESP, NULL))
return -9;
@@ -503,6 +505,8 @@ static void init_controller(void)
MCI_CTRL |= INT_ENABLE;
MCI_TMOUT = 0xffffffff;
+ MCI_CTYPE = 0;
+
MCI_CLKENA = (1<<shift) - 1;
MCI_ARGUMENT = 0;