hw/sd.c: When setting ADDRESS_ERROR bit, don't clear everything else
Fix a typo that meant that ADDRESS_ERRORs setting or clearing write protection would clear every other bit in the status register. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
This commit is contained in:
parent
abda1f37ee
commit
e30d59388b
4
hw/sd.c
4
hw/sd.c
@ -999,7 +999,7 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
|
||||
switch (sd->state) {
|
||||
case sd_transfer_state:
|
||||
if (addr >= sd->size) {
|
||||
sd->card_status = ADDRESS_ERROR;
|
||||
sd->card_status |= ADDRESS_ERROR;
|
||||
return sd_r1b;
|
||||
}
|
||||
|
||||
@ -1019,7 +1019,7 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
|
||||
switch (sd->state) {
|
||||
case sd_transfer_state:
|
||||
if (addr >= sd->size) {
|
||||
sd->card_status = ADDRESS_ERROR;
|
||||
sd->card_status |= ADDRESS_ERROR;
|
||||
return sd_r1b;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user