qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/sd/omap_mmc: Don't use sd_cmd_type_t


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] hw/sd/omap_mmc: Don't use sd_cmd_type_t
Date: Thu, 17 Oct 2024 19:33:41 -0300
User-agent: Mozilla Thunderbird

On 17/10/24 13:27, Peter Maydell wrote:
In commit 1ab08790bb75e4 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: 1ab08790bb75 ("hw/sd/sdcard: Store command type in SDProto")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
  include/hw/sd/sd.h |  8 --------
  hw/sd/omap_mmc.c   | 22 ++++++++++++++++------
  hw/sd/sd.c         |  8 ++++++++
  3 files changed, 24 insertions(+), 14 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]