aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/freescale/imx/imx51_ipuv3_fbd.c
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2016-11-14 12:03:08 +0000
committerAndrew Turner <andrew@FreeBSD.org>2016-11-14 12:03:08 +0000
commit9783ea5c9f762c43a4a43f344382e90ce2d53fa8 (patch)
tree042191ed86eceb5731e1295408b29fc3fc707493 /sys/arm/freescale/imx/imx51_ipuv3_fbd.c
parent222102cfcad6179aa3d99658453ef68e6bccc1d1 (diff)
downloadsrc-9783ea5c9f762c43a4a43f344382e90ce2d53fa8.tar.gz
src-9783ea5c9f762c43a4a43f344382e90ce2d53fa8.zip
Use the correct OF_getencprop over OF_getprop + fdt32_to_cpu to read
integer data from the device tree. Sponsored by: ABT Systems Ltd
Notes
Notes: svn path=/head/; revision=308640
Diffstat (limited to 'sys/arm/freescale/imx/imx51_ipuv3_fbd.c')
-rw-r--r--sys/arm/freescale/imx/imx51_ipuv3_fbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arm/freescale/imx/imx51_ipuv3_fbd.c b/sys/arm/freescale/imx/imx51_ipuv3_fbd.c
index ea9ca6da730e..ee6833fc3921 100644
--- a/sys/arm/freescale/imx/imx51_ipuv3_fbd.c
+++ b/sys/arm/freescale/imx/imx51_ipuv3_fbd.c
@@ -221,10 +221,10 @@ ipu3_fb_attach(device_t dev)
* On i.MX53, the offset is 0.
*/
node = ofw_bus_get_node(dev);
- if ((OF_getprop(node, "reg", &reg, sizeof(reg))) <= 0)
+ if ((OF_getencprop(node, "reg", &reg, sizeof(reg))) <= 0)
base = 0;
else
- base = fdt32_to_cpu(reg) - IPU_CM_BASE(0);
+ base = reg - IPU_CM_BASE(0);
/* map controller registers */
err = bus_space_map(iot, IPU_CM_BASE(base), IPU_CM_SIZE, 0, &ioh);
if (err)