diff mbox series

[12/12] vt82c686: Do not add floppy

Message ID 0de0e2415076e095479000882df6ff42619eafc8.1609031406.git.balaton@eik.bme.hu (mailing list archive)
State New, archived
Headers show
Series Misc vt82c686b clean ups | expand

Commit Message

BALATON Zoltan Dec. 27, 2020, 1:10 a.m. UTC
The floppy is inaccessible because its ports are shadowed by the
config registers of the superio part (switchable on the real chip but
we don't model that) so disable adding the floppy matching the
existing comment in vt82c686b_isa_realize() as it's not usable.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 hw/isa/vt82c686.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 698627d1b5..2b7a3bdba1 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -348,14 +348,19 @@  static const TypeInfo via_isa_info = {
     },
 };
 
+static bool vt82c686b_superio_floppy_is_enabled(ISASuperIODevice *sio, uint8_t index)
+{
+        return false; /* Disabled due to clash with SuperIO Config reg ports */
+}
+
 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;
+    sc->ide.count = 0; /* Emulated by via-ide */
+    sc->floppy.is_enabled = vt82c686b_superio_floppy_is_enabled;
 }
 
 static const TypeInfo via_superio_info = {