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>
"\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) */
{
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).