[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/sd/omap_mmc: Use device_cold_reset() instead of device_le
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] hw/sd/omap_mmc: Use device_cold_reset() instead of device_legacy_reset() |
Date: |
Sat, 1 May 2021 11:45:27 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 5/1/21 7:55 AM, Markus Armbruster wrote:
> Peter Maydell <peter.maydell@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.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@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.