summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2016-02-15 17:14:10 +0000
committerandrew <andrew@FreeBSD.org>2016-02-15 17:14:10 +0000
commit79cf618549fc30eddab3634ab3c8483c77e8bda6 (patch)
treef6b293b9f68bdac6f29f9c49ffcc450389b7b270 /sys/dev
parent61f10a29362c4e14144c2ca4ffb4eef6e7f5e192 (diff)
downloadFreeBSD-src-79cf618549fc30eddab3634ab3c8483c77e8bda6.zip
FreeBSD-src-79cf618549fc30eddab3634ab3c8483c77e8bda6.tar.gz
Fix the spelling of OF_getencprop. It will fix the data correctly for the
endian of the CPU so there is no need to call fdt32_to_cpu. Sponsored by: ABT Systems Ltd
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/iicbus/twsi/mv_twsi.c9
-rw-r--r--sys/dev/iicbus/twsi/twsi.c1
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/iicbus/twsi/mv_twsi.c b/sys/dev/iicbus/twsi/mv_twsi.c
index db27366..998a197 100644
--- a/sys/dev/iicbus/twsi/mv_twsi.c
+++ b/sys/dev/iicbus/twsi/mv_twsi.c
@@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
#include <dev/iicbus/iiconf.h>
#include <dev/iicbus/iicbus.h>
-#include <dev/fdt/fdt_common.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
@@ -225,9 +224,9 @@ mv_twsi_attach(device_t dev)
/* Attach child devices onto iicbus. */
for (child = OF_child(iicbusnode); child != 0; child = OF_peer(child)) {
/* Get slave address. */
- error = OF_getprop(child, "i2c-address", &paddr, sizeof(paddr));
+ error = OF_getencprop(child, "i2c-address", &paddr, sizeof(paddr));
if (error == -1)
- error = OF_getprop(child, "reg", &paddr, sizeof(paddr));
+ error = OF_getencprop(child, "reg", &paddr, sizeof(paddr));
if (error == -1)
continue;
@@ -239,10 +238,10 @@ mv_twsi_attach(device_t dev)
if (bootverbose)
device_printf(dev, "adding a device %s at %d.\n",
- dname, fdt32_to_cpu(paddr));
+ dname, paddr);
childdev = BUS_ADD_CHILD(sc->iicbus, 0, dname, -1);
devi = IICBUS_IVAR(childdev);
- devi->addr = fdt32_to_cpu(paddr);
+ devi->addr = paddr;
}
attach_end:
diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c
index c02cb81..1b27956 100644
--- a/sys/dev/iicbus/twsi/twsi.c
+++ b/sys/dev/iicbus/twsi/twsi.c
@@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
#include <dev/iicbus/iiconf.h>
#include <dev/iicbus/iicbus.h>
-#include <dev/fdt/fdt_common.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
OpenPOWER on IntegriCloud