aboutsummaryrefslogtreecommitdiff
path: root/hw/sd.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2011-12-18 21:38:00 +0100
committerAndrzej Zaborowski <andrew.zaborowski@intel.com>2011-12-21 05:01:49 +0100
commitfcfa9351c57985ebb54fe6aacd06a270880a561f (patch)
tree0dba0aa7f3e504848e8f47cf5826db309a37bd28 /hw/sd.c
parent1d06cb7ab93f879ac25c9f5ef1d1ac8d97a42dfc (diff)
hw/sd.c: Clear status bits when read via response r6
Response format r6 includes a subset of the status bits; clear the clear-on-read bits which are read by an r6 response. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Diffstat (limited to 'hw/sd.c')
-rw-r--r--hw/sd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/sd.c b/hw/sd.c
index 6614cbf602..2b8ebe4d89 100644
--- a/hw/sd.c
+++ b/hw/sd.c
@@ -371,6 +371,7 @@ static void sd_response_r6_make(SDState *sd, uint8_t *response)
status = ((sd->card_status >> 8) & 0xc000) |
((sd->card_status >> 6) & 0x2000) |
(sd->card_status & 0x1fff);
+ sd->card_status &= ~(CARD_STATUS_C & 0xc81fff);
response[0] = (arg >> 8) & 0xff;
response[1] = arg & 0xff;