diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2021-03-10 00:21:44 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@redhat.com> | 2021-03-18 11:16:31 +0100 |
commit | 7cb1096021fa749f9dc50a3ff074c2101680741c (patch) | |
tree | 1d8b28f4aad652ed152595a65937d01bd0238a3c /ui/input-linux.c | |
parent | cadf25cfaa8d495c8e642cda49eda074352a8fc8 (diff) |
hw/block/pflash_cfi02: Rename register_memory(true) as mode_read_array
The same pattern is used when setting the flash in READ_ARRAY mode:
- Set the state machine command to READ_ARRAY
- Reset the write_cycle counter
- Reset the memory region in ROMD
Refactor the current code by extracting this pattern.
It is used three times:
- When the timer expires and not in bypass mode
- On a read access (on invalid command).
- When the device is initialized. Here the ROMD mode is hidden
by the memory_region_init_rom_device() call.
pflash_register_memory(rom_mode=true) already sets the ROM device
in "read array" mode (from I/O device to ROM one). Explicit that
by renaming the function as pflash_mode_read_array(), adding
a trace event and resetting wcycle.
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-7-philmd@redhat.com>
Diffstat (limited to 'ui/input-linux.c')
0 files changed, 0 insertions, 0 deletions