QOM PCMCIA, MicroDrive and IDE cleanups
cover QOM PCMCIA, MicroDrive and IDE cleanups
Hello,
Based on an initial draft from Othmar Pasteka, this series QOM'ifies MicroDrive. As a prerequisite, PCMCIA must be QOM'ified as pointed out by Peter. We can then finally drop ide_init2_with_non_qdev_drives(), as desired by Markus for his IDE refactorings. As a final touch, pxa2xx_pcmcia is made a SysBusDevice.
A for-1.6 patch to fix an assertion while inspecting the QOM composition tree was sent out separately.
QOM'ifying the PXA2xx SoCs to replace pxa2xx_pcmcia_init() and other helpers is left as follow-up.
We probably also want to move "info pcmcia" HMP out of vl.c but I'm not sure in which form we want to keep PCMCIASocket? A SysBusDevice subtype would seem easiest for our current use case, but there are also PCI-CardBus bridges IIRC. PCMCIASocket::card_string should probably be a property of PCMCIACardState, accessed through a link<pcmcia-card> property.
Markus, unfortunately git am --3way didn't work for your old IDE patches. Please rebase them on this series yourself, thanks.
Regards,
Andreas
Quoted 1 line
From Othmar's draft patch:
* Dropped unused MicroDriveClass.
* Kept IRQ allocation where it was - it's ugly either way.
* Rebased onto ide_bus_new() change: 1 slot, so 1 IDE device.
* Updated dscm1xxxx_init() to use the new QOM type.
* Distinguished between microdrive and dscm1xxxx types.
* QOM'ified PCMCIA and made MicroDrive a PCMCIA Card rather than SysBusDevice.
* Fixed typo in PXA2xx API.
* QOM'ified PXA2xx PCMCIA controller.
Quoted 1 line
From Markus' IDE series:
* Instead of breaking ide_init2_with_non_qdev_drives(), dropped it after converting last remaining pre-qdev IDE device.
Andreas Färber (5):
pxa: Fix typo "dettach"
pcmcia: QOM'ify PCMCIACardState and MicroDriveState
microdrive: Coding Style cleanups
ide: Drop ide_init2_with_non_qdev_drives() pcmcia/pxa2xx: QOM'ify PXA2xxPCMCIAState
hw/Makefile.objs | 1 +
hw/ide/core.c | 49 ------
hw/ide/internal.h | 2 -
hw/ide/microdrive.c | 226 +++++++++++++++++++--------
hw/misc/Makefile.objs | 1 -
hw/pcmcia/Makefile.objs | 2 +
hw/pcmcia/pcmcia.c | 24 +++
hw/{misc/pxa2xx_pcmcia.c => pcmcia/pxa2xx.c} | 130 +++++++++++----
include/hw/arm/pxa.h | 2 +-
include/hw/pcmcia.h | 46 ++++--
10 files changed, 322 insertions(+), 161 deletions(-)
create mode 100644 hw/pcmcia/Makefile.objs
create mode 100644 hw/pcmcia/pcmcia.c
rename hw/{misc/pxa2xx_pcmcia.c => pcmcia/pxa2xx.c} (61%)Signature · 1 line
1.8.1.4
PATCH 1/5 pxa: Fix typo "dettach"
--- hw/misc/pxa2xx_pcmcia.c | 2 +- include/hw/arm/pxa.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
hw/misc/pxa2xx_pcmcia.c +1 -1
@@ -178,7 +178,7 @@ int pxa2xx_pcmcia_attach(void *opaque, PCMCIACardState *card) }/* Eject card from the slot */ -int pxa2xx_pcmcia_dettach (void *opaque) +int pxa2xx_pcmcia_detach (void *opaque) {PXA2xxPCMCIAState *s = (PXA2xxPCMCIAState *) opaque;if (!s->slot.attached)
include/hw/arm/pxa.h +1 -1
@@ -97,7 +97,7 @@ typedef struct PXA2xxPCMCIAState PXA2xxPCMCIAState;PXA2xxPCMCIAState *pxa2xx_pcmcia_init (MemoryRegion *sysmem,hwaddr base);int pxa2xx_pcmcia_attach (void *opaque,PCMCIACardState *card); -int pxa2xx_pcmcia_dettach (void *opaque); +int pxa2xx_pcmcia_detach (void *opaque);void pxa2xx_pcmcia_set_irq_cb (void *opaque,qemu_irq irq,qemu_irq cd_irq);/* pxa2xx_keypad.c */
Signature · 1 line
1.8.1.4
PATCH 2/5 pcmcia: QOM'ify PCMCIACardState and MicroDriveState
In reply to Andreas FärberTurn PCMCIACardState into a device.
Move callbacks to new PCMCIACardClass.
Derive TYPE_MICRODRIVE from TYPE_PCMCIA_CARD.
Replace ide_init2_with_non_qdev_drives().
---
hw/Makefile.objs | 1 +
hw/ide/microdrive.c | 170 +++++++++++++++++++--------
hw/misc/Makefile.objs | 1 -
hw/pcmcia/Makefile.objs | 2 +
hw/pcmcia/pcmcia.c | 24 ++++
hw/{misc/pxa2xx_pcmcia.c => pcmcia/pxa2xx.c} | 50 +++++---
include/hw/pcmcia.h | 46 ++++++--
7 files changed, 219 insertions(+), 75 deletions(-)
create mode 100644 hw/pcmcia/Makefile.objs
create mode 100644 hw/pcmcia/pcmcia.c
rename hw/{misc/pxa2xx_pcmcia.c => pcmcia/pxa2xx.c} (81%)hw/Makefile.objs +1 -0
@@ -18,6 +18,7 @@ devices-dirs-$(CONFIG_SOFTMMU) += net/ devices-dirs-$(CONFIG_SOFTMMU) += nvram/ devices-dirs-$(CONFIG_SOFTMMU) += pci/ devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/ +devices-dirs-$(CONFIG_SOFTMMU) += pcmcia/ devices-dirs-$(CONFIG_SOFTMMU) += scsi/ devices-dirs-$(CONFIG_SOFTMMU) += sd/ devices-dirs-$(CONFIG_SOFTMMU) += ssi/
hw/ide/microdrive.c +123 -47
261 lines not on this page · raw message
hw/misc/Makefile.objs +0 -1
@@ -36,7 +36,6 @@ obj-$(CONFIG_OMAP) += omap_gpmc.o obj-$(CONFIG_OMAP) += omap_l4.o obj-$(CONFIG_OMAP) += omap_sdrc.o obj-$(CONFIG_OMAP) += omap_tap.o -obj-$(CONFIG_PXA2XX) += pxa2xx_pcmcia.o obj-$(CONFIG_SLAVIO) += slavio_misc.o obj-$(CONFIG_ZYNQ) += zynq_slcr.o
hw/pcmcia/Makefile.objs new file +2 -0
@@ -0,0 +1,2 @@ +common-obj-y += pcmcia.o +obj-$(CONFIG_PXA2XX) += pxa2xx.o
hw/pcmcia/pcmcia.c new file +24 -0
@@ -0,0 +1,24 @@ +/* +* PCMCIA emulation +* +* Copyright 2013 SUSE LINUX Products GmbH +*/ + +#include "qemu-common.h" +#include "hw/hw.h" +#include "hw/pcmcia.h" + +static const TypeInfo pcmcia_card_type_info = { + .name =TYPE_PCMCIA_CARD , + .parent =TYPE_DEVICE , + .instance_size =sizeof (PCMCIACardState), + .abstract = true, + .class_size =sizeof (PCMCIACardClass), +}; + +static void pcmcia_register_types (void ) +{ +type_register_static (&pcmcia_card_type_info); +} + +type_init (pcmcia_register_types)
hw/pcmcia/pxa2xx.c renamed from hw/misc/pxa2xx_pcmcia.c +36 -14
127 lines not on this page · raw message
include/hw/pcmcia.h +33 -13
66 lines not on this page · raw message
Signature · 1 line
1.8.1.4
PATCH 3/5 microdrive: Coding Style cleanups
In reply to Andreas FärberAdd missing braces.
--- hw/ide/microdrive.c | 62 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 24 deletions(-)
hw/ide/microdrive.c +38 -24
@@ -103,10 +103,12 @@ static inline void md_interrupt_update(MicroDriveState *s)static void md_set_irq (void *opaque,int irq,int level) {MicroDriveState *s = opaque; -if (level) + +if (level) { s->stat |=STAT_INT ; -else + }else { s->stat &= ~STAT_INT ; + }md_interrupt_update (s); }
@@ -142,10 +144,11 @@ static uint8_t md_attr_read(PCMCIACardState *card, uint32_t at)case 0x00 :/* Configuration Option Register */ return s->opt;case 0x02 :/* Card Configuration Status Register */ -if (s->ctrl &CTRL_IEN ) +if (s->ctrl &CTRL_IEN ) {return s->stat & ~STAT_INT ; -else + }else {return s->stat; + }case 0x04 :/* Pin Replacement Register */ return (s->pins &PINS_CRDY ) |0x0c ;case 0x06 :/* Socket and Copy Register */
@@ -174,8 +177,9 @@ static void md_attr_write(PCMCIACardState *card, uint32_t at, uint8_t value)md_interrupt_update (s);break ;case 0x02 :/* Card Configuration Status Register */ -if ((s->stat ^ value) &STAT_PWRDWN ) +if ((s->stat ^ value) &STAT_PWRDWN ) { s->pins |=PINS_CRDY ; + } s->stat &=0x82 ; s->stat |= value &0x74 ;md_interrupt_update (s);
@@ -201,23 +205,26 @@ static uint16_t md_common_read(PCMCIACardState *card, uint32_t at)switch (s->opt &OPT_MODE ) {case OPT_MODE_MMAP : -if ((at & ~0x3ff ) ==0x400 ) +if ((at & ~0x3ff ) ==0x400 ) { at =0 ; + }break ;case OPT_MODE_IOMAP16 : at &=0xf ;break ;case OPT_MODE_IOMAP1 : -if ((at & ~0xf ) ==0x3f0 ) +if ((at & ~0xf ) ==0x3f0 ) { at -=0x3e8 ; -else if ((at & ~0xf ) ==0x1f0 ) + }else if ((at & ~0xf ) ==0x1f0 ) { at -=0x1f0 ; + }break ;case OPT_MODE_IOMAP2 : -if ((at & ~0xf ) ==0x370 ) +if ((at & ~0xf ) ==0x370 ) { at -=0x368 ; -else if ((at & ~0xf ) ==0x170 ) + }else if ((at & ~0xf ) ==0x170 ) { at -=0x170 ; + } }switch (at) {
@@ -226,9 +233,9 @@ static uint16_t md_common_read(PCMCIACardState *card, uint32_t at)return ide_data_readw (&s->bus,0 );/* TODO: 8-bit accesses */ -if (s->cycle) +if (s->cycle) { ret = s->io >>8 ; -else { + }else { s->io =ide_data_readw (&s->bus,0 ); ret = s->io &0xff ; }
@@ -240,10 +247,11 @@ static uint16_t md_common_read(PCMCIACardState *card, uint32_t at)return ide_ioport_read (&s->bus,0x1 );case 0xe :/* Alternate Status */ ifs =idebus_active_if (&s->bus); -if (ifs->bs) +if (ifs->bs) {return ifs->status; -else + }else {return 0 ; + }case 0xf :/* Device Address */ ifs =idebus_active_if (&s->bus);return 0xc2 | ((~ifs->select <<2 ) &0x3c );
@@ -261,23 +269,26 @@ static void md_common_write(PCMCIACardState *card, uint32_t at, uint16_t value)switch (s->opt &OPT_MODE ) {case OPT_MODE_MMAP : -if ((at & ~0x3ff ) ==0x400 ) +if ((at & ~0x3ff ) ==0x400 ) { at =0 ; + }break ;case OPT_MODE_IOMAP16 : at &=0xf ;break ;case OPT_MODE_IOMAP1 : -if ((at & ~0xf ) ==0x3f0 ) +if ((at & ~0xf ) ==0x3f0 ) { at -=0x3e8 ; -else if ((at & ~0xf ) ==0x1f0 ) + }else if ((at & ~0xf ) ==0x1f0 ) { at -=0x1f0 ; + }break ;case OPT_MODE_IOMAP2 : -if ((at & ~0xf ) ==0x370 ) +if ((at & ~0xf ) ==0x370 ) { at -=0x368 ; -else if ((at & ~0xf ) ==0x170 ) + }else if ((at & ~0xf ) ==0x170 ) { at -=0x170 ; + } }switch (at) {
@@ -287,10 +298,11 @@ static void md_common_write(PCMCIACardState *card, uint32_t at, uint16_t value)break ;/* TODO: 8-bit accesses */ -if (s->cycle) +if (s->cycle) {ide_data_writew (&s->bus,0 , s->io | (value <<8 )); -else + }else { s->io = value &0xff ; + } s->cycle = !s->cycle;break ;case 0x9 :
@@ -546,8 +558,10 @@ static int dscm1xxxx_detach(PCMCIACardState *card)PCMCIACardState *dscm1xxxx_init (DriveInfo *dinfo) { -MicroDriveState *md =MICRODRIVE (object_new (TYPE_DSCM1XXXX )); -PCMCIACardState *card =PCMCIA_CARD (md); +MicroDriveState *md; + + md =MICRODRIVE (object_new (TYPE_DSCM1XXXX )); +qdev_init_nofail (DEVICE (md));if (dinfo !=NULL ) {ide_create_drive (&md->bus,0 , dinfo);
@@ -556,7 +570,7 @@ PCMCIACardState *dscm1xxxx_init(DriveInfo *dinfo) md->bus.ifs[0 ].mdata_size =METADATA_SIZE ; md->bus.ifs[0 ].mdata_storage = (uint8_t *)g_malloc0 (METADATA_SIZE ); -return card; +return PCMCIA_CARD (md); }static void dscm1xxxx_class_init (ObjectClass *oc,void *data)
Signature · 1 line
1.8.1.4
PATCH 4/5 ide: Drop ide_init2_with_non_qdev_drives()
In reply to Andreas FärberAll its users have finally been converted.
--- hw/ide/core.c | 49 ------------------------------------------------- hw/ide/internal.h | 2 -- 2 files changed, 51 deletions(-)
hw/ide/core.c +0 -49
@@ -2215,55 +2215,6 @@ void ide_init2(IDEBus *bus, qemu_irq irq) bus->dma = &ide_dma_nop; } -/* TODO convert users to qdev and remove */ -void ide_init2_with_non_qdev_drives (IDEBus *bus,DriveInfo *hd0, -DriveInfo *hd1,qemu_irq irq) -{ -int i, trans; -DriveInfo *dinfo; -uint32_t cyls, heads, secs; - -for (i =0 ; i <2 ; i++) { - dinfo = i ==0 ? hd0 : hd1; -ide_init1 (bus, i); -if (dinfo) { - cyls = dinfo->cyls; - heads = dinfo->heads; - secs = dinfo->secs; - trans = dinfo->trans; -if (!cyls && !heads && !secs) { -hd_geometry_guess (dinfo->bdrv, &cyls, &heads, &secs, &trans); - }else if (trans ==BIOS_ATA_TRANSLATION_AUTO ) { - trans =hd_bios_chs_auto_trans (cyls, heads, secs); - } -if (cyls <1 || cyls >65535 ) { -error_report ("cyls must be between 1 and 65535" ); -exit (1 ); - } -if (heads <1 || heads >16 ) { -error_report ("heads must be between 1 and 16" ); -exit (1 ); - } -if (secs <1 || secs >255 ) { -error_report ("secs must be between 1 and 255" ); -exit (1 ); - } -if (ide_init_drive (&bus->ifs[i], dinfo->bdrv, - dinfo->media_cd ?IDE_CD :IDE_HD , -NULL , dinfo->serial,NULL ,0 , - cyls, heads, secs, trans) <0 ) { -error_report ("Can't set up IDE drive %s" , dinfo->id); -exit (1 ); - } -bdrv_attach_dev_nofail (dinfo->bdrv, &bus->ifs[i]); - }else { -ide_reset (&bus->ifs[i]); - } - } - bus->irq = irq; - bus->dma = &ide_dma_nop; -} -static const MemoryRegionPortio ide_portio_list[] = { {0 ,8 ,1 , .read = ide_ioport_read, .write = ide_ioport_write }, {0 ,2 ,2 , .read = ide_data_readw, .write = ide_data_writew },
hw/ide/internal.h +0 -2
@@ -553,8 +553,6 @@ int ide_init_drive(IDEState *s, BlockDriverState *bs, IDEDriveKind kind, uint32_t cylinders, uint32_t heads, uint32_t secs, int chs_trans);void ide_init2 (IDEBus *bus,qemu_irq irq); -void ide_init2_with_non_qdev_drives (IDEBus *bus,DriveInfo *hd0, -DriveInfo *hd1,qemu_irq irq);void ide_init_ioport (IDEBus *bus,ISADevice *isa,int iobase,int iobase2);void ide_exec_cmd (IDEBus *bus,uint32_t val);
Signature · 1 line
1.8.1.4
PATCH 5/5 pcmcia/pxa2xx: QOM'ify PXA2xxPCMCIAState
In reply to Andreas FärberTurn it into a SysBusDevice and use a container MemoryRegion.
Add a link<pcmcia-card> property to the PCMCIACardState.
--- hw/pcmcia/pxa2xx.c | 78 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 66 insertions(+), 12 deletions(-)
hw/pcmcia/pxa2xx.c +66 -12
@@ -11,19 +11,27 @@*/ #include "hw/hw.h" +#include "hw/sysbus.h" #include "hw/pcmcia.h" #include "hw/arm/pxa.h" +#define TYPE_PXA2XX_PCMCIA "pxa2xx-pcmcia" +#define PXA2XX_PCMCIA (obj) \ + OBJECT_CHECK(PXA2xxPCMCIAState, obj, TYPE_PXA2XX_PCMCIA)struct PXA2xxPCMCIAState { +SysBusDevice parent_obj; +PCMCIASocket slot; -PCMCIACardState *card; +MemoryRegion container_mem;MemoryRegion common_iomem;MemoryRegion attr_iomem;MemoryRegion iomem;qemu_irq irq;qemu_irq cd_irq; + +PCMCIACardState *card; }; static uint64_t pxa2xx_pcmcia_common_read(void *opaque,
@@ -134,15 +142,43 @@ static void pxa2xx_pcmcia_set_irq(void *opaque, int line, int level)PXA2xxPCMCIAState *pxa2xx_pcmcia_init (MemoryRegion *sysmem,hwaddr base) { +DeviceState *dev;PXA2xxPCMCIAState *s; - s = (PXA2xxPCMCIAState *) -g_malloc0 (sizeof (PXA2xxPCMCIAState)); + dev =qdev_create (NULL ,TYPE_PXA2XX_PCMCIA ); +sysbus_mmio_map (SYS_BUS_DEVICE (dev),0 , base); + 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); + +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) +{ +SysBusDevice *sbd =SYS_BUS_DEVICE (obj); +PXA2xxPCMCIAState *s =PXA2XX_PCMCIA (obj); + +memory_region_init (&s->container_mem, obj,"container" ,0x10000000 ); +sysbus_init_mmio (sbd, &s->container_mem);/* Socket I/O Memory Space */ memory_region_init_io (&s->iomem,NULL , &pxa2xx_pcmcia_io_ops, s,"pxa2xx-pcmcia-io" ,0x04000000 ); -memory_region_add_subregion (sysmem, base |0x00000000 , +memory_region_add_subregion (&s->container_mem,0x00000000 , &s->iomem);/* Then next 64 MB is reserved */
@@ -150,23 +186,19 @@ PXA2xxPCMCIAState *pxa2xx_pcmcia_init(MemoryRegion *sysmem,/* Socket Attribute Memory Space */ memory_region_init_io (&s->attr_iomem,NULL , &pxa2xx_pcmcia_attr_ops, s,"pxa2xx-pcmcia-attribute" ,0x04000000 ); -memory_region_add_subregion (sysmem, base |0x08000000 , +memory_region_add_subregion (&s->container_mem,0x08000000 , &s->attr_iomem);/* Socket Common Memory Space */ memory_region_init_io (&s->common_iomem,NULL , &pxa2xx_pcmcia_common_ops, s,"pxa2xx-pcmcia-common" ,0x04000000 ); -memory_region_add_subregion (sysmem, base |0x0c000000 , +memory_region_add_subregion (&s->container_mem,0x0c000000 , &s->common_iomem); -if (base ==0x30000000 ) - s->slot.slot_string ="PXA PC Card Socket 1" ; -else - s->slot.slot_string ="PXA PC Card Socket 0" ; s->slot.irq =qemu_allocate_irqs (pxa2xx_pcmcia_set_irq, s,1 )[0 ]; -pcmcia_socket_register (&s->slot); -return s; +object_property_add_link (obj,"card" ,TYPE_PCMCIA_CARD , + (Object **)&s->card,NULL ); }/* Insert a new card into a slot */
@@ -227,3 +259,25 @@ void pxa2xx_pcmcia_set_irq_cb(void *opaque, qemu_irq irq, qemu_irq cd_irq) s->irq = 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 = { + .name =TYPE_PXA2XX_PCMCIA , + .parent =TYPE_SYS_BUS_DEVICE , + .instance_size =sizeof (PXA2xxPCMCIAState), + .instance_init = pxa2xx_pcmcia_initfn, + .class_init = pxa2xx_pcmcia_class_init, +}; + +static void pxa2xx_pcmcia_register_types (void ) +{ +type_register_static (&pxa2xx_pcmcia_type_info); +} + +type_init (pxa2xx_pcmcia_register_types)
Signature · 1 line
1.8.1.4
Quoted 6 lines · Andreas Färber
Hello,
Based on an initial draft from Othmar Pasteka, this series QOM'ifies MicroDrive. As a prerequisite, PCMCIA must be QOM'ified as pointed out by Peter. We can then finally drop
ide_init2_with_non_qdev_drives(), as desired by Markus for his IDE refactorings. As a final touch,pxa2xx_pcmciais made a SysBusDevice.
Full IDE qdevification achieved in just under four years (assuming we get this committed before September 15). I'm tickled pink.
Thanks a lot for making this happen! To Othmar, too, of course.
Quoted 6 lines
A for-1.6 patch to fix an assertion while inspecting the QOM composition tree was sent out separately.
QOM'ifying the PXA2xx SoCs to replace
pxa2xx_pcmcia_init()and other helpers is left as follow-up.
Quoted 8 lines
We probably also want to move "info pcmcia" HMP out of
vl.cbut I'm not sure in which form we want to keep PCMCIASocket? A SysBusDevice subtype would seem easiest for our current use case, but there are also PCI-CardBus bridges IIRC.PCMCIASocket::card_stringshould probably be a property of PCMCIACardState, accessed through a link<pcmcia-card> property.Markus, unfortunately git am --3way didn't work for your old IDE patches. Please rebase them on this series yourself, thanks.
Sure!
Has this one fallen through the cracks?
Quoted 66 lines · Andreas Färber
Hello,
Based on an initial draft from Othmar Pasteka, this series QOM'ifies MicroDrive. As a prerequisite, PCMCIA must be QOM'ified as pointed out by Peter. We can then finally drop
ide_init2_with_non_qdev_drives(), as desired by Markus for his IDE refactorings. As a final touch,pxa2xx_pcmciais made a SysBusDevice.A for-1.6 patch to fix an assertion while inspecting the QOM composition tree was sent out separately.
QOM'ifying the PXA2xx SoCs to replace
pxa2xx_pcmcia_init()and other helpers is left as follow-up.We probably also want to move "info pcmcia" HMP out of
vl.cbut I'm not sure in which form we want to keep PCMCIASocket? A SysBusDevice subtype would seem easiest for our current use case, but there are also PCI-CardBus bridges IIRC.PCMCIASocket::card_stringshould probably be a property of PCMCIACardState, accessed through a link<pcmcia-card> property.Markus, unfortunately git am --3way didn't work for your old IDE patches. Please rebase them on this series yourself, thanks.
Regards,
AndreasQuoted 1 line
From Othmar's draft patch:
* Dropped unused MicroDriveClass.
* Kept IRQ allocation where it was - it's ugly either way.
* Rebased ontoide_bus_new()change: 1 slot, so 1 IDE device.
* Updateddscm1xxxx_init()to use the new QOM type.
* Distinguished between microdrive and dscm1xxxx types.
* QOM'ified PCMCIA and made MicroDrive a PCMCIA Card rather than SysBusDevice.
* Fixed typo in PXA2xx API.
* QOM'ified PXA2xx PCMCIA controller.Quoted 1 line
From Markus' IDE series:
* Instead of breaking
ide_init2_with_non_qdev_drives(), dropped it after converting last remaining pre-qdev IDE device.Cc Markus Armbruster <[email protected]>Cc Kevin Wolf <[email protected]>Cc Othmar Pesteka <[email protected]>Cc Peter Maydell <[email protected]>Cc Anthony Liguori <[email protected]>Andreas Färber (5):
pxa: Fix typo "dettach"
pcmcia: QOM'ify PCMCIACardState and MicroDriveState
microdrive: Coding Style cleanups
ide: Dropide_init2_with_non_qdev_drives()pcmcia/pxa2xx: QOM'ify PXA2xxPCMCIAStatehw/Makefile.objs | 1 + hw/ide/core.c | 49 ------ hw/ide/internal.h | 2 - hw/ide/microdrive.c | 226 +++++++++++++++++++-------- hw/misc/Makefile.objs | 1 - hw/pcmcia/Makefile.objs | 2 + hw/pcmcia/pcmcia.c | 24 +++ hw/{misc/pxa2xx_pcmcia.c => pcmcia/pxa2xx.c} | 130 +++++++++++---- include/hw/arm/pxa.h | 2 +- include/hw/pcmcia.h | 46 ++++-- 10 files changed, 322 insertions(+), 161 deletions(-) create mode 100644 hw/pcmcia/Makefile.objs create mode 100644 hw/pcmcia/pcmcia.c rename hw/{misc/pxa2xx_pcmcia.c => pcmcia/pxa2xx.c} (61%)
Am 01.10.2013 11:15, schrieb Markus Armbruster:
Quoted 1 line
Has this one fallen through the cracks?
Nobody, including yourself, has felt responsable for reviewing this, and I wanted to get some form of test coverage in place before sending any pull, which I have just applied yesterday. :-)
It has been rebased without problems all the time.
Andreas
Quoted 68 lines
Quoted 66 lines · Andreas Färber
Hello,
Based on an initial draft from Othmar Pasteka, this series QOM'ifies MicroDrive. As a prerequisite, PCMCIA must be QOM'ified as pointed out by Peter. We can then finally drop
ide_init2_with_non_qdev_drives(), as desired by Markus for his IDE refactorings. As a final touch,pxa2xx_pcmciais made a SysBusDevice.A for-1.6 patch to fix an assertion while inspecting the QOM composition tree was sent out separately.
QOM'ifying the PXA2xx SoCs to replace
pxa2xx_pcmcia_init()and other helpers is left as follow-up.We probably also want to move "info pcmcia" HMP out of
vl.cbut I'm not sure in which form we want to keep PCMCIASocket? A SysBusDevice subtype would seem easiest for our current use case, but there are also PCI-CardBus bridges IIRC.PCMCIASocket::card_stringshould probably be a property of PCMCIACardState, accessed through a link<pcmcia-card> property.Markus, unfortunately git am --3way didn't work for your old IDE patches. Please rebase them on this series yourself, thanks.
Regards,
AndreasQuoted 1 line
From Othmar's draft patch:
* Dropped unused MicroDriveClass.
* Kept IRQ allocation where it was - it's ugly either way.
* Rebased ontoide_bus_new()change: 1 slot, so 1 IDE device.
* Updateddscm1xxxx_init()to use the new QOM type.
* Distinguished between microdrive and dscm1xxxx types.
* QOM'ified PCMCIA and made MicroDrive a PCMCIA Card rather than SysBusDevice.
* Fixed typo in PXA2xx API.
* QOM'ified PXA2xx PCMCIA controller.Quoted 1 line
From Markus' IDE series:
* Instead of breaking
ide_init2_with_non_qdev_drives(), dropped it after converting last remaining pre-qdev IDE device.Cc Markus Armbruster <[email protected]>Cc Kevin Wolf <[email protected]>Cc Othmar Pesteka <[email protected]>Cc Peter Maydell <[email protected]>Cc Anthony Liguori <[email protected]>Andreas Färber (5):
pxa: Fix typo "dettach"
pcmcia: QOM'ify PCMCIACardState and MicroDriveState
microdrive: Coding Style cleanups
ide: Dropide_init2_with_non_qdev_drives()pcmcia/pxa2xx: QOM'ify PXA2xxPCMCIAStatehw/Makefile.objs | 1 + hw/ide/core.c | 49 ------ hw/ide/internal.h | 2 - hw/ide/microdrive.c | 226 +++++++++++++++++++-------- hw/misc/Makefile.objs | 1 - hw/pcmcia/Makefile.objs | 2 + hw/pcmcia/pcmcia.c | 24 +++ hw/{misc/pxa2xx_pcmcia.c => pcmcia/pxa2xx.c} | 130 +++++++++++---- include/hw/arm/pxa.h | 2 +- include/hw/pcmcia.h | 46 ++++-- 10 files changed, 322 insertions(+), 161 deletions(-) create mode 100644 hw/pcmcia/Makefile.objs create mode 100644 hw/pcmcia/pcmcia.c rename hw/{misc/pxa2xx_pcmcia.c => pcmcia/pxa2xx.c} (61%)
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 4 lines · Andreas Färber
Am 01.10.2013 11:15, schrieb Markus Armbruster:
Quoted 1 line
Has this one fallen through the cracks?
Nobody, including yourself, has felt responsable for reviewing this, and
QOMification isn't exactly my home turf...
Quoted 3 lines
I wanted to get some form of test coverage in place before sending any pull, which I have just applied yesterday. :-)
It has been rebased without problems all the time.
Excellent, thanks!