Lines Matching refs:f

22 	yyin = current_srcfile->f;  in dt_from_source()
34 static void write_prefix(FILE *f, int level) in write_prefix() argument
39 fputc('\t', f); in write_prefix()
49 static void write_propval_string(FILE *f, const char *s, size_t len) in write_propval_string() argument
58 fprintf(f, "\""); in write_propval_string()
63 fprintf(f, "\\a"); in write_propval_string()
66 fprintf(f, "\\b"); in write_propval_string()
69 fprintf(f, "\\t"); in write_propval_string()
72 fprintf(f, "\\n"); in write_propval_string()
75 fprintf(f, "\\v"); in write_propval_string()
78 fprintf(f, "\\f"); in write_propval_string()
81 fprintf(f, "\\r"); in write_propval_string()
84 fprintf(f, "\\\\"); in write_propval_string()
87 fprintf(f, "\\\""); in write_propval_string()
90 fprintf(f, "\\0"); in write_propval_string()
94 fprintf(f, "%c", c); in write_propval_string()
96 fprintf(f, "\\x%02"PRIx8, c); in write_propval_string()
99 fprintf(f, "\""); in write_propval_string()
102 static void write_propval_int(FILE *f, const char *p, size_t len, size_t width) in write_propval_int() argument
110 fprintf(f, "%02"PRIx8, *(const uint8_t*)p); in write_propval_int()
113 fprintf(f, "0x%02"PRIx16, dtb_ld16(p)); in write_propval_int()
116 fprintf(f, "0x%02"PRIx32, dtb_ld32(p)); in write_propval_int()
119 fprintf(f, "0x%02"PRIx64, dtb_ld64(p)); in write_propval_int()
123 fputc(' ', f); in write_propval_int()
199 static void write_propval(FILE *f, struct property *prop) in write_propval() argument
208 fprintf(f, ";"); in write_propval()
212 fprintf(f, " /* %s */", srcstr); in write_propval()
216 fprintf(f, "\n"); in write_propval()
220 fprintf(f, " ="); in write_propval()
239 fprintf(f, " %s", delim_start[emit_type]); in write_propval()
241 fprintf(f, " %s:", m->ref); in write_propval()
248 write_propval_int(f, p, chunk_len, 2); in write_propval()
258 fprintf(f, "&{%s}", m_phandle->ref); in write_propval()
260 fprintf(f, "&%s", m_phandle->ref); in write_propval()
262 fputc(' ', f); in write_propval()
263 write_propval_int(f, p + 4, chunk_len - 4, 4); in write_propval()
266 write_propval_int(f, p, chunk_len, 4); in write_propval()
269 fputc(' ', f); in write_propval()
272 write_propval_int(f, p, chunk_len, 8); in write_propval()
275 write_propval_string(f, p, chunk_len); in write_propval()
278 write_propval_int(f, p, chunk_len, 1); in write_propval()
283 fprintf(f, pos == len ? "%s" : "%s,", in write_propval()
288 fprintf(f, ";"); in write_propval()
292 fprintf(f, " /* %s */", srcstr); in write_propval()
296 fprintf(f, "\n"); in write_propval()
299 static void write_tree_source_node(FILE *f, struct node *tree, int level) in write_tree_source_node() argument
306 write_prefix(f, level); in write_tree_source_node()
308 fprintf(f, "%s: ", l->label); in write_tree_source_node()
310 fprintf(f, "%s {", tree->name); in write_tree_source_node()
312 fprintf(f, "/ {"); in write_tree_source_node()
317 fprintf(f, " /* %s */", srcstr); in write_tree_source_node()
321 fprintf(f, "\n"); in write_tree_source_node()
324 write_prefix(f, level+1); in write_tree_source_node()
326 fprintf(f, "%s: ", l->label); in write_tree_source_node()
327 fprintf(f, "%s", prop->name); in write_tree_source_node()
328 write_propval(f, prop); in write_tree_source_node()
331 fprintf(f, "\n"); in write_tree_source_node()
332 write_tree_source_node(f, child, level+1); in write_tree_source_node()
334 write_prefix(f, level); in write_tree_source_node()
335 fprintf(f, "};"); in write_tree_source_node()
339 fprintf(f, " /* %s */", srcstr); in write_tree_source_node()
343 fprintf(f, "\n"); in write_tree_source_node()
346 void dt_to_source(FILE *f, struct dt_info *dti) in dt_to_source() argument
350 fprintf(f, "/dts-v1/;\n\n"); in dt_to_source()
356 fprintf(f, "%s: ", l->label); in dt_to_source()
357 fprintf(f, "/memreserve/\t0x%016llx 0x%016llx;\n", in dt_to_source()
362 write_tree_source_node(f, dti->dt, 0); in dt_to_source()