Currently big endianness of the device tree data is assumed in
of_find_next_cache_node for 'handle' when calling of_find_node_by_phandle.
In preparation to move this function to common code, this patch fixes
the endianness using 'be32_to_cpup'
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Rob Herring <[email protected]>
Signed-off-by: Sudeep KarkadaNagesha <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
handle = of_get_property(np, "next-level-cache", NULL);
if (handle)
- return of_find_node_by_phandle(*handle);
+ return of_find_node_by_phandle(be32_to_cpup(handle));
/* OF on pmac has nodes instead of properties named "l2-cache"
* beneath CPU nodes.