]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
fdc/sparc32: don't hang on detection under OBP
authorArtyom Tarasenko <atar4qemu@googlemail.com>
Sun, 13 Dec 2009 13:30:44 +0000 (13:30 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 20 Dec 2009 09:35:48 +0000 (11:35 +0200)
Stepping through the SS-5's OBP initialization routines
it looks like reading fdc main status register should
clear the fd interrupt.
The patch doesn't fix problems with fdc on sparc platform,
it only fixes fdc detection.

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/fdc.c

index 139333727517bb6a265fecf0fe9c56658f7b5f2b..0579b0372809dcdd8c7ce76597cedab7cf6df78f 100644 (file)
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -935,6 +935,12 @@ static uint32_t fdctrl_read_main_status (fdctrl_t *fdctrl)
     fdctrl->dsr &= ~FD_DSR_PWRDOWN;
     fdctrl->dor |= FD_DOR_nRESET;
 
+    /* Sparc mutation */
+    if (fdctrl->sun4m) {
+        retval |= FD_MSR_DIO;
+        fdctrl_reset_irq(fdctrl);
+    };
+
     FLOPPY_DPRINTF("main status register: 0x%02x\n", retval);
 
     return retval;