diff options
author | imp <imp@FreeBSD.org> | 2005-03-16 20:46:16 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-03-16 20:46:16 +0000 |
commit | edeb9d81b0e10ba912c5810a921d024c302a527d (patch) | |
tree | b50b808687396e28dc9f26ef027029b183b38a28 /sys/i386/isa | |
parent | 0794b3a70d6fa3543d0dbd38d097f9b09330a357 (diff) | |
download | FreeBSD-src-edeb9d81b0e10ba912c5810a921d024c302a527d.zip FreeBSD-src-edeb9d81b0e10ba912c5810a921d024c302a527d.tar.gz |
Eleminate 3 PC98 ifdefs:
o Use IP_NPX in preference to hard coded value to write 0 to clear busy#
o Use md macro for a full reset of the npx
o Use IRQ_NPX in preference to hard coded value for each platform.
# The other two ifdefs in this file are hard to remove
Diffstat (limited to 'sys/i386/isa')
-rw-r--r-- | sys/i386/isa/npx.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index 040bd02..50241b6 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -218,11 +218,7 @@ npx_intr(dummy) * The BUSY# latch must be cleared in all cases so that the next * unmasked npx exception causes an interrupt. */ -#ifdef PC98 - outb(0xf8, 0); -#else - outb(0xf0, 0); -#endif + outb(IO_NPX, 0); /* * fpcurthread is normally non-null here. In that case, schedule an @@ -270,13 +266,8 @@ npx_probe(dev) IO_NPX, IO_NPX + IO_NPXSIZE - 1, IO_NPXSIZE, RF_ACTIVE); if (ioport_res == NULL) panic("npx: can't get ports"); -#ifdef PC98 - if (resource_int_value("npx", 0, "irq", &irq_num) != 0) - irq_num = 8; -#else if (resource_int_value("npx", 0, "irq", &irq_num) != 0) - irq_num = 13; -#endif + irq_num = IRQ_NPX; irq_rid = 0; irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &irq_rid, irq_num, irq_num, 1, RF_ACTIVE); @@ -290,12 +281,9 @@ npx_probe(dev) * Partially reset the coprocessor, if any. Some BIOS's don't reset * it after a warm boot. */ -#ifdef PC98 - outb(0xf8,0); -#else - outb(0xf1, 0); /* full reset on some systems, NOP on others */ - outb(0xf0, 0); /* clear BUSY# latch */ -#endif + npx_full_reset(); + outb(IO_NPX, 0); + /* * Prepare to trap all ESC (i.e., NPX) instructions and all WAIT * instructions. We must set the CR0_MP bit and use the CR0_TS |