aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Nikolov <nickysn@users.sourceforge.net>2018-02-10 13:52:13 +0200
committerKevin O'Connor <kevin@koconnor.net>2018-02-15 00:18:14 -0500
commitb00a03a49e28d518435deeb22d119bbd959e78a3 (patch)
tree3f341f9ad140f83be369a7594e770b229b1618e3
parent4a6dbcea3e412fe12effa2f812f50dd7eae90955 (diff)
downloadseabios-b00a03a49e28d518435deeb22d119bbd959e78a3.tar.gz
floppy: hold the DOR reset bit low for 4 microseconds, when resetting
Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
-rw-r--r--src/hw/floppy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hw/floppy.c b/src/hw/floppy.c
index 3012b3aa..16989c29 100644
--- a/src/hw/floppy.c
+++ b/src/hw/floppy.c
@@ -328,6 +328,8 @@ floppy_enable_controller(void)
dprintf(2, "Floppy_enable_controller\n");
// Clear the reset bit (enter reset state), but set 'enable IRQ and DMA'
floppy_dor_mask(FLOPPY_DOR_RESET, FLOPPY_DOR_IRQ);
+ // Real hardware needs a 4 microsecond delay
+ usleep(4);
// Set the reset bit (normal operation) and keep 'enable IRQ and DMA' on
floppy_dor_mask(0, FLOPPY_DOR_IRQ | FLOPPY_DOR_RESET);
int ret = floppy_wait_irq();