]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/sd/omap_mmc: Do a minimal conversion to QDev
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 28 Jan 2025 10:45:09 +0000 (10:45 +0000)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 31 Jan 2025 18:36:44 +0000 (19:36 +0100)
commit4cadcb6b5f90bf0e9d0d23ad7552a0857dc593e7
treec7b1476d09ddb99b3372ebbedb9bbeb1b46d48c6
parentadc1a4a26a9e060c76f213e2b5bf275519844068
hw/sd/omap_mmc: Do a minimal conversion to QDev

Do a minimal conversion of the omap_mmc device model to QDev.

In this commit we do the bare minimum to produce a working device:
 * add the SysBusDevice parent_obj and the usual type boilerplate
 * omap_mmc_init() now returns a DeviceState*
 * reset is handled by sysbus reset, so the SoC reset function
   doesn't need to call omap_mmc_reset() any more
 * code that should obviously be in init/realize is moved there
   from omap_mmc_init()

We leave various pieces of cleanup to later commits:
 * rationalizing 'struct omap_mmc_s *' to 'OMAPMMCState *'
 * using gpio lines rather than having omap_mmc_init() directly
   set s->irq, s->dma
 * switching away from the legacy SD API and instead having
   the SD card plugged into a bus

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250128104519.3981448-2-peter.maydell@linaro.org>
[PMD: Do not add omap_mmc_realize()]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/arm/omap1.c
hw/sd/omap_mmc.c
include/hw/arm/omap.h