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.
This commit is contained in:
Andrew Turner 2016-02-10 15:56:52 +00:00
parent e94b881ba1
commit 1e2b39a3f2

View File

@ -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