Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jan 2010 12:04:54 GMT
From:      Rafal Jaworowski <raj@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 173830 for review
Message-ID:  <201001281204.o0SC4s2g037098@repoman.freebsd.org>

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

Change 173830 by raj@raj_fdt on 2010/01/28 12:04:41

	Convert Marvell TWSI (I2C) driver to FDT/simplebus convention.

Affected files ...

.. //depot/projects/fdt/sys/arm/mv/twsi.c#2 edit

Differences ...

==== //depot/projects/fdt/sys/arm/mv/twsi.c#2 (text+ko) ====

@@ -57,6 +57,9 @@
 
 #include <dev/iicbus/iiconf.h>
 #include <dev/iicbus/iicbus.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
 #include "iicbus_if.h"
 
 #define MV_TWSI_NAME		"twsi"
@@ -151,7 +154,7 @@
 	sizeof(struct mv_twsi_softc),
 };
 
-DRIVER_MODULE(twsi, mbus, mv_twsi_driver, mv_twsi_devclass, 0, 0);
+DRIVER_MODULE(twsi, simplebus, mv_twsi_driver, mv_twsi_devclass, 0, 0);
 DRIVER_MODULE(iicbus, twsi, iicbus_driver, iicbus_devclass, 0, 0);
 MODULE_DEPEND(twsi, iicbus, 1, 1, 1);
 
@@ -289,6 +292,9 @@
 mv_twsi_probe(device_t dev)
 {
 
+	if (!ofw_bus_is_compatible(dev, "mrvl,twsi"))
+		return (ENXIO);
+
 	device_set_desc(dev, "Marvell Integrated I2C Bus Controller");
 	return (BUS_PROBE_DEFAULT);
 }



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