PERFORCE change 174267 for review
Rafal Jaworowski
raj at FreeBSD.org
Wed Feb 3 20:40:05 UTC 2010
http://p4web.freebsd.org/chv.cgi?CH=174267
Change 174267 by raj at raj_fdt on 2010/02/03 20:39:57
Convert Marvell CPU timer driver to FDT/simplebus convention.
Affected files ...
.. //depot/projects/fdt/sys/arm/mv/timer.c#2 edit
Differences ...
==== //depot/projects/fdt/sys/arm/mv/timer.c#2 (text+ko) ====
@@ -48,6 +48,9 @@
#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 @@
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 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)
More information about the p4-projects
mailing list