dtc: Allow multiple dts-v1 tag

Some dts are including dtsi that also contain a /dts-v1/ tag at the
top. GNU DTC doesn't seems to have a problem with that so fix our
dtc to behave the same.

Reviewed by:	kevans
MFC after:	1 week
This commit is contained in:
Emmanuel Vadot 2019-10-26 17:10:27 +00:00
parent 499fe48de8
commit c571e05c2c

View File

@ -1563,11 +1563,11 @@ device_tree::parse_file(text_input_buffer &input,
{
input.next_token();
// Read the header
if (input.consume("/dts-v1/;"))
while (input.consume("/dts-v1/;"))
{
read_header = true;
input.next_token();
}
input.next_token();
if (input.consume("/plugin/;"))
{
is_plugin = true;