On 5/1/21 7:55 AM, Markus Armbruster wrote: > Peter Maydell <peter.mayd...@linaro.org> writes: > >> The omap_mmc_reset() function resets its SD card via >> device_legacy_reset(). We know that the SD card does not have a qbus >> of its own, so the new device_cold_reset() function (which resets >> both the device and its child buses) is equivalent here to >> device_legacy_reset() and we can just switch to the new API. >> >> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> >> --- >> cc'ing Markus who was interested in conversions away from >> the legacy API. As warned, the conversion patch itself is >> not very interesting as the difficulty is all in confirming >> that the device being reset has no qbuses... > > The commit messsage makes this helpful. Thanks! Looking in archives, Damien did convert devices in v3: https://www.mail-archive.com/qemu-devel@nongnu.org/msg634100.html But it got lost after telling him cold/warn was not enough, and better would be a multi-phase reset. Full thread: https://www.mail-archive.com/qemu-block@nongnu.org/msg54084.html > I wonder whether we should add a hint to device_legacy_reset()'s > comment. I'd rather convert and remove device_legacy_reset(). Regards, Phil.