From 44d3efedc81618e2d51ebbc2305ff020d1107988 Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Tue, 15 May 2018 17:42:54 -0500 Subject: Preserve datatype information when parsing dts The current code throws away all the data type and grouping information when parsing the DTS source file, which makes it difficult to reconstruct the data format when emitting a format that can express data types (ie. dts and yaml). Use the marker structure to mark the beginning of each integer array block (<> and []), and the datatype contained in each (8, 16, 32 & 64 bit widths). Signed-off-by: Grant Likely Reviewed-by: Simon Glass Reviewed-by: David Gibson [robh: s/MARKER_/TYPE_/] Signed-off-by: Rob Herring Signed-off-by: David Gibson --- dtc.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'dtc.h') diff --git a/dtc.h b/dtc.h index 6d66770..e648cdf 100644 --- a/dtc.h +++ b/dtc.h @@ -77,7 +77,14 @@ enum markertype { REF_PHANDLE, REF_PATH, LABEL, + TYPE_UINT8, + TYPE_UINT16, + TYPE_UINT32, + TYPE_UINT64, + TYPE_BLOB, + TYPE_STRING, }; +extern const char *markername(enum markertype markertype); struct marker { enum markertype type; -- cgit v1.1