summaryrefslogtreecommitdiffstats
path: root/sys/arm/mv/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arm/mv/timer.c')
-rw-r--r--sys/arm/mv/timer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arm/mv/timer.c b/sys/arm/mv/timer.c
index d239b9a..61049cb 100644
--- a/sys/arm/mv/timer.c
+++ b/sys/arm/mv/timer.c
@@ -48,6 +48,9 @@ __FBSDID("$FreeBSD$");
#include <arm/mv/mvreg.h>
#include <arm/mv/mvvar.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
#define MV_TIMER_TICK (get_tclk() / hz)
#define INITIAL_TIMECOUNTER (0xffffffff)
#define MAX_WATCHDOG_TICKS (0xffffffff)
@@ -97,6 +100,9 @@ static int
mv_timer_probe(device_t dev)
{
+ if (!ofw_bus_is_compatible(dev, "mrvl,timer"))
+ return (ENXIO);
+
device_set_desc(dev, "Marvell CPU Timer");
return (0);
}
@@ -171,7 +177,7 @@ static driver_t mv_timer_driver = {
static devclass_t mv_timer_devclass;
-DRIVER_MODULE(timer, mbus, mv_timer_driver, mv_timer_devclass, 0, 0);
+DRIVER_MODULE(timer, simplebus, mv_timer_driver, mv_timer_devclass, 0, 0);
static unsigned
mv_timer_get_timecount(struct timecounter *tc)
OpenPOWER on IntegriCloud