diff options
Diffstat (limited to 'scripts/dtc/dtc.h')
-rw-r--r-- | scripts/dtc/dtc.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h index 6d667701ab6a..cbe541525c2c 100644 --- a/scripts/dtc/dtc.h +++ b/scripts/dtc/dtc.h | |||
@@ -74,10 +74,17 @@ typedef uint32_t cell_t; | |||
74 | 74 | ||
75 | /* Data blobs */ | 75 | /* Data blobs */ |
76 | enum markertype { | 76 | enum markertype { |
77 | TYPE_NONE, | ||
77 | REF_PHANDLE, | 78 | REF_PHANDLE, |
78 | REF_PATH, | 79 | REF_PATH, |
79 | LABEL, | 80 | LABEL, |
81 | TYPE_UINT8, | ||
82 | TYPE_UINT16, | ||
83 | TYPE_UINT32, | ||
84 | TYPE_UINT64, | ||
85 | TYPE_STRING, | ||
80 | }; | 86 | }; |
87 | extern const char *markername(enum markertype markertype); | ||
81 | 88 | ||
82 | struct marker { | 89 | struct marker { |
83 | enum markertype type; | 90 | enum markertype type; |
@@ -101,6 +108,8 @@ struct data { | |||
101 | for_each_marker(m) \ | 108 | for_each_marker(m) \ |
102 | if ((m)->type == (t)) | 109 | if ((m)->type == (t)) |
103 | 110 | ||
111 | size_t type_marker_length(struct marker *m); | ||
112 | |||
104 | void data_free(struct data d); | 113 | void data_free(struct data d); |
105 | 114 | ||
106 | struct data data_grow_for(struct data d, int xlen); | 115 | struct data data_grow_for(struct data d, int xlen); |
@@ -290,6 +299,10 @@ struct dt_info *dt_from_blob(const char *fname); | |||
290 | void dt_to_source(FILE *f, struct dt_info *dti); | 299 | void dt_to_source(FILE *f, struct dt_info *dti); |
291 | struct dt_info *dt_from_source(const char *f); | 300 | struct dt_info *dt_from_source(const char *f); |
292 | 301 | ||
302 | /* YAML source */ | ||
303 | |||
304 | void dt_to_yaml(FILE *f, struct dt_info *dti); | ||
305 | |||
293 | /* FS trees */ | 306 | /* FS trees */ |
294 | 307 | ||
295 | struct dt_info *dt_from_fs(const char *dirname); | 308 | struct dt_info *dt_from_fs(const char *dirname); |