qemu/hw/sd
Peter Maydell 77dd098a5e hw/sd/omap_mmc: Don't use sd_cmd_type_t
In commit 1ab08790bb 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
2024-10-29 15:04:46 +00:00
..
allwinner-sdhost.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
aspeed_sdhci.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
bcm2835_sdhost.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
cadence_sdhci.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
core.c hw/sd/sdcard: Extract TYPE_SDMMC_COMMON from TYPE_SD_CARD 2024-07-05 23:55:02 +02:00
Kconfig hw/sd: Add Cadence SDHCI emulation 2020-09-09 15:54:18 -07:00
meson.build hw/sd: Remove pxa2xx_mmci.c 2024-10-01 14:25:29 +01:00
npcm7xx_sdhci.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
omap_mmc.c hw/sd/omap_mmc: Don't use sd_cmd_type_t 2024-10-29 15:04:46 +00:00
pl181.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
sd.c hw/sd/omap_mmc: Don't use sd_cmd_type_t 2024-10-29 15:04:46 +00:00
sdhci-internal.h hw/sd/sdhci: Support big endian SD host controller interfaces 2022-12-21 14:17:55 -03:00
sdhci-pci.c hw/sd: Declare QOM types using DEFINE_TYPES() macro 2023-11-07 13:08:49 +01:00
sdhci.c hw/sdhci: fix -Werror=maybe-uninitialized false-positive 2024-10-02 16:14:29 +04:00
sdmmc-internal.h hw/sd/sdcard: Extract TYPE_SDMMC_COMMON from TYPE_SD_CARD 2024-07-05 23:55:02 +02:00
ssi-sd.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
trace-events hw/sd: Remove pxa2xx_mmci.c 2024-10-01 14:25:29 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00