hw/sd/sdcard: Use registerfield CSR::CURRENT_STATE definition

Use registerfield-generated definitions to update card_status.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Message-Id: <20240621080554.18986-6-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2024-06-17 13:03:56 +02:00
parent f17fb69c55
commit 904547845c

View File

@ -1788,8 +1788,8 @@ int sd_do_command(SDState *sd, SDRequest *req,
* (Do this now so they appear in r1 responses.) * (Do this now so they appear in r1 responses.)
*/ */
sd->current_cmd = req->cmd; sd->current_cmd = req->cmd;
sd->card_status &= ~CURRENT_STATE; sd->card_status = FIELD_DP32(sd->card_status, CSR,
sd->card_status |= (last_state << 9); CURRENT_STATE, last_state);
} }
send_response: send_response: