]> xenbits.xensource.com Git - seabios.git/commitdiff
floppy: hold the DOR reset bit low for 4 microseconds, when resetting
authorNikolay Nikolov <nickysn@users.sourceforge.net>
Sat, 10 Feb 2018 11:52:13 +0000 (13:52 +0200)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 15 Feb 2018 05:18:14 +0000 (00:18 -0500)
Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
src/hw/floppy.c

index 3012b3aab072b4a99dcce32f918e5efd73300432..16989c298c5a414138d0d08e2e54d5f93a3c4dcd 100644 (file)
@@ -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();