Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Feb 2010 20:39:03 GMT
From:      Rafal Jaworowski <raj@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 174265 for review
Message-ID:  <201002032039.o13Kd3Rq007884@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=174265

Change 174265 by raj@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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002032039.o13Kd3Rq007884>