[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/2] hw/timer/etraxfs_timer: Convert to 3-phase reset (Res
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 1/2] hw/timer/etraxfs_timer: Convert to 3-phase reset (Resettable interface) |
Date: |
Sun, 2 May 2021 17:04:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
Hi Edgar,
+Damien/Luc/Markus
On 5/2/21 8:21 AM, Edgar E. Iglesias wrote:
> On Sun, May 02, 2021 at 12:13:49AM +0200, Philippe Mathieu-Daudé wrote:
>> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>
>> TYPE_ETRAX_FS_TIMER is a sysbus device, so its DeviceClass::reset()
>> handler is called automatically when its qbus parent is reset
>> (we don't need to register it manually).
>>
>> Convert the generic reset to a enter/exit resettable ones, and
>> remove the qemu_register_reset() call.
>
> Hi Philippe,
>
> The interrupt should be updated in the reset_hold phase, otherwise
> interrupts stay asserted while the device is in reset.
OK. I took some time to understand in which handler the IRQ call had
to go, so I think to documentation is not clear enough:
* @phases.hold: This phase is called for entry into reset, once every
object
* in the system which is being reset has had its @phases.enter method
called.
* At this point devices can do actions that affect other objects.
*
* @phases.exit: This phase is called when the object leaves the reset
state.
* Actions affecting other objects are permitted.
Do you mind sending a patch to clarify? Personally I find listing what
can be done where easier to understand (explicit list) rather than
being generic and letting the developer choose.
>
> Otherwise this looks good to me.
>
> Cheers,
> Edgar