From aad04a2208fbde8db2c1a81d6057c1ac4edb390e Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Wed, 3 Sep 2014 00:15:51 +0200 Subject: ACPI support ! --- kernel/floppy.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'kernel/floppy.c') diff --git a/kernel/floppy.c b/kernel/floppy.c index e6d2d11..e00e96b 100644 --- a/kernel/floppy.c +++ b/kernel/floppy.c @@ -16,19 +16,22 @@ * */ -#include "x86.h" - -#include "../lib/logger/log.h" // logger facilities #define FOOLOS_MODULE_NAME "floppy" +#ifdef FOOLOS_COMPILE_FLOPPY + +#include "lib/logger/log.h" + +#include "x86.h" + #define FLPY_SECTORS_PER_TRACK 18 void flpydsk_send_command (uint8_t cmd); void flpydsk_wait_irq (); void flpydsk_check_int (uint32_t* st0, uint32_t* cyl); -static volatile int _CurrentDrive=0; -static volatile uint8_t _FloppyDiskIRQ = 0; +static volatile int _CurrentDrive; +static volatile uint8_t _FloppyDiskIRQ; // temporary dma hack //! initialize DMA to use phys addr 1k-64k @@ -158,14 +161,6 @@ void flpydsk_write_ccr (uint8_t val) { x86_outb (FLPYDSK_CTRL, val); } -void sleep(int i) -{ - i*=1000000; - for(;i>0;i--) - { - - } -} void flpydsk_motor_on() { @@ -561,3 +556,4 @@ void floppy_init() } +#endif -- cgit v1.2.3