qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 04/11] hw/sd/omap_mmc: Convert to SDBus API


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 04/11] hw/sd/omap_mmc: Convert to SDBus API
Date: Thu, 30 Jan 2025 23:26:36 +0100
User-agent: Mozilla Thunderbird

On 28/1/25 11:45, Peter Maydell wrote:
Convert the OMAP MMC controller to the new SDBus API:
  * the controller creates an SDBus bus
  * instead of sd_foo functions on the SDState object, call
    sdbus_foo functions on the SDBus
  * the board code creates a proper TYPE_SD_CARD object and attaches
    it to the controller's SDBus, instead of the controller creating
    a card directly via sd_init() that never gets attached to any bus
  * because the SD card object is on a bus, it gets reset automatically
    by the "traverse the qbus tree resetting things" code, and we don't
    need to manually reset the card from the controller reset function

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
  include/hw/arm/omap.h |  1 -
  hw/arm/omap1.c        | 10 +++++++++-
  hw/sd/omap_mmc.c      | 30 ++++++++++--------------------
  3 files changed, 19 insertions(+), 22 deletions(-)


@@ -643,6 +630,9 @@ static void omap_mmc_initfn(Object *obj)
static void omap_mmc_realize(DeviceState *dev, Error **errp)
  {
+    OMAPMMCState *s = OMAP_MMC(dev);
+
+    qbus_init(&s->sdbus, sizeof(s->sdbus), TYPE_SD_BUS, dev, "sd-bus");

Why you don't create the bus in omap_mmc_initfn()?

Anyhow,
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

  }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]