summary refs log tree commit diff stats
path: root/hw/arm/omap1.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2025-01-28 10:45:09 +0000
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-31 19:36:44 +0100
commit4cadcb6b5f90bf0e9d0d23ad7552a0857dc593e7 (patch)
treec7b1476d09ddb99b3372ebbedb9bbeb1b46d48c6 /hw/arm/omap1.c
parentadc1a4a26a9e060c76f213e2b5bf275519844068 (diff)
downloadfocaccia-qemu-4cadcb6b5f90bf0e9d0d23ad7552a0857dc593e7.tar.gz
focaccia-qemu-4cadcb6b5f90bf0e9d0d23ad7552a0857dc593e7.zip
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>
Diffstat (limited to 'hw/arm/omap1.c')
-rw-r--r--hw/arm/omap1.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index f3a0ac40e4..ea07b9aa31 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -3716,7 +3716,6 @@ static void omap1_mpu_reset(void *opaque)
     omap_uart_reset(mpu->uart[0]);
     omap_uart_reset(mpu->uart[1]);
     omap_uart_reset(mpu->uart[2]);
-    omap_mmc_reset(mpu->mmc);
     omap_mpuio_reset(mpu->mpuio);
     omap_uwire_reset(mpu->microwire);
     omap_pwl_reset(mpu->pwl);