diff options
Diffstat (limited to 'hw/sd')
-rw-r--r-- | hw/sd/pl181.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c index 86219c851d..ab4cd733a4 100644 --- a/hw/sd/pl181.c +++ b/hw/sd/pl181.c @@ -60,7 +60,8 @@ typedef struct PL181State { uint32_t fifo[PL181_FIFO_LEN]; /* TODO use Fifo32 */ qemu_irq irq[2]; /* GPIO outputs for 'card is readonly' and 'card inserted' */ - qemu_irq cardstatus[2]; + qemu_irq card_readonly; + qemu_irq card_inserted; } PL181State; static const VMStateDescription vmstate_pl181 = { @@ -479,7 +480,7 @@ static void pl181_reset(DeviceState *d) s->mask[1] = 0; /* We can assume our GPIO outputs have been wired up now */ - sd_set_cb(s->card, s->cardstatus[0], s->cardstatus[1]); + sd_set_cb(s->card, s->card_readonly, s->card_inserted); /* Since we're still using the legacy SD API the card is not plugged * into any bus, and we must reset it manually. */ @@ -496,7 +497,8 @@ static void pl181_init(Object *obj) sysbus_init_mmio(sbd, &s->iomem); sysbus_init_irq(sbd, &s->irq[0]); sysbus_init_irq(sbd, &s->irq[1]); - qdev_init_gpio_out(dev, s->cardstatus, 2); + qdev_init_gpio_out_named(dev, &s->card_readonly, "card-read-only", 1); + qdev_init_gpio_out_named(dev, &s->card_inserted, "card-inserted", 1); } static void pl181_realize(DeviceState *dev, Error **errp) |