summaryrefslogtreecommitdiffstats
path: root/sys/arm/mv/twsi.c
diff options
context:
space:
mode:
authorraj <raj@FreeBSD.org>2010-06-13 13:28:53 +0000
committerraj <raj@FreeBSD.org>2010-06-13 13:28:53 +0000
commit48f2ce50e598284d7c79d1111c68cc0e0f7c281d (patch)
tree07c2d0d0d218db6ddf32a8764732a00acfd6ae59 /sys/arm/mv/twsi.c
parent9195421e5e6821c80ae6593124db55737a827f21 (diff)
downloadFreeBSD-src-48f2ce50e598284d7c79d1111c68cc0e0f7c281d.zip
FreeBSD-src-48f2ce50e598284d7c79d1111c68cc0e0f7c281d.tar.gz
Convert Marvell ARM platforms to FDT convention.
The following systems are involved: - DB-88F5182 - DB-88F5281 - DB-88F6281 - DB-78100 - SheevaPlug This overhaul covers the following major changes: - All integrated peripherals drivers for Marvell ARM SoC, which are currently in the FreeBSD source tree are reworked and adjusted so they derive config data out of the device tree blob (instead of hard coded / tabelarized values). - Since the common FDT infrastrucutre (fdtbus, simplebus) is used we say good by to obio / mbus drivers and numerous hard-coded config data. Note that world needs to be built WITH_FDT for the affected platforms. Reviewed by: imp Sponsored by: The FreeBSD Foundation.
Diffstat (limited to 'sys/arm/mv/twsi.c')
-rw-r--r--sys/arm/mv/twsi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arm/mv/twsi.c b/sys/arm/mv/twsi.c
index 8c745b4..2f8f76f 100644
--- a/sys/arm/mv/twsi.c
+++ b/sys/arm/mv/twsi.c
@@ -57,6 +57,9 @@ __FBSDID("$FreeBSD$");
#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 @@ static driver_t mv_twsi_driver = {
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 @@ static int
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);
}
OpenPOWER on IntegriCloud