Signed-off-by: Nikolay Nikolov <[email protected]>
---
src/hw/floppy.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/hw/floppy.c b/src/hw/floppy.c
index 9e6647d..1120d63 100644
--- a/src/hw/floppy.c
+++ b/src/hw/floppy.c
@@ -220,11 +220,18 @@ floppy_disable_controller(void)
floppy_dor_mask(FLOPPY_DOR_IRQ | FLOPPY_DOR_RESET, 0);
}
-static int
-floppy_wait_irq(void)
+static inline void
+floppy_clear_irq_flag(void)
{
u8 frs = GET_BDA(floppy_recalibration_status);
SET_BDA(floppy_recalibration_status, frs & ~FRS_IRQ);
+}
+
+static int
+floppy_wait_irq(void)
+{
+ floppy_clear_irq_flag();
+ u8 frs;
u32 end = timer_calc(FLOPPY_IRQ_TIMEOUT);
for (;;) {
if (timer_check(end)) {
--
2.14.3
_______________________________________________
SeaBIOS mailing list
[email protected]
https://mail.coreboot.org/mailman/listinfo/seabios