mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
hw/core: deprecate old reset functions and introduce new ones
Deprecate device_legacy_reset(), qdev_reset_all() and qbus_reset_all() to be replaced by new functions device_cold_reset() and bus_cold_reset() which uses resettable API. Also introduce resettable_cold_reset_fn() which may be used as a replacement for qdev_reset_all_fn and qbus_reset_all_fn(). Following patches will be needed to look at legacy reset call sites and switch to resettable api. The legacy functions will be removed when unused. Signed-off-by: Damien Hedde <damien.hedde@greensocs.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200123132823.1117486-9-damien.hedde@greensocs.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
e755e12759
commit
abb89dbf2b
5 changed files with 51 additions and 0 deletions
|
@ -68,6 +68,11 @@ int qbus_walk_children(BusState *bus,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void bus_cold_reset(BusState *bus)
|
||||
{
|
||||
resettable_reset(OBJECT(bus), RESET_TYPE_COLD);
|
||||
}
|
||||
|
||||
bool bus_is_in_reset(BusState *bus)
|
||||
{
|
||||
return resettable_is_in_reset(OBJECT(bus));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue