diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-07-05 23:22:10 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-08-21 16:22:43 +0200 |
commit | d7ebca748e33176ede1a8675cea82271d2c0dac4 (patch) | |
tree | 726f0b14d96d139866a23a49ec0864cdc68173e0 /hw/sd | |
parent | d6f83a72a7db94a3ede9f5cc4fb39f9c8e89f954 (diff) | |
download | qemu-d7ebca748e33176ede1a8675cea82271d2c0dac4.zip qemu-d7ebca748e33176ede1a8675cea82271d2c0dac4.tar.gz qemu-d7ebca748e33176ede1a8675cea82271d2c0dac4.tar.bz2 |
hw/sd/pxa2xx_mmci: Do not create SD card within the SD host controller
SD/MMC host controllers provide a SD Bus to plug SD cards,
but don't come with SD card plugged in :)
The machine/board object is where the SD cards are created.
Since the PXA2xx is not qdevified, for now create the cards
in pxa270_init() which is the SoC model.
In the future we will move this to the board model.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200705213350.24725-2-f4bug@amsat.org>
Diffstat (limited to 'hw/sd')
-rw-r--r-- | hw/sd/pxa2xx_mmci.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c index 68bed24..9482b92 100644 --- a/hw/sd/pxa2xx_mmci.c +++ b/hw/sd/pxa2xx_mmci.c @@ -476,10 +476,9 @@ static const MemoryRegionOps pxa2xx_mmci_ops = { PXA2xxMMCIState *pxa2xx_mmci_init(MemoryRegion *sysmem, hwaddr base, - BlockBackend *blk, qemu_irq irq, - qemu_irq rx_dma, qemu_irq tx_dma) + qemu_irq irq, qemu_irq rx_dma, qemu_irq tx_dma) { - DeviceState *dev, *carddev; + DeviceState *dev; SysBusDevice *sbd; PXA2xxMMCIState *s; @@ -492,12 +491,6 @@ PXA2xxMMCIState *pxa2xx_mmci_init(MemoryRegion *sysmem, qdev_connect_gpio_out_named(dev, "tx-dma", 0, tx_dma); sysbus_realize_and_unref(sbd, &error_fatal); - /* Create and plug in the sd card */ - carddev = qdev_new(TYPE_SD_CARD); - qdev_prop_set_drive_err(carddev, "drive", blk, &error_fatal); - qdev_realize_and_unref(carddev, qdev_get_child_bus(dev, "sd-bus"), - &error_fatal); - return s; } |