aboutsummaryrefslogtreecommitdiff
path: root/hw/isa
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2018-03-08 23:39:37 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2018-03-12 16:12:49 +0100
commit7313b1f28bec390d03ec4b84146fbea43487f2ae (patch)
tree75b0e7d22614655fc81867b390551094ce5f486c /hw/isa
parent78f16256c157394522b0abae1dda0bfcbb11c068 (diff)
downloadqemu-7313b1f28bec390d03ec4b84146fbea43487f2ae.zip
qemu-7313b1f28bec390d03ec4b84146fbea43487f2ae.tar.gz
qemu-7313b1f28bec390d03ec4b84146fbea43487f2ae.tar.bz2
hw/isa/superio: Factor out the FDC37M817 Super I/O from mips_malta.c
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180308223946.26784-17-f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/isa')
-rw-r--r--hw/isa/isa-superio.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c
index f98711b..b95608a 100644
--- a/hw/isa/isa-superio.c
+++ b/hw/isa/isa-superio.c
@@ -187,9 +187,28 @@ static const TypeInfo isa_superio_type_info = {
.class_init = isa_superio_class_init,
};
+/* SMS FDC37M817 Super I/O */
+static void fdc37m81x_class_init(ObjectClass *klass, void *data)
+{
+ ISASuperIOClass *sc = ISA_SUPERIO_CLASS(klass);
+
+ sc->serial.count = 2; /* NS16C550A */
+ sc->parallel.count = 1;
+ sc->floppy.count = 1; /* SMSC 82077AA Compatible */
+ sc->ide.count = 0;
+}
+
+static const TypeInfo fdc37m81x_type_info = {
+ .name = TYPE_FDC37M81X_SUPERIO,
+ .parent = TYPE_ISA_SUPERIO,
+ .instance_size = sizeof(ISASuperIODevice),
+ .class_init = fdc37m81x_class_init,
+};
+
static void isa_superio_register_types(void)
{
type_register_static(&isa_superio_type_info);
+ type_register_static(&fdc37m81x_type_info);
}
type_init(isa_superio_register_types)