summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpicpu.c
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2006-02-26 07:59:21 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2006-02-26 07:59:21 +0000
commit6995b8a0f0b0b8d71948364473aaef41fc8b9cc4 (patch)
treedd1d6b7552c6f2f6951f24665a8ab6c9aabbd634 /sys/dev/acpi/acpicpu.c
parenta21e6ec8fb0be605ab6d46633535547e8a13d0d0 (diff)
Print only MHz. Idea from jsg@
Diffstat (limited to 'sys/dev/acpi/acpicpu.c')
-rw-r--r--sys/dev/acpi/acpicpu.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/sys/dev/acpi/acpicpu.c b/sys/dev/acpi/acpicpu.c
index 0fa3ceb0378..525e9394fe7 100644
--- a/sys/dev/acpi/acpicpu.c
+++ b/sys/dev/acpi/acpicpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpicpu.c,v 1.3 2006/02/26 05:17:25 marco Exp $ */
+/* $OpenBSD: acpicpu.c,v 1.4 2006/02/26 07:59:20 marco Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -23,6 +23,9 @@
#include <sys/malloc.h>
#include <machine/bus.h>
+#include <machine/cpu.h>
+#include <machine/cpufunc.h>
+#include <machine/specialreg.h>
#include <dev/acpi/acpireg.h>
#include <dev/acpi/acpivar.h>
@@ -93,10 +96,21 @@ acpicpu_attach(struct device *parent, struct device *self, void *aux)
return;
}
+#ifdef ACPI_DEBUG
+ for (i = 0; i < sc->sc_pss_len; i++) {
+ dnprintf(20, "%d %d %d %d %d %d\n",
+ sc->sc_pss[i].pss_core_freq,
+ sc->sc_pss[i].pss_power,
+ sc->sc_pss[i].pss_trans_latency,
+ sc->sc_pss[i].pss_bus_latency,
+ sc->sc_pss[i].pss_ctrl,
+ sc->sc_pss[i].pss_status);
+ }
+ dnprintf(20, "\n");
+#endif
for (i = 0; i < sc->sc_pss_len; i++)
- printf("%d MHz %d mW ", sc->sc_pss[i].pss_core_freq,
- sc->sc_pss[i].pss_power);
- printf("\n");
+ printf("%d%s", sc->sc_pss[i].pss_core_freq,
+ i < sc->sc_pss_len - 1 ? ", " : " MHz\n");
/* aml_register_notify(sc->sc_devnode->parent, aa->aaa_dev, acpicpu_notify, sc); */
}