Lines Matching full: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()
46 || strchr("\a\b\t\n\v\f\r", c)); in isstring()
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()
77 case '\f': 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()
175 static void write_propval(FILE *f, struct property *prop) in write_propval() argument
184 fprintf(f, ";"); in write_propval()
188 fprintf(f, " /* %s */", srcstr); in write_propval()
192 fprintf(f, "\n"); in write_propval()
196 fprintf(f, " ="); in write_propval()
215 fprintf(f, " %s", delim_start[emit_type]); in write_propval()
217 fprintf(f, " %s:", m->ref); in write_propval()
224 write_propval_int(f, p, chunk_len, 2); in write_propval()
234 fprintf(f, "&{%s}", m_phandle->ref); in write_propval()
236 fprintf(f, "&%s", m_phandle->ref); in write_propval()
238 fputc(' ', f); in write_propval()
239 write_propval_int(f, p + 4, chunk_len - 4, 4); in write_propval()
242 write_propval_int(f, p, chunk_len, 4); in write_propval()
246 write_propval_int(f, p, chunk_len, 8); in write_propval()
249 write_propval_string(f, p, chunk_len); in write_propval()
252 write_propval_int(f, p, chunk_len, 1); in write_propval()
257 fprintf(f, pos == len ? "%s" : "%s,", in write_propval()
262 fprintf(f, ";"); in write_propval()
266 fprintf(f, " /* %s */", srcstr); in write_propval()
270 fprintf(f, "\n"); in write_propval()
273 static void write_tree_source_node(FILE *f, struct node *tree, int level) in write_tree_source_node() argument
280 write_prefix(f, level); in write_tree_source_node()
282 fprintf(f, "%s: ", l->label); in write_tree_source_node()
284 fprintf(f, "%s {", tree->name); in write_tree_source_node()
286 fprintf(f, "/ {"); in write_tree_source_node()
291 fprintf(f, " /* %s */", srcstr); in write_tree_source_node()
295 fprintf(f, "\n"); in write_tree_source_node()
298 write_prefix(f, level+1); in write_tree_source_node()
300 fprintf(f, "%s: ", l->label); in write_tree_source_node()
301 fprintf(f, "%s", prop->name); in write_tree_source_node()
302 write_propval(f, prop); in write_tree_source_node()
305 fprintf(f, "\n"); in write_tree_source_node()
306 write_tree_source_node(f, child, level+1); in write_tree_source_node()
308 write_prefix(f, level); in write_tree_source_node()
309 fprintf(f, "};"); in write_tree_source_node()
313 fprintf(f, " /* %s */", srcstr); in write_tree_source_node()
317 fprintf(f, "\n"); in write_tree_source_node()
320 void dt_to_source(FILE *f, struct dt_info *dti) in dt_to_source() argument
324 fprintf(f, "/dts-v1/;\n\n"); in dt_to_source()
330 fprintf(f, "%s: ", l->label); in dt_to_source()
331 fprintf(f, "/memreserve/\t0x%016llx 0x%016llx;\n", in dt_to_source()
336 write_tree_source_node(f, dti->dt, 0); in dt_to_source()