freebsd-dev/sys/powerpc/aim
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
..
clock.c The "free-lance" timer in the i8254 is only used for the speaker 2008-03-26 20:09:21 +00:00
copyinout.c Fix remaining compile error. 2006-10-18 19:56:20 +00:00
interrupt.c Revamp the interrupt handling in support of INTR_FILTER. This includes: 2007-08-11 19:25:32 +00:00
locore.S For AIM, have cpu_idle() set MSR_POW when the powerpc_pow_enabled 2008-03-07 22:27:06 +00:00
machdep.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
mmu_oea.c Prevent the leakage of wired pages in the following circumstances: 2007-11-17 22:52:29 +00:00
nexus.c Revamp the interrupt handling in support of INTR_FILTER. This includes: 2007-08-11 19:25:32 +00:00
ofw_machdep.c Remove SMP left-overs from NetBSD. 2008-02-12 20:55:51 +00:00
ofwmagic.S Instead of "OpenFirmware", "openfirmware", etc. use the official spelling 2004-08-16 15:45:27 +00:00
swtch.S Unify and generalize PowerPC headers, adjust AIM code accordingly. 2008-03-02 17:05:57 +00:00
trap_subr.S Unify and generalize PowerPC headers, adjust AIM code accordingly. 2008-03-02 17:05:57 +00:00
trap.c Remove kernel support for M:N threading. 2008-03-12 10:12:01 +00:00
uio_machdep.c Add kdb_cpu_sync_icache(), intended to synchronize instruction 2007-06-09 21:55:17 +00:00
uma_machdep.c It has been observed on the mailing lists that the different categories 2007-09-15 18:47:02 +00:00
vm_machdep.c Remove kernel support for M:N threading. 2008-03-12 10:12:01 +00:00