summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2006-05-29 00:17:26 +0000
committerJason Wright <jason@cvs.openbsd.org>2006-05-29 00:17:26 +0000
commit17c28aaa72fd6e9623e22b618d39789ed78d6ef1 (patch)
tree644bfc2705c26c687c0d016bfe8292efce7fae1c /sys/arch/sparc64/dev
parent45d67a6f93945ddd41865d35316527900f040863 (diff)
fetch the beep clock frequency (we'll need it to compute the audio frequency later)
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r--sys/arch/sparc64/dev/beep.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/beep.c b/sys/arch/sparc64/dev/beep.c
index 7a12f224c0a..43d861973de 100644
--- a/sys/arch/sparc64/dev/beep.c
+++ b/sys/arch/sparc64/dev/beep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: beep.c,v 1.1 2006/05/28 23:37:42 jason Exp $ */
+/* $OpenBSD: beep.c,v 1.2 2006/05/29 00:17:25 jason Exp $ */
/*
* Copyright (c) 2006 Jason L. Wright (jason@thought.net)
@@ -58,6 +58,7 @@ struct beep_softc {
struct device sc_dev;
bus_space_tag_t sc_iot;
bus_space_handle_t sc_ioh;
+ int sc_clk;
};
int beep_match(struct device *, void *, void *);
@@ -105,5 +106,9 @@ beep_attach(parent, self, aux)
return;
}
- printf("\n");
+ /* The bbc,beep is clocked at half the BBC frequency */
+ sc->sc_clk = getpropint(findroot(), "clock-frequency", 0);
+ sc->sc_clk /= 2;
+
+ printf(": clock %sMHz\n", clockfreq(sc->sc_clk));
}