hw/sd.c: Correct handling of APP_CMD status bit
commit1d06cb7ab93f879ac25c9f5ef1d1ac8d97a42dfc
authorPeter Maydell <peter.maydell@linaro.org>
Sun, 18 Dec 2011 20:37:59 +0000 (18 21:37 +0100)
committerAndrzej Zaborowski <andrew.zaborowski@intel.com>
Wed, 21 Dec 2011 04:01:46 +0000 (21 05:01 +0100)
tree8cb01591bf771580005073bef2c7f74abc2454b2
parent10a412dab3f54439ea3d60274eb41668f7d83bd2
hw/sd.c: Correct handling of APP_CMD status bit

Fix some bugs in our implementation of the APP_CMD status bit:
 * the response to an ACMD should have APP_CMD set, not cleared
 * if an illegal ACMD is sent then the next command should be
   handled as a normal command

This requires that we split "card is expecting an ACMD" from
the state of the APP_CMD status bit (the latter indicates
both "expecting ACMD" and "that was an ACMD").

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
hw/sd.c