summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2021-03-10 00:31:16 +0100
committerPhilippe Mathieu-Daudé <philmd@redhat.com>2021-03-18 11:16:31 +0100
commit2b49cd652a1df7e0120d75e3e13665410672682e (patch)
tree092cf7a921ae14f25664e7027aeedfec3cda7c93
parentd9106341657198096fed7e7c116cd9af606b59c5 (diff)
downloadfocaccia-qemu-2b49cd652a1df7e0120d75e3e13665410672682e.tar.gz
focaccia-qemu-2b49cd652a1df7e0120d75e3e13665410672682e.zip
hw/block/pflash_cfi01: Clarify trace events
Use the 'mode_read_array' event when we set the device in such
mode, and use the 'reset' event in DeviceReset handler.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: David Edmondson <david.edmondson@oracle.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210310170528.1184868-10-philmd@redhat.com>
-rw-r--r--hw/block/pflash_cfi01.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 779a62f3b0..c8cecb3ac8 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -663,7 +663,7 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offset,
                   "\n", __func__, offset, pfl->wcycle, pfl->cmd, value);
 
  mode_read_array:
-    trace_pflash_reset();
+    trace_pflash_mode_read_array();
     memory_region_rom_device_set_romd(&pfl->mem, true);
     pfl->wcycle = 0;
     pfl->cmd = 0x00; /* This model reset value for READ_ARRAY (not CFI) */
@@ -886,6 +886,7 @@ static void pflash_cfi01_system_reset(DeviceState *dev)
 {
     PFlashCFI01 *pfl = PFLASH_CFI01(dev);
 
+    trace_pflash_reset();
     /*
      * The command 0x00 is not assigned by the CFI open standard,
      * but QEMU historically uses it for the READ_ARRAY command (0xff).