Lines Matching refs:f

37 	yyin = current_srcfile->f;  in dt_from_source()
49 static void write_prefix(FILE *f, int level) in write_prefix() argument
54 fputc('\t', f); in write_prefix()
64 static void write_propval_string(FILE *f, struct data val) in write_propval_string() argument
74 fprintf(f, "%s: ", m->ref); in write_propval_string()
77 fprintf(f, "\""); in write_propval_string()
84 fprintf(f, "\\a"); in write_propval_string()
87 fprintf(f, "\\b"); in write_propval_string()
90 fprintf(f, "\\t"); in write_propval_string()
93 fprintf(f, "\\n"); in write_propval_string()
96 fprintf(f, "\\v"); in write_propval_string()
99 fprintf(f, "\\f"); in write_propval_string()
102 fprintf(f, "\\r"); in write_propval_string()
105 fprintf(f, "\\\\"); in write_propval_string()
108 fprintf(f, "\\\""); in write_propval_string()
111 fprintf(f, "\", "); in write_propval_string()
115 fprintf(f, "%s: ", m->ref); in write_propval_string()
119 fprintf(f, "\""); in write_propval_string()
123 fprintf(f, "%c", c); in write_propval_string()
125 fprintf(f, "\\x%02hhx", c); in write_propval_string()
128 fprintf(f, "\""); in write_propval_string()
133 fprintf(f, " %s:", m->ref); in write_propval_string()
137 static void write_propval_cells(FILE *f, struct data val) in write_propval_cells() argument
143 fprintf(f, "<"); in write_propval_cells()
148 fprintf(f, "%s: ", m->ref); in write_propval_cells()
153 fprintf(f, "0x%x", fdt32_to_cpu(*cp++)); in write_propval_cells()
156 fprintf(f, " "); in write_propval_cells()
162 fprintf(f, " %s:", m->ref); in write_propval_cells()
164 fprintf(f, ">"); in write_propval_cells()
167 static void write_propval_bytes(FILE *f, struct data val) in write_propval_bytes() argument
173 fprintf(f, "["); in write_propval_bytes()
177 fprintf(f, "%s: ", m->ref); in write_propval_bytes()
181 fprintf(f, "%02hhx", (unsigned char)(*bp++)); in write_propval_bytes()
184 fprintf(f, " "); in write_propval_bytes()
190 fprintf(f, " %s:", m->ref); in write_propval_bytes()
192 fprintf(f, "]"); in write_propval_bytes()
195 static void write_propval(FILE *f, struct property *prop) in write_propval() argument
205 fprintf(f, ";\n"); in write_propval()
223 fprintf(f, " = "); in write_propval()
226 write_propval_string(f, prop->val); in write_propval()
228 write_propval_cells(f, prop->val); in write_propval()
230 write_propval_bytes(f, prop->val); in write_propval()
233 fprintf(f, ";\n"); in write_propval()
236 static void write_tree_source_node(FILE *f, struct node *tree, int level) in write_tree_source_node() argument
242 write_prefix(f, level); in write_tree_source_node()
244 fprintf(f, "%s: ", l->label); in write_tree_source_node()
246 fprintf(f, "%s {\n", tree->name); in write_tree_source_node()
248 fprintf(f, "/ {\n"); in write_tree_source_node()
251 write_prefix(f, level+1); in write_tree_source_node()
253 fprintf(f, "%s: ", l->label); in write_tree_source_node()
254 fprintf(f, "%s", prop->name); in write_tree_source_node()
255 write_propval(f, prop); in write_tree_source_node()
258 fprintf(f, "\n"); in write_tree_source_node()
259 write_tree_source_node(f, child, level+1); in write_tree_source_node()
261 write_prefix(f, level); in write_tree_source_node()
262 fprintf(f, "};\n"); in write_tree_source_node()
266 void dt_to_source(FILE *f, struct dt_info *dti) in dt_to_source() argument
270 fprintf(f, "/dts-v1/;\n\n"); in dt_to_source()
276 fprintf(f, "%s: ", l->label); in dt_to_source()
277 fprintf(f, "/memreserve/\t0x%016llx 0x%016llx;\n", in dt_to_source()
282 write_tree_source_node(f, dti->dt, 0); in dt_to_source()