aboutsummaryrefslogtreecommitdiff
path: root/hw/sd/pxa2xx_mmci.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sd/pxa2xx_mmci.c')
-rw-r--r--hw/sd/pxa2xx_mmci.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c
index 68bed24480..04f0a98f81 100644
--- a/hw/sd/pxa2xx_mmci.c
+++ b/hw/sd/pxa2xx_mmci.c
@@ -184,7 +184,7 @@ static void pxa2xx_mmci_fifo_update(PXA2xxMMCIState *s)
if (s->cmdat & CMDAT_WR_RD) {
while (s->bytesleft && s->tx_len) {
- sdbus_write_data(&s->sdbus, s->tx_fifo[s->tx_start++]);
+ sdbus_write_byte(&s->sdbus, s->tx_fifo[s->tx_start++]);
s->tx_start &= 0x1f;
s->tx_len --;
s->bytesleft --;
@@ -194,7 +194,7 @@ static void pxa2xx_mmci_fifo_update(PXA2xxMMCIState *s)
} else
while (s->bytesleft && s->rx_len < 32) {
s->rx_fifo[(s->rx_start + (s->rx_len ++)) & 0x1f] =
- sdbus_read_data(&s->sdbus);
+ sdbus_read_byte(&s->sdbus);
s->bytesleft --;
s->intreq |= INT_RXFIFO_REQ;
}
@@ -476,15 +476,12 @@ 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;
dev = qdev_new(TYPE_PXA2XX_MMCI);
- s = PXA2XX_MMCI(dev);
sbd = SYS_BUS_DEVICE(dev);
sysbus_mmio_map(sbd, 0, base);
sysbus_connect_irq(sbd, 0, irq);
@@ -492,13 +489,7 @@ 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;
+ return PXA2XX_MMCI(dev);
}
static void pxa2xx_mmci_set_inserted(DeviceState *dev, bool inserted)