aboutsummaryrefslogtreecommitdiffstats
path: root/src/floppy.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-07-21 22:23:05 -0400
committerKevin O'Connor <kevin@koconnor.net>2008-07-21 22:23:05 -0400
commit409670204b5da474d558444c7c4f9defe0242815 (patch)
treec4903a409ff451ea9b77d9cf2a890ddcaa13a390 /src/floppy.c
parentae8be531d7a0f04666b51bb6a8b78b6a956efcaf (diff)
downloadseabios-409670204b5da474d558444c7c4f9defe0242815.tar.gz
Add additional config options to remove parts of code.
Added options CONFIG_BOOT, CONFIG_SERIAL, CONFIG_LPT, CONFIG_KEYBOARD, CONFIG_BOOTMENU. Also extended coverage of existing options to ensure full code got removed.
Diffstat (limited to 'src/floppy.c')
-rw-r--r--src/floppy.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/floppy.c b/src/floppy.c
index 6e903adb..a42f53f3 100644
--- a/src/floppy.c
+++ b/src/floppy.c
@@ -20,6 +20,7 @@
// Since no provisions are made for multiple drive types, most
// values in this table are ignored. I set parameters for 1.44M
// floppy here
+#if MODE16 == 1
struct floppy_ext_dbt_s diskette_param_table2 VISIBLE16 = {
.dbt = {
.specify1 = 0xAF,
@@ -38,6 +39,7 @@ struct floppy_ext_dbt_s diskette_param_table2 VISIBLE16 = {
.data_rate = 0, // data transfer rate
.drive_type = 4, // drive type in cmos
};
+#endif
void
floppy_drive_setup()
@@ -739,6 +741,9 @@ void VISIBLE16
handle_0e()
{
debug_isr(DEBUG_ISR_0e);
+ if (! CONFIG_FLOPPY_SUPPORT)
+ goto done;
+
if ((inb(PORT_FD_STATUS) & 0xc0) != 0xc0) {
outb(0x08, PORT_FD_DATA); // sense interrupt status
while ((inb(PORT_FD_STATUS) & 0xc0) != 0xc0)
@@ -747,15 +752,20 @@ handle_0e()
inb(PORT_FD_DATA);
} while ((inb(PORT_FD_STATUS) & 0xc0) == 0xc0);
}
- eoi_pic1();
// diskette interrupt has occurred
SETBITS_BDA(floppy_recalibration_status, FRS_TIMEOUT);
+
+done:
+ eoi_pic1();
}
// Called from int08 handler.
void
floppy_tick()
{
+ if (! CONFIG_FLOPPY_SUPPORT)
+ return;
+
// time to turn off drive(s)?
u8 fcount = GET_BDA(floppy_motor_counter);
if (fcount) {