@@ -161,7 +161,8 @@ static const char *sd_state_name(enum SDCardStates state)
static void sd_set_mode(SDState *sd, enum SDCardModes mode)
{
if (sd->mode != mode) {
- trace_sdcard_set_mode(sd_mode_name(sd->mode), sd_mode_name(mode));
+ trace_sdcard_set_mode(sd_mode_name(sd->mode), sd_mode_name(mode),
+ sd_state_name(sd->state));
sd->mode = mode;
}
}
@@ -193,7 +194,8 @@ static void sd_update_mode(SDState *sd)
static void sd_set_state(SDState *sd, enum SDCardStates state)
{
if (sd->state != state) {
- trace_sdcard_set_state(sd_state_name(sd->state), sd_state_name(state));
+ trace_sdcard_set_state(sd_state_name(sd->state), sd_state_name(state),
+ sd_mode_name(sd->mode));
sd->state = state;
}
}
@@ -22,8 +22,8 @@ sdhci_write_dataport(uint16_t data_count) "write buffer filled with %u bytes of
sdhci_led(bool state) "LED: %u"
# hw/sd/sd.c
-sdcard_set_mode(const char *current_mode, const char *new_mode) "%s -> %s"
-sdcard_set_state(const char *current_state, const char *new_state) "%s -> %s"
+sdcard_set_mode(const char *current_mode, const char *new_mode, const char *state) "%s -> %s (state: %s)"
+sdcard_set_state(const char *current_state, const char *new_state, const char *mode) "%s -> %s (mode: %s)"
# hw/sd/milkymist-memcard.c
milkymist_memcard_memory_read(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x"
sd_set_mode() can now use sd_state_name(), and sd_set_state() use sd_mode_name(). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- hw/sd/sd.c | 6 ++++-- hw/sd/trace-events | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-)