PERFORCE change 174265 for review
Rafal Jaworowski
raj at FreeBSD.org
Wed Feb 3 20:39:04 UTC 2010
http://p4web.freebsd.org/chv.cgi?CH=174265
Change 174265 by raj at raj_fdt on 2010/02/03 20:38:19
Convert GPIO attachment to FDT/simplebus convention.
This driver needs more work to fully work in the new environemt, as
GPIO resources description in DTS and handling is a bit cumbersome.
Affected files ...
.. //depot/projects/fdt/sys/arm/mv/gpio.c#2 edit
Differences ...
==== //depot/projects/fdt/sys/arm/mv/gpio.c#2 (text+ko) ====
@@ -46,6 +46,9 @@
#include <machine/bus.h>
#include <machine/intr.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
#include <arm/mv/mvvar.h>
#include <arm/mv/mvreg.h>
@@ -100,12 +103,15 @@
static devclass_t mv_gpio_devclass;
-DRIVER_MODULE(gpio, mbus, mv_gpio_driver, mv_gpio_devclass, 0, 0);
+DRIVER_MODULE(gpio, simplebus, mv_gpio_driver, mv_gpio_devclass, 0, 0);
static int
mv_gpio_probe(device_t dev)
{
+ if (!ofw_bus_is_compatible(dev, "mrvl,gpio"))
+ return (ENXIO);
+
device_set_desc(dev, "Marvell Integrated GPIO Controller");
return (0);
}
More information about the p4-projects
mailing list