mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
hw/arm/omap1: Inline creation of MMC
Our style for other conversions of OMAP devices to qdev has been to inline the creation and wiring into omap310_mpu_init() -- see for instance the handling of omap-intc, omap-gpio and omap_i2c. Do the same for omap-mmc. 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-7-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
3102d81fc7
commit
9c2fce87fc
2 changed files with 11 additions and 26 deletions
|
@ -590,28 +590,6 @@ void omap_mmc_set_clk(DeviceState *dev, omap_clk clk)
|
|||
s->clk = clk;
|
||||
}
|
||||
|
||||
DeviceState *omap_mmc_init(hwaddr base,
|
||||
MemoryRegion *sysmem,
|
||||
qemu_irq irq, qemu_irq dma[], omap_clk clk)
|
||||
{
|
||||
DeviceState *dev;
|
||||
OMAPMMCState *s;
|
||||
|
||||
dev = qdev_new(TYPE_OMAP_MMC);
|
||||
s = OMAP_MMC(dev);
|
||||
sysbus_realize_and_unref(SYS_BUS_DEVICE(s), &error_fatal);
|
||||
|
||||
omap_mmc_set_clk(dev, clk);
|
||||
|
||||
memory_region_add_subregion(sysmem, base,
|
||||
sysbus_mmio_get_region(SYS_BUS_DEVICE(s), 0));
|
||||
qdev_connect_gpio_out_named(dev, "dma-tx", 0, dma[0]);
|
||||
qdev_connect_gpio_out_named(dev, "dma-rx", 0, dma[1]);
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
static void omap_mmc_reset_hold(Object *obj, ResetType type)
|
||||
{
|
||||
OMAPMMCState *s = OMAP_MMC(obj);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue