From f703a04ce558ac3c7c0587a2d919c39efb8ca3ba Mon Sep 17 00:00:00 2001 From: Damien Hedde Date: Thu, 30 Jan 2020 16:02:03 +0000 Subject: add device_legacy_reset function to prepare for reset api change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provide a temporary device_legacy_reset function doing what device_reset does to prepare for the transition with Resettable API. All occurrence of device_reset in the code tree are also replaced by device_legacy_reset. The new resettable API has different prototype and semantics (resetting child buses as well as the specified device). Subsequent commits will make the changeover for each call site individually; once that is complete device_legacy_reset() will be removed. Signed-off-by: Damien Hedde Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson Acked-by: David Gibson Acked-by: Cornelia Huck Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Message-id: 20200123132823.1117486-2-damien.hedde@greensocs.com Signed-off-by: Peter Maydell --- hw/sd/omap_mmc.c | 2 +- hw/sd/pl181.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/sd') diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c index c6e516b..4088a8a 100644 --- a/hw/sd/omap_mmc.c +++ b/hw/sd/omap_mmc.c @@ -318,7 +318,7 @@ void omap_mmc_reset(struct omap_mmc_s *host) * into any bus, and we must reset it manually. When omap_mmc is * QOMified this must move into the QOM reset function. */ - device_reset(DEVICE(host->card)); + device_legacy_reset(DEVICE(host->card)); } static uint64_t omap_mmc_read(void *opaque, hwaddr offset, diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c index 8033fe4..2b3776a 100644 --- a/hw/sd/pl181.c +++ b/hw/sd/pl181.c @@ -482,7 +482,7 @@ static void pl181_reset(DeviceState *d) /* Since we're still using the legacy SD API the card is not plugged * into any bus, and we must reset it manually. */ - device_reset(DEVICE(s->card)); + device_legacy_reset(DEVICE(s->card)); } static void pl181_init(Object *obj) -- cgit v1.1