summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2012-08-16 18:42:05 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2012-08-16 18:42:05 +0000
commit6abd5d8bff69241fcfc49372af3a0a4ac2960f1b (patch)
treec27412007fb60f0a00e042ff3cc615a7b65a2fb6 /sys/dev/pci
parentb6314326114bec33f9e727e1692ad9ea3ef3369e (diff)
we are past the point where timecounters may disappear
ok miod
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/amdpm.c10
-rw-r--r--sys/dev/pci/viapm.c10
2 files changed, 2 insertions, 18 deletions
diff --git a/sys/dev/pci/amdpm.c b/sys/dev/pci/amdpm.c
index 85cf4b9d04b..ae7baae9e43 100644
--- a/sys/dev/pci/amdpm.c
+++ b/sys/dev/pci/amdpm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: amdpm.c,v 1.26 2011/04/09 04:33:40 deraadt Exp $ */
+/* $OpenBSD: amdpm.c,v 1.27 2012/08/16 18:41:17 tedu Exp $ */
/*
* Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -51,9 +51,7 @@
#include <sys/kernel.h>
#include <sys/rwlock.h>
#include <sys/timeout.h>
-#ifdef __HAVE_TIMECOUNTER
#include <sys/timetc.h>
-#endif
#include <machine/bus.h>
@@ -73,7 +71,6 @@
#define AMDPM_SMBUS_DELAY 100
#define AMDPM_SMBUS_TIMEOUT 1
-#ifdef __HAVE_TIMECOUNTER
u_int amdpm_get_timecount(struct timecounter *tc);
#ifndef AMDPM_FREQUENCY
@@ -88,7 +85,6 @@ static struct timecounter amdpm_timecounter = {
"AMDPM", /* name */
1000 /* quality */
};
-#endif
#define AMDPM_CONFREG 0x40
@@ -247,7 +243,6 @@ amdpm_attach(struct device *parent, struct device *self, void *aux)
return;
}
-#ifdef __HAVE_TIMECOUNTER
if ((cfg_reg & AMDPM_TMRRST) == 0 &&
(cfg_reg & AMDPM_STOPTMR) == 0 &&
(PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_AMD_PBC768_PMC ||
@@ -261,7 +256,6 @@ amdpm_attach(struct device *parent, struct device *self, void *aux)
amdpm_timecounter.tc_counter_mask = 0xffffffffu;
tc_init(&amdpm_timecounter);
}
-#endif
if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_AMD_PBC768_PMC ||
PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_AMD_8111_PMC) {
if ((cfg_reg & AMDPM_RNGEN) ==0) {
@@ -350,7 +344,6 @@ amdpm_rnd_callout(void *v)
timeout_add(&sc->sc_rnd_ch, 1);
}
-#ifdef __HAVE_TIMECOUNTER
u_int
amdpm_get_timecount(struct timecounter *tc)
{
@@ -371,7 +364,6 @@ amdpm_get_timecount(struct timecounter *tc)
#endif
return (u2);
}
-#endif
int
amdpm_i2c_acquire_bus(void *cookie, int flags)
diff --git a/sys/dev/pci/viapm.c b/sys/dev/pci/viapm.c
index 4ba22e9835c..cbf20ffd588 100644
--- a/sys/dev/pci/viapm.c
+++ b/sys/dev/pci/viapm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: viapm.c,v 1.14 2011/04/10 20:27:02 shadchin Exp $ */
+/* $OpenBSD: viapm.c,v 1.15 2012/08/16 18:41:17 tedu Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis <kettenis@openbsd.org>
@@ -64,9 +64,7 @@
#include <sys/rwlock.h>
#include <sys/sensors.h>
#include <sys/timeout.h>
-#ifdef __HAVE_TIMECOUNTER
#include <sys/timetc.h>
-#endif
#include <machine/bus.h>
@@ -167,7 +165,6 @@
#define VIAPM_NUM_SENSORS 10 /* three temp, two fan, five voltage */
-#ifdef __HAVE_TIMECOUNTER
u_int viapm_get_timecount(struct timecounter *tc);
#ifndef VIAPM_FREQUENCY
@@ -182,7 +179,6 @@ static struct timecounter viapm_timecounter = {
"VIAPM", /* name */
1000 /* quality */
};
-#endif /* __HAVE_TIMECOUNTER */
struct timeout viapm_timeout;
@@ -391,7 +387,6 @@ viapm_attach(struct device *parent, struct device *self, void *aux)
nosmb:
-#ifdef __HAVE_TIMECOUNTER
/* Power management */
switch (PCI_PRODUCT(pa->pa_id)) {
case PCI_PRODUCT_VIATECH_VT82C596:
@@ -436,7 +431,6 @@ nosmb:
(unsigned long long)viapm_timecounter.tc_frequency);
nopm:
-#endif /* __HAVE_TIMECOUNTER */
/* HWMon */
switch (PCI_PRODUCT(pa->pa_id)) {
@@ -764,7 +758,6 @@ viapm_refresh(void *arg)
timeout_add_msec(&viapm_timeout, 1500);
}
-#ifdef __HAVE_TIMECOUNTER
u_int
viapm_get_timecount(struct timecounter *tc)
{
@@ -781,4 +774,3 @@ viapm_get_timecount(struct timecounter *tc)
return (u2);
}
-#endif /* __HAVE_TIMECOUNTER */