qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/9] hw/block/pflash_cfi02: Rename register_memory(true) as m


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 6/9] hw/block/pflash_cfi02: Rename register_memory(true) as mode_read_array
Date: Wed, 10 Mar 2021 17:34:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

On 3/10/21 5:31 PM, Philippe Mathieu-Daudé wrote:
> On 3/10/21 11:59 AM, David Edmondson wrote:
>> On Wednesday, 2021-03-10 at 00:50:25 +01, 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 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.
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>
>> Reviewed-by: David Edmondson <david.edmondson@oracle.com>
>>
>> Okay, I see that pflash_register_memory() was going to lose its second
>> argument anyway, so perhaps no need to fix it in the previous patch.
> 
> It makes the previous patch more complex, so I'll keep it that way.

OK by previous I understood #5 but now I read your comment on patch #4.
I'll update #4 then.

> 
> Thanks for your review!
> 
> Phil.
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]