|
@@ -149,24 +149,11 @@ PXA2xxPCMCIAState *pxa2xx_pcmcia_init(MemoryRegion *sysmem,
|
|
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
|
|
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
|
|
s = PXA2XX_PCMCIA(dev);
|
|
s = PXA2XX_PCMCIA(dev);
|
|
|
|
|
|
- if (base == 0x30000000) {
|
|
|
|
- s->slot.slot_string = "PXA PC Card Socket 1";
|
|
|
|
- } else {
|
|
|
|
- s->slot.slot_string = "PXA PC Card Socket 0";
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
qdev_init_nofail(dev);
|
|
qdev_init_nofail(dev);
|
|
|
|
|
|
return s;
|
|
return s;
|
|
}
|
|
}
|
|
|
|
|
|
-static void pxa2xx_pcmcia_realize(DeviceState *dev, Error **errp)
|
|
|
|
-{
|
|
|
|
- PXA2xxPCMCIAState *s = PXA2XX_PCMCIA(dev);
|
|
|
|
-
|
|
|
|
- pcmcia_socket_register(&s->slot);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static void pxa2xx_pcmcia_initfn(Object *obj)
|
|
static void pxa2xx_pcmcia_initfn(Object *obj)
|
|
{
|
|
{
|
|
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
|
|
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
|
|
@@ -262,19 +249,11 @@ void pxa2xx_pcmcia_set_irq_cb(void *opaque, qemu_irq irq, qemu_irq cd_irq)
|
|
s->cd_irq = cd_irq;
|
|
s->cd_irq = cd_irq;
|
|
}
|
|
}
|
|
|
|
|
|
-static void pxa2xx_pcmcia_class_init(ObjectClass *oc, void *data)
|
|
|
|
-{
|
|
|
|
- DeviceClass *dc = DEVICE_CLASS(oc);
|
|
|
|
-
|
|
|
|
- dc->realize = pxa2xx_pcmcia_realize;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static const TypeInfo pxa2xx_pcmcia_type_info = {
|
|
static const TypeInfo pxa2xx_pcmcia_type_info = {
|
|
.name = TYPE_PXA2XX_PCMCIA,
|
|
.name = TYPE_PXA2XX_PCMCIA,
|
|
.parent = TYPE_SYS_BUS_DEVICE,
|
|
.parent = TYPE_SYS_BUS_DEVICE,
|
|
.instance_size = sizeof(PXA2xxPCMCIAState),
|
|
.instance_size = sizeof(PXA2xxPCMCIAState),
|
|
.instance_init = pxa2xx_pcmcia_initfn,
|
|
.instance_init = pxa2xx_pcmcia_initfn,
|
|
- .class_init = pxa2xx_pcmcia_class_init,
|
|
|
|
};
|
|
};
|
|
|
|
|
|
static void pxa2xx_pcmcia_register_types(void)
|
|
static void pxa2xx_pcmcia_register_types(void)
|