freebsd-dev/sys/i386/isa
Poul-Henning Kamp e465985885 The "free-lance" timer in the i8254 is only used for the speaker
these days, so de-generalize the acquire_timer/release_timer api
to just deal with speakers.

The new (optional) MD functions are:
	timer_spkr_acquire()
	timer_spkr_release()
and
	timer_spkr_setfreq()

the last of which configures the timer to generate a tone of a given
frequency, in Hz instead of 1/1193182th of seconds.

Drop entirely timer2 on pc98, it is not used anywhere at all.

Move sysbeep() to kern/tty_cons.c and use the timer_spkr*() if
they exist, and do nothing otherwise.

Remove prototypes and empty acquire-/release-timer() and sysbeep()
functions from the non-beeping archs.

This eliminate the need for the speaker driver to know about
i8254frequency at all.  In theory this makes the speaker driver MI,
contingent on the timer_spkr_*() functions existing but the driver
does not know this yet and still attaches to the ISA bus.

Syscons is more tricky, in one function, sc_tone(), it knows the hz
and things are just fine.

In the other function, sc_bell() it seems to get the period from
the KDMKTONE ioctl in terms if 1/1193182th second, so we hardcode
the 1193182 and leave it at that.  It's probably not important.

Change a few other sysbeep() uses which obviously knew that the
argument was in terms of i8254 frequency, and leave alone those
that look like people thought sysbeep() took frequency in hertz.

This eliminates the knowledge of i8254_freq from all but the actual
clock.c code and the prof_machdep.c on amd64 and i386, where I think
it would be smart to ask for help from the timecounters anyway [TBD].
2008-03-26 20:09:21 +00:00
..
atpic_vector.s Evidently FreeBSD has long relied on the compiler to treat structures 2006-12-17 05:07:01 +00:00
atpic.c Explicitly use spinlock_enter/exit rather than locking the icu_lock spin 2008-03-20 21:53:27 +00:00
ccbque.h
clock.c The "free-lance" timer in the i8254 is only used for the speaker 2008-03-26 20:09:21 +00:00
elcr.c
elink.c
elink.h
icu.h Evidently FreeBSD has long relied on the compiler to treat structures 2006-12-17 05:07:01 +00:00
isa_dma.c - Move bus dependent defines to {isa,cbus}_dmareg.h. 2005-05-14 10:14:56 +00:00
isa.c Fix a kernel panic due to a NULL pointer access on pc98. 2007-09-01 12:18:28 +00:00
isa.h - Move bus dependent defines to {isa,cbus}_dmareg.h. 2005-05-14 10:14:56 +00:00
nmi.c
npx.c Commit 14/14 of sched_lock decomposition. 2007-06-05 00:00:57 +00:00
pmtimer.c First part of a little cleanup in the calendar/timezone/RTC handling. 2006-10-02 12:59:59 +00:00
prof_machdep.c Rename timer0_max_count to i8254_max_count. 2008-03-26 15:03:24 +00:00
spic.c Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
spicreg.h
vesa.c Fix some "in in" typos in comments. 2008-03-26 07:32:08 +00:00