MCPcopy Create free account
hub / github.com/F-Stack/f-stack / fdt_fixup_busfreq

Function fdt_fixup_busfreq

freebsd/arm/mv/mv_common.c:2792–2813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2790}
2791
2792static void
2793fdt_fixup_busfreq(phandle_t root)
2794{
2795 phandle_t sb;
2796 pcell_t freq;
2797
2798 freq = cpu_to_fdt32(get_tclk());
2799
2800 /*
2801 * Fix bus speed in cpu node
2802 */
2803 if ((sb = OF_finddevice("cpu")) != -1)
2804 if (fdt_is_compatible_strict(sb, "ARM,88VS584"))
2805 OF_setprop(sb, "bus-frequency", (void *)&freq,
2806 sizeof(freq));
2807
2808 /*
2809 * This fixup sets the simple-bus bus-frequency property.
2810 */
2811 if ((sb = fdt_find_compatible(root, "simple-bus", 1)) != 0)
2812 OF_setprop(sb, "bus-frequency", (void *)&freq, sizeof(freq));
2813}
2814
2815static void
2816fdt_fixup_ranges(phandle_t root)

Callers

nothing calls this directly

Calls 2

cpu_to_fdt32Function · 0.85
get_tclkFunction · 0.85

Tested by

no test coverage detected