[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 45/69] hw/isa/vt82c686: Add the TYPE_VT82C686B_SUPERI
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 45/69] hw/isa/vt82c686: Add the TYPE_VT82C686B_SUPERIO |
Date: |
Tue, 13 Mar 2018 23:46:55 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/isa/vt82c686.c | 20 ++++++++++++++++++++
hw/mips/mips_fulong2e.c | 15 +++------------
include/hw/isa/vt82c686.h | 2 ++
3 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 7eaf3c7e8f..cff1946232 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -17,6 +17,7 @@
#include "hw/i2c/smbus.h"
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
+#include "hw/isa/superio.h"
#include "hw/sysbus.h"
#include "hw/mips/mips.h"
#include "hw/isa/apm.h"
@@ -519,11 +520,30 @@ static const TypeInfo via_info = {
},
};
+static void vt82c686b_superio_class_init(ObjectClass *klass, void *data)
+{
+ ISASuperIOClass *sc = ISA_SUPERIO_CLASS(klass);
+
+ sc->serial.count = 2;
+ sc->parallel.count = 1;
+ sc->ide.count = 0;
+ sc->floppy.count = 1;
+}
+
+static const TypeInfo via_superio_info = {
+ .name = TYPE_VT82C686B_SUPERIO,
+ .parent = TYPE_ISA_SUPERIO,
+ .instance_size = sizeof(ISASuperIODevice),
+ .class_size = sizeof(ISASuperIOClass),
+ .class_init = vt82c686b_superio_class_init,
+};
+
static void vt82c686b_register_types(void)
{
type_register_static(&via_ac97_info);
type_register_static(&via_mc97_info);
type_register_static(&via_pm_info);
+ type_register_static(&via_superio_info);
type_register_static(&via_info);
}
diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index b14dab8781..02fb2fdcc4 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -23,9 +23,7 @@
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/dma/i8257.h"
-#include "hw/char/serial.h"
-#include "hw/char/parallel.h"
-#include "hw/block/fdc.h"
+#include "hw/isa/superio.h"
#include "net/net.h"
#include "hw/boards.h"
#include "hw/i2c/smbus.h"
@@ -33,7 +31,6 @@
#include "hw/mips/mips.h"
#include "hw/mips/cpudevs.h"
#include "hw/pci/pci.h"
-#include "sysemu/sysemu.h"
#include "audio/audio.h"
#include "qemu/log.h"
#include "hw/loader.h"
@@ -43,8 +40,6 @@
#include "hw/isa/vt82c686.h"
#include "hw/timer/mc146818rtc.h"
#include "hw/timer/i8254.h"
-#include "hw/input/i8042.h"
-#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#include "sysemu/qtest.h"
#include "qemu/error-report.h"
@@ -249,6 +244,8 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus, int
slot, qemu_irq intc,
/* init other devices */
i8254_pit_init(isa_bus, 0x40, 0, NULL);
i8257_dma_init(isa_bus, 0);
+ /* Super I/O */
+ isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO);
ide_drive_get(hd, ARRAY_SIZE(hd));
vt82c686b_ide_init(pci_bus, hd, PCI_DEVFN(slot, 1));
@@ -261,12 +258,6 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus,
int slot, qemu_irq intc,
/* Audio support */
vt82c686b_ac97_init(pci_bus, PCI_DEVFN(slot, 5));
vt82c686b_mc97_init(pci_bus, PCI_DEVFN(slot, 6));
-
- /* Super I/O */
- isa_create_simple(isa_bus, TYPE_I8042);
-
- serial_hds_isa_init(isa_bus, 0, MAX_SERIAL_PORTS);
- parallel_hds_isa_init(isa_bus, 1);
}
/* Network support */
diff --git a/include/hw/isa/vt82c686.h b/include/hw/isa/vt82c686.h
index db97c8ed7a..c3c2b6e786 100644
--- a/include/hw/isa/vt82c686.h
+++ b/include/hw/isa/vt82c686.h
@@ -1,6 +1,8 @@
#ifndef HW_VT82C686_H
#define HW_VT82C686_H
+#define TYPE_VT82C686B_SUPERIO "vt82c686b-superio"
+
/* vt82c686.c */
ISABus *vt82c686b_isa_init(PCIBus * bus, int devfn);
void vt82c686b_ac97_init(PCIBus *bus, int devfn);
--
2.14.3
- [Qemu-devel] [PULL 39/69] hw/isa/superio: Add a keyboard/mouse controller (8042), (continued)
- [Qemu-devel] [PULL 39/69] hw/isa/superio: Add a keyboard/mouse controller (8042), Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 41/69] hw/mips/malta: Code movement, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 38/69] hw/isa/superio: Factor out the floppy disc controller code from pc87312.c, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 40/69] hw/isa/superio: Factor out the IDE code from pc87312.c, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 35/69] hw/isa/pc87312: Inherit from the abstract TYPE_ISA_SUPERIO, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 42/69] hw/isa/superio: Factor out the FDC37M817 Super I/O from mips_malta.c, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 46/69] MAINTAINERS: Add entries for the VT82C686B Super I/O, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 47/69] MAINTAINERS: Split the Alpha TCG/machine section, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 49/69] hw/alpha/dp264: Add the ISA DMA controller, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 48/69] hw/isa/superio: Add the SMC FDC37C669 Super I/O, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 45/69] hw/isa/vt82c686: Add the TYPE_VT82C686B_SUPERIO,
Paolo Bonzini <=
- [Qemu-devel] [PULL 44/69] hw/isa/vt82c686: Rename vt82c686b_init() -> vt82c686b_isa_init(), Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 43/69] hw/mips/mips_fulong2e: Factor out vt82c686b_southbridge_init(), Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 51/69] hw/i386/pc: Factor out the superio code, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 50/69] hw/alpha/dp264: Use the TYPE_SMC37C669_SUPERIO, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 52/69] cpu-exec: fix exception_index handling, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 53/69] replay: fix processing async events, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 54/69] replay: fixed replay_enable_events, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 56/69] replay: added replay log format description, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 55/69] replay: fix save/load vm for non-empty queue, Paolo Bonzini, 2018/03/13
- [Qemu-devel] [PULL 57/69] replay: save prior value of the host clock, Paolo Bonzini, 2018/03/13