mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
hw/sd/omap_mmc: Don't use sd_cmd_type_t
In commit1ab08790bb
we did some refactoring of the SD card implementation, which included a rearrangement of the sd_cmd_type_t enum values. Unfortunately we didn't notice that this enum is not used solely inside the SD card model itself, but is also used by the OMAP MMC controller device. In the OMAP MMC controller, it is used to implement the handling of the Type field of the MMC_CMD register, so changing the enum values so that they no longer lined up with the bit definitions for that register field broke the controller model. The effect is that Linux fails to boot from an SD card on the "sx1" machine. Give omap-mmc its own enum which we can document as needing to match the encoding used in this device's register, so it isn't sharing sd_cmd_type_t with the SD card model any more. We can then move sd_cmd_type_t's definition out of sd.h and into sd.c, which is the only place that uses it. Cc: qemu-stable@nongnu.org Fixes:1ab08790bb
("hw/sd/sdcard: Store command type in SDProto") Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20241017162755.710698-1-peter.maydell@linaro.org
This commit is contained in:
parent
1505b651fd
commit
77dd098a5e
3 changed files with 24 additions and 14 deletions
|
@ -75,14 +75,6 @@ typedef enum {
|
|||
UHS_III = 3, /* currently not supported */
|
||||
} sd_uhs_mode_t;
|
||||
|
||||
typedef enum {
|
||||
sd_spi,
|
||||
sd_bc, /* broadcast -- no response */
|
||||
sd_bcr, /* broadcast with response */
|
||||
sd_ac, /* addressed -- no data transfer */
|
||||
sd_adtc, /* addressed with data transfer */
|
||||
} sd_cmd_type_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t cmd;
|
||||
uint32_t arg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue