Re: [PATCH v2 10/12] hw/block/pflash_cfi01: Extract pflash_mode_read_array()

2021-03-10 Thread Bin Meng
On Thu, Mar 11, 2021 at 1:37 AM Philippe Mathieu-Daudé wrote: > > 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

[PATCH v2 10/12] hw/block/pflash_cfi01: Extract pflash_mode_read_array()

2021-03-10 Thread Philippe Mathieu-Daudé
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: - On a read access (on invalid