Lines Matching defs:offs
32 static int append_psci_compatible(void *fdt, int offs, const char *str)
34 return fdt_appendprop(fdt, offs, "compatible", str, strlen(str) + 1);
66 int offs;
73 offs = fdt_path_offset(fdt, "/");
74 if (offs < 0)
76 offs = fdt_add_subnode(fdt, offs, "psci");
77 if (offs < 0)
79 if (append_psci_compatible(fdt, offs, "arm,psci-1.0"))
81 if (append_psci_compatible(fdt, offs, "arm,psci-0.2"))
83 if (append_psci_compatible(fdt, offs, "arm,psci"))
85 if (fdt_setprop_string(fdt, offs, "method", "smc"))
87 if (fdt_setprop_u32(fdt, offs, "cpu_suspend", PSCI_CPU_SUSPEND_FNID))
89 if (fdt_setprop_u32(fdt, offs, "cpu_off", PSCI_CPU_OFF))
91 if (fdt_setprop_u32(fdt, offs, "cpu_on", PSCI_CPU_ON_FNID))
110 int offs;
113 for (offs = fdt_first_subnode(fdt, offset); offs >= 0;
114 offs = fdt_next_subnode(fdt, offs)) {
119 prop = fdt_getprop(fdt, offs, "device_type", &len);
126 prop = fdt_getprop(fdt, offs, "enable-method", &len);
131 ret = fdt_setprop_string(fdt, offs, "enable-method", "psci");
141 if (offs == -FDT_ERR_NOTFOUND)
144 return offs;
160 int offs, ret;
163 offs = fdt_path_offset(fdt, "/cpus");
164 if (offs < 0)
165 return offs;
167 ret = dt_update_one_cpu_node(fdt, offs);
199 int offs = fdt_path_offset(dtb, "/reserved-memory");
206 if (offs < 0) { /* create if not existing yet */
207 offs = fdt_add_subnode(dtb, 0, "reserved-memory");
208 if (offs < 0) {
209 return offs;
211 fdt_setprop_u32(dtb, offs, "#address-cells", ac);
212 fdt_setprop_u32(dtb, offs, "#size-cells", sc);
213 fdt_setprop(dtb, offs, "ranges", NULL, 0);
228 offs = fdt_add_subnode(dtb, offs, node_name);
229 fdt_setprop(dtb, offs, "no-map", NULL, 0);
230 fdt_setprop(dtb, offs, "reg", addresses, idx * sizeof(uint32_t));
336 int offs;
346 offs = fdt_add_subnode(dtb, 0, "cpus");
347 if (offs < 0) {
349 return offs;
352 err = fdt_setprop_u32(dtb, offs, "#address-cells", 2);
355 "#address-cells", offs);
359 err = fdt_setprop_u32(dtb, offs, "#size-cells", 0);
362 "#size-cells", offs);
382 err = fdt_add_cpu(dtb, offs, mpidr);
394 return offs;