On 10/18/19 8:06 AM, Damien Hedde wrote:
> This commit adds support of Resettable interface to buses and devices:
> + ResettableState structure is added in the Bus/Device state
> + Resettable methods are implemented.
> + device/bus_is_in_reset function defined
> 
> This commit allows to transition the objects to the new
> multi-phase interface without changing the reset behavior at all.
> Object single reset method can be split into the 3 different phases
> but the 3 phases are still executed in a row for a given object.
> From the qdev/qbus reset api point of view, nothing is changed.
> qdev_reset_all() and qbus_reset_all() are not modified as well as
> device_legacy_reset().
> 
> Transition of an object must be done from mother class to daughter
> classes. Care has been taken to allow the transition of a mother class
> without requiring the daughter classes to be transitioned at the same
> time. Note that SysBus and SysBusDevice class do not need any transition
> because they do not override the legacy reset method.
> 
> Signed-off-by: Damien Hedde <damien.he...@greensocs.com>
> ---
>  hw/core/bus.c          | 97 ++++++++++++++++++++++++++++++++++++++++++
>  hw/core/qdev.c         | 97 ++++++++++++++++++++++++++++++++++++++++++
>  include/hw/qdev-core.h | 27 ++++++++++++
>  tests/Makefile.include |  1 +
>  4 files changed, 222 insertions(+)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


r~


Reply via email to