summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-03-14 21:38:30 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-03-14 21:38:30 +0000
commit291e2b1ae6149b6864fd05053378a9491a9c518c (patch)
tree3cad12a28936beb6382f6ad770cd3e7fff0bc739
parent9b416c0652b29cac1b1b3ad1a8ce1a627076fadc (diff)
downloadrockbox-291e2b1ae6149b6864fd05053378a9491a9c518c.tar.gz
rockbox-291e2b1ae6149b6864fd05053378a9491a9c518c.zip
sd-as3525v2: delay a bit before reading the command response
Especially when using caches we might read the response too fast and get the response for the previous command instead. Now Clip+ boots fine with both instruction & data caches enabled, the delay might need to be lowered though: boot time is a bit longer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25183 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index 9175ef0f09..94b46017da 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -377,6 +377,9 @@ static bool send_cmd(const int cmd, const int arg, const int flags,
377 377
378 if(flags & MCI_RESP) 378 if(flags & MCI_RESP)
379 { 379 {
380 mci_delay(); /* if we read the response too fast we might read the
381 * response of the previous command instead */
382
380 if(flags & MCI_LONG_RESP) 383 if(flags & MCI_LONG_RESP)
381 { 384 {
382 /* store the response in little endian order for the words */ 385 /* store the response in little endian order for the words */