[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 20/23] 40p: Add the Super I/O chip (pc87312)
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [RFC 20/23] 40p: Add the Super I/O chip (pc87312) |
Date: |
Tue, 14 Jun 2011 04:37:54 +0200 |
Signed-off-by: Hervé Poussineau <address@hidden>
Set the floppy properties with raw qdev_prop_set() for now because
qdev_prop_set_drive() also calls bdrv_attach(), which can't be called
twice for a drive. Having it attached to the isa-fdc seems nicer.
Signed-off-by: Andreas Färber <address@hidden>
prep: Manually set floppy properties
---
hw/ppc_prep.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 27e1d14..935d1e9 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -779,6 +779,8 @@ static void ibm_40p_init(ram_addr_t ram_size,
DeviceState *dev;
PCIBus *pci_bus;
PCIDevice *pci;
+ ISADevice *isa;
+ DriveInfo *drive;
// IBM E15 graphic adapter (S3 Vision864)
// PowerPC 601
@@ -831,6 +833,21 @@ static void ibm_40p_init(ram_addr_t ram_size,
cpu_exit_irq = qemu_allocate_irqs(cpu_request_exit, NULL, 1);
qdev_connect_gpio_out(&pci->qdev, 0, env->irq_inputs[PPC6xx_INPUT_INT]);
qdev_connect_gpio_out(&pci->qdev, 1, *cpu_exit_irq);
+
+ /* Super I/O (parallel + serial ports) */
+ isa = isa_create("isa-pc87312");
+ qdev_prop_set_chr(&isa->qdev, "parallel", parallel_hds[0]);
+ qdev_prop_set_chr(&isa->qdev, "uart1", serial_hds[0]);
+ qdev_prop_set_chr(&isa->qdev, "uart2", serial_hds[1]);
+ drive = drive_get(IF_FLOPPY, 0, 0);
+ if (drive) {
+ qdev_prop_set(&isa->qdev, "floppyA", drive->bdrv, PROP_TYPE_DRIVE);
+ }
+ drive = drive_get(IF_FLOPPY, 0, 1);
+ if (drive) {
+ qdev_prop_set(&isa->qdev, "floppyB", drive->bdrv, PROP_TYPE_DRIVE);
+ }
+ qdev_init_nofail(&isa->qdev);
}
static QEMUMachine prep_machine = {
--
1.7.5.3
- [Qemu-devel] [RFC v5 10/23] isa: Provide enable and disable callbacks, (continued)
- [Qemu-devel] [RFC v5 10/23] isa: Provide enable and disable callbacks, Andreas Färber, 2011/06/13
- [Qemu-devel] [RFC v5 11/23] isa: Allow to un-assign I/O ports, Andreas Färber, 2011/06/13
- [Qemu-devel] [RFC v5 12/23] isa: Allow to un-associate an IRQ, Andreas Färber, 2011/06/13
- [Qemu-devel] [RFC v5 13/23] parallel: Implement ISA state callbacks, Andreas Färber, 2011/06/13
- [Qemu-devel] [RFC v5 14/23] serial: Implement ISA state callbacks, Andreas Färber, 2011/06/13
- [Qemu-devel] [PATCH v5 15/23] fdc: Parametrize ISA base, IRQ and DMA, Andreas Färber, 2011/06/13
- [Qemu-devel] [RFC v5 16/23] fdc: Implement ISA state callbacks, Andreas Färber, 2011/06/13
- [Qemu-devel] [RFC v5 17/23] ide: Allow to discard I/O ports, Andreas Färber, 2011/06/13
- [Qemu-devel] [RFC v5 18/23] ide: Implement ISA state callbacks, Andreas Färber, 2011/06/13
- [Qemu-devel] [RFC v5 19/23] prep: Add pc87312 Super I/O emulation, Andreas Färber, 2011/06/13
- [Qemu-devel] [RFC 20/23] 40p: Add the Super I/O chip (pc87312),
Andreas Färber <=
- [Qemu-devel] [RFC 21/23] 40p: Add an audio card and a keyboard, Andreas Färber, 2011/06/13
- [Qemu-devel] [RFC 22/23] prep: qdev'ify System I/O (WIP), Andreas Färber, 2011/06/13
- [Qemu-devel] [RFC 23/23] 40p: Add an 8514/A graphics card, Andreas Färber, 2011/06/13
- Re: [Qemu-devel] [RFC 23/23] 40p: Add an 8514/A graphics card, Roy Tam, 2011/06/15
- Re: [Qemu-devel] [RFC 23/23] 40p: Add an 8514/A graphics card, Andreas Färber, 2011/06/15
- [Qemu-devel] [RFC v2 23/23] 40p: Add an IBM 8514/A graphics card, Andreas Färber, 2011/06/15
- Re: [Qemu-devel] [RFC v2 23/23] 40p: Add an IBM 8514/A graphics card, Blue Swirl, 2011/06/18
- Re: [Qemu-devel] [RFC v2 23/23] 40p: Add an IBM 8514/A graphics card, Andreas Färber, 2011/06/19
- Re: [Qemu-devel] [RFC v2 23/23] 40p: Add an IBM 8514/A graphics card, Hervé Poussineau, 2011/06/19
- Re: [Qemu-devel] [RFC v2 23/23] 40p: Add an IBM 8514/A graphics card, Blue Swirl, 2011/06/19