From e470436f19f85660b2e9a4dc25827000f0ea2078 Mon Sep 17 00:00:00 2001 From: Artyom Tarasenko Date: Sun, 13 Dec 2009 13:30:44 +0000 Subject: [PATCH] fdc/sparc32: don't hang on detection under OBP 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 Signed-off-by: Blue Swirl --- hw/fdc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/fdc.c b/hw/fdc.c index 13933372751..0579b037280 100644 --- 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; -- 2.39.5