[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v42 10/98] hw/sd/sdcard: Assign SDCardStates enum values
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v42 10/98] hw/sd/sdcard: Assign SDCardStates enum values |
Date: |
Fri, 28 Jun 2024 09:00:46 +0200 |
SDCardStates enum values are specified, so assign them
correspondingly. It will be useful later when we add
states from later specs, which might not be continuous.
See CURRENT_STATE bits in section 4.10.1 "Card Status".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Cédric Le Goater <clg@redhat.com>
---
hw/sd/sd.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 135b7d2e23..fbdfafa3a6 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -75,16 +75,16 @@ enum SDCardModes {
};
enum SDCardStates {
- sd_inactive_state = -1,
- sd_idle_state = 0,
- sd_ready_state,
- sd_identification_state,
- sd_standby_state,
- sd_transfer_state,
- sd_sendingdata_state,
- sd_receivingdata_state,
- sd_programming_state,
- sd_disconnect_state,
+ sd_inactive_state = -1,
+ sd_idle_state = 0,
+ sd_ready_state = 1,
+ sd_identification_state = 2,
+ sd_standby_state = 3,
+ sd_transfer_state = 4,
+ sd_sendingdata_state = 5,
+ sd_receivingdata_state = 6,
+ sd_programming_state = 7,
+ sd_disconnect_state = 8,
};
typedef sd_rsp_type_t (*sd_cmd_handler)(SDState *sd, SDRequest req);
--
2.41.0
- [PATCH v42 05/98] hw/sd/sdcard: Trace requested address computed by sd_req_get_address(), (continued)
- [PATCH v42 05/98] hw/sd/sdcard: Trace requested address computed by sd_req_get_address(), Philippe Mathieu-Daudé, 2024/06/28
- [PATCH v42 06/98] hw/sd/sdcard: Do not store vendor data on block drive (CMD56), Philippe Mathieu-Daudé, 2024/06/28
- [PATCH v42 07/98] hw/sd/sdcard: Send WRITE_PROT bits MSB first (CMD30), Philippe Mathieu-Daudé, 2024/06/28
- [PATCH v42 08/98] hw/sd/sdcard: Send NUM_WR_BLOCKS bits MSB first (ACMD22), Philippe Mathieu-Daudé, 2024/06/28
- [PATCH v42 09/98] hw/sd/sdcard: Use READY_FOR_DATA definition instead of magic value, Philippe Mathieu-Daudé, 2024/06/28
- [PATCH v42 11/98] hw/sd/sdcard: Simplify sd_inactive_state handling, Philippe Mathieu-Daudé, 2024/06/28
- [PATCH v42 10/98] hw/sd/sdcard: Assign SDCardStates enum values,
Philippe Mathieu-Daudé <=
- [PATCH v42 12/98] hw/sd/sdcard: Restrict SWITCH_FUNCTION to sd_transfer_state (CMD6), Philippe Mathieu-Daudé, 2024/06/28
- [PATCH v42 14/98] hw/sd/sdcard: Extract sd_blk_len() helper, Philippe Mathieu-Daudé, 2024/06/28
- [NOTFORMERGE PATCH v42 15/98] tests/qtest: Disable npcm7xx_sdhci tests using hardcoded RCA, Philippe Mathieu-Daudé, 2024/06/28
- [PATCH v42 13/98] hw/sd/sdcard: Add direct reference to SDProto in SDState, Philippe Mathieu-Daudé, 2024/06/28
- [PATCH v42 16/98] hw/sd/sdcard: Generate random RCA value, Philippe Mathieu-Daudé, 2024/06/28