diff options
author | Damien Hedde <damien.hedde@greensocs.com> | 2020-01-30 16:02:04 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-01-30 16:02:04 +0000 |
commit | abb89dbf2bb3c4f8c74da638a610a73db6a7d4af (patch) | |
tree | 246cd245db3d89b2f48accb19169844028712bf2 /include/hw/resettable.h | |
parent | e755e12759e91a013e417a438305b133ea3c2d19 (diff) |
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>
Diffstat (limited to 'include/hw/resettable.h')
-rw-r--r-- | include/hw/resettable.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/hw/resettable.h b/include/hw/resettable.h index 5e215d94e4..f4c4bab0ef 100644 --- a/include/hw/resettable.h +++ b/include/hw/resettable.h @@ -222,6 +222,15 @@ bool resettable_is_in_reset(Object *obj); void resettable_change_parent(Object *obj, Object *newp, Object *oldp); /** + * resettable_cold_reset_fn: + * Helper to call resettable_reset((Object *) opaque, RESET_TYPE_COLD). + * + * This function is typically useful to register a reset handler with + * qemu_register_reset. + */ +void resettable_cold_reset_fn(void *opaque); + +/** * resettable_class_set_parent_phases: * * Save @rc current reset phases into @parent_phases and override @rc phases |