From 7313b1f28bec390d03ec4b84146fbea43487f2ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 8 Mar 2018 23:39:37 +0100 Subject: hw/isa/superio: Factor out the FDC37M817 Super I/O from mips_malta.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180308223946.26784-17-f4bug@amsat.org> Signed-off-by: Paolo Bonzini --- hw/isa/isa-superio.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'hw/isa') 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) -- cgit v1.1