hw/core/qdev: Simplify legacy_reset handling
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 13 Sep 2024 14:31:45 +0000 (15:31 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 13 Sep 2024 14:31:45 +0000 (15:31 +0100)
commit5fdb6cd27211eff4d5b607972ac1d1d02688e905
tree8b8567abc82ad6ccbcea049717425d6c0e649714
parentb5fe9bf296ea5604a16f6dfb4777bfce56cd48c0
hw/core/qdev: Simplify legacy_reset handling

Now that all devices which still implement a the legacy reset method
register it via device_class_legacy_reset(), we can simplify the
handling of these devices.  Instead of using the complex
Resettable::get_transitional_function machinery, we register a hold
phase method which invokes the DeviceClass::legacy_reset method.

This will allow us to remove all the get_transitional_function
handling from resettable.c.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240830145812.1967042-11-peter.maydell@linaro.org
hw/core/qdev.c