diff options
author | nyan <nyan@FreeBSD.org> | 2005-05-14 09:10:02 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2005-05-14 09:10:02 +0000 |
commit | 99f1b222339d6eee1c65e04ad1def3c866f155b0 (patch) | |
tree | d6652ab4639c3a5c5eb85fbf3822f9f54a92d8b1 /sys/pc98/cbus/pcrtc.c | |
parent | cb84f02ba844fdbece84784ccefc57126f36d66f (diff) | |
download | FreeBSD-src-99f1b222339d6eee1c65e04ad1def3c866f155b0.zip FreeBSD-src-99f1b222339d6eee1c65e04ad1def3c866f155b0.tar.gz |
- Move timerreg.h to <arch>/include and split i8253 specific defines into
i8253reg.h, and add some defines to control a speaker.
- Move PPI related defines from i386/isa/spkr.c into ppireg.h and use them.
- Move IO_{PPI,TIMER} defines into ppireg.h and timerreg.h respectively.
- Use isa/isareg.h rather than <arch>/isa/isa.h.
Tested on: i386, pc98
Diffstat (limited to 'sys/pc98/cbus/pcrtc.c')
-rw-r--r-- | sys/pc98/cbus/pcrtc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/pc98/cbus/pcrtc.c b/sys/pc98/cbus/pcrtc.c index f3d956b..ee75914 100644 --- a/sys/pc98/cbus/pcrtc.c +++ b/sys/pc98/cbus/pcrtc.c @@ -79,6 +79,8 @@ #include <machine/apicvar.h> #endif #include <machine/specialreg.h> +#include <machine/ppireg.h> +#include <machine/timerreg.h> #include <i386/isa/icu.h> #include <pc98/cbus/cbus.h> @@ -86,7 +88,6 @@ #ifdef DEV_ISA #include <isa/isavar.h> #endif -#include <i386/isa/timerreg.h> /* * 32-bit time_t's can't reach leap years before 1904 or after 2036, so we @@ -357,8 +358,8 @@ DELAY(int n) static void sysbeepstop(void *chan) { - outb(IO_PPI, inb(IO_PPI)|0x08); /* disable counter1 output to speaker */ - release_timer1(); + ppi_spkr_off(); /* disable counter1 output to speaker */ + timer_spkr_release(); beeping = 0; } @@ -367,19 +368,18 @@ sysbeep(int pitch, int period) { int x = splclock(); - if (acquire_timer1(TIMER_SQWAVE|TIMER_16BIT)) + if (timer_spkr_acquire()) if (!beeping) { /* Something else owns it. */ splx(x); return (-1); /* XXX Should be EBUSY, but nobody cares anyway. */ } disable_intr(); - outb(0x3fdb, pitch); - outb(0x3fdb, (pitch>>8)); + spkr_set_pitch(pitch); enable_intr(); if (!beeping) { /* enable counter1 output to speaker */ - outb(IO_PPI, (inb(IO_PPI) & 0xf7)); + ppi_spkr_on(); beeping = period; timeout(sysbeepstop, (void *)NULL, period); } |