Lines Matching +full:timebase +full:- +full:frequency
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * devtree.c - convenience functions for device tree manipulation
25 if (getprop(root, "#address-cells", &naddr, sizeof(naddr)) < 0) in dt_fixup_memory()
30 fatal("Can't cope with #address-cells == %d in /\n\r", naddr); in dt_fixup_memory()
32 if (getprop(root, "#size-cells", &nsize, sizeof(nsize)) < 0) in dt_fixup_memory()
37 fatal("Can't cope with #size-cells == %d in /\n\r", nsize); in dt_fixup_memory()
53 printf("Memory <- <0x%x", be32_to_cpu(memreg[0])); in dt_fixup_memory()
67 printf("CPU clock-frequency <- 0x%x (%dMHz)\n\r", cpu, MHZ(cpu)); in dt_fixup_cpu_clocks()
68 printf("CPU timebase-frequency <- 0x%x (%dMHz)\n\r", tb, MHZ(tb)); in dt_fixup_cpu_clocks()
70 printf("CPU bus-frequency <- 0x%x (%dMHz)\n\r", bus, MHZ(bus)); in dt_fixup_cpu_clocks()
73 setprop_val(devp, "clock-frequency", cpu_to_be32(cpu)); in dt_fixup_cpu_clocks()
74 setprop_val(devp, "timebase-frequency", cpu_to_be32(tb)); in dt_fixup_cpu_clocks()
76 setprop_val(devp, "bus-frequency", cpu_to_be32(bus)); in dt_fixup_cpu_clocks()
87 printf("%s: clock-frequency <- %x (%dMHz)\n\r", path, freq, MHZ(freq)); in dt_fixup_clock()
88 setprop_val(devp, "clock-frequency", cpu_to_be32(freq)); in dt_fixup_clock()
97 printf("%s: local-mac-address <-" in dt_fixup_mac_address_by_alias()
102 setprop(devp, "local-mac-address", addr, 6); in dt_fixup_mac_address_by_alias()
108 void *devp = find_node_by_prop_value(NULL, "linux,network-index", in dt_fixup_mac_address()
112 printf("ENET%d: local-mac-address <-" in dt_fixup_mac_address()
117 setprop(devp, "local-mac-address", addr, 6); in dt_fixup_mac_address()
139 if (getprop(node, "#address-cells", naddr, 4) != 4) in dt_get_reg_format()
143 if (getprop(node, "#size-cells", nsize, 4) != 4) in dt_get_reg_format()
151 int pad = MAX_ADDR_CELLS - naddr; in copy_val()
161 for (i = MAX_ADDR_CELLS - 1; i >= 0; i--) { in sub_reg()
164 reg[i] -= sub[i] + prev_borrow; in sub_reg()
174 for (i = MAX_ADDR_CELLS - 1; i >= MAX_ADDR_CELLS - naddr; i--) { in add_reg()
228 return -1; in find_range()
350 pos += strnlen(&buf[pos], len - pos); in dt_is_compatible()
361 n = getprop(node, "virtual-reg", addr, nres * 4); in dt_get_virtual_reg()