Date: Wed, 10 Feb 2016 15:56:52 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295470 - head/sys/arm/arm Message-ID: <201602101556.u1AFuqUo097851@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Wed Feb 10 15:56:52 2016 New Revision: 295470 URL: https://svnweb.freebsd.org/changeset/base/295470 Log: Use OF_getencprop to read a property, it already handles the endian conversion so we don't need to pass the data through fdt32_to_cpu. Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Wed Feb 10 15:39:59 2016 (r295469) +++ head/sys/arm/arm/generic_timer.c Wed Feb 10 15:56:52 2016 (r295470) @@ -361,11 +361,8 @@ arm_tmr_attach(device_t dev) /* Get the base clock frequency */ node = ofw_bus_get_node(dev); if (node > 0) { - error = OF_getprop(node, "clock-frequency", &clock, + error = OF_getencprop(node, "clock-frequency", &clock, sizeof(clock)); - if (error > 0) { - sc->clkfreq = fdt32_to_cpu(clock); - } } #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602101556.u1AFuqUo097851>