[coreboot] [PATCH] [v3] add array parsing to dts

Ward Vandewege ward at gnu.org
Sun Apr 13 04:11:18 CEST 2008


On Thu, Apr 10, 2008 at 03:51:15AM +0200, Carl-Daniel Hailfinger wrote:
> On 10.04.2008 02:51, Ward Vandewege wrote:
> > With a lot of help from Stepan at the summit, this patch adds array parsing
> > support to the dts, specifically for the 'unwanted_vpci' field.
> >
> > The code is a bit of a hack - it matches against the field name to change
> > interpretation to array mode. Ideally we'd add some more type information
> > after the parsing of the dts, and use that to write out statictree.c.
> >
> > The dts parsing/generation code needs some love, so I'm not too worried about
> > the hackishness of this patch at this point. But if someone wants to improve
> > it, be my guest :)
> >   
> 
> It's great to have working code to demonstrate an idea.
> 
> However, I strongly disagree with the hardcoding of the string
> "unwanted_vpci" in several places in the code. Can't you use the
> "must_be_cells" designation in the prop_checker_table in
> util/dtc/livetree.c to handle this transparently?

Actually, the proper way to do it is to look at what we're parsing in the dts
files, store the type of the field in the 'data' struct, and write out the
proper statictree.s and statictree.h files based on that.

The attached patch does just that.

Note that for 'byte' properties, it just printes 'UNIMPLEMENTED, FIXME',
which will break the statictree output files. We don't use 'byte' properties
right now, and I'm not sure what to write out. Suggestions?

Thanks,
Ward.

-- 
Ward Vandewege <ward at fsf.org>
Free Software Foundation - Senior System Administrator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v3-dts-array2.patch
Type: text/x-diff
Size: 3823 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080412/dc765905/attachment.bin>


More information about the coreboot mailing list