Commit graph

62 commits

Author SHA1 Message Date
Jon Loeliger
e45e6fd274 DTC: Add support for a C-like #include "file" mechanism.
Keeps track of open files in a stack, and assigns
a filenum to source positions for each lexical token.
Modified error reporting to show source file as well.
No policy on file directory basis has been decided.
Still handles stdin.

Tested on all arch/powerpc/boot/dts DTS files

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-03-26 08:36:07 -05:00
Jon Loeliger
3948849fd0 Moved data_convert_cell() out of data.c to the parser.
It constructs a cell_t, not data objects.
Renamed it to cell_from_string() as well.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-02-16 09:33:54 -06:00
Jon Loeliger
af0278a3a0 Add support for decimal, octal and binary based cell values.
New syntax d#, b#, o# and h# allow for an explicit prefix
on cell values to specify their base.  Eg: <d# 123>

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-02-15 10:59:27 -06:00
David Gibson
32da475af1 Allow multipart property values
At present each property definition in a dts file must give as the
value either a string ("abc..."), a bytestring ([12abcd...]) or a cell
list (<1 2 3 ...>).  This patch allows a property value to be given as
several of these, comma-separated.  The final property value is just
the components appended together.  So a property could have a list of
cells followed by a string, or a bytestring followed by some cells.
Cells are always aligned, so if cells are given following a string or
bytestring which is not a multiple of 4 bytes long, zero bytes are
inserted to align the following cells.

The primary motivation for this feature, however, is to allow defining
a property as a list of several strings.  This is what's needed for
defining OF 'compatible' properties, and is less ugly and fiddly than
using embedded \0s in the strings.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-02-08 17:26:41 -06:00
David Gibson
f040d95b84 Rework tracking of reserve entries during processing. This is initial work
to allow more powerful handling of reserve entries.
2005-10-24 18:18:38 +10:00
David Gibson
86dbcbd1e4 Rudimentary support for reporting the line number of syntax errors. 2005-10-19 16:00:31 +10:00
David Gibson
f0517db250 Support for specifying memreserve ranges in the source format, based on
a patch by Jon Loeliger <jdl AT freescale.com>, although tweaked
substantially.
2005-07-15 17:14:24 +10:00
David Gibson
03a9b9dcdc Use u8 instead of uint8_t, as we do with the other size types. 2005-07-11 16:49:52 +10:00
David Gibson
9ad4587c90 Remove build_empty_property(). It wasn't useful. 2005-06-17 14:32:32 +10:00
David Gibson
81f2e89c75 Rudimentary phandle reference support. 2005-06-16 17:04:00 +10:00
David Gibson
4102d840d9 Initial label support. Also switch to glr-parser mode and get rid of
hacks that were necessary without it.
2005-06-16 14:36:37 +10:00
David Gibson
fc14dad769 Initial commit 2005-06-08 17:18:34 +10:00