Author: andrew Date: Mon Feb 15 17:14:10 2016 New Revision: 295630 URL: https://svnweb.freebsd.org/changeset/base/295630
Log: 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 Modified: head/sys/dev/iicbus/twsi/mv_twsi.c head/sys/dev/iicbus/twsi/twsi.c Modified: head/sys/dev/iicbus/twsi/mv_twsi.c ============================================================================== --- head/sys/dev/iicbus/twsi/mv_twsi.c Mon Feb 15 17:05:03 2016 (r295629) +++ head/sys/dev/iicbus/twsi/mv_twsi.c Mon Feb 15 17:14:10 2016 (r295630) @@ -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: Modified: head/sys/dev/iicbus/twsi/twsi.c ============================================================================== --- head/sys/dev/iicbus/twsi/twsi.c Mon Feb 15 17:05:03 2016 (r295629) +++ head/sys/dev/iicbus/twsi/twsi.c Mon Feb 15 17:14:10 2016 (r295630) @@ -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> _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"