On 6 July 2012 02:56, Peter Crosthwaite <peter.crosthwa...@petalogix.com> wrote: > On Fri, Jul 6, 2012 at 3:00 AM, Peter Maydell <peter.mayd...@linaro.org> > wrote: >> +uint32_t qemu_devtree_getprop_cell(void *fdt, const char *node_path, >> + const char *property) > > Hi Peter, > > Can we generalise and get functionality for reading cells with offsets > as well? Your function assumes (and asserts) that the property is a > single cell, but can we add a index parameter for reading a non-0th > property out of a multi-cell prop? Needed for reading things like > ranges, regs and interrupt properties.
We could, but in this instance I was just following the pattern of the existing qemu_devtree_setprop_cell(), which also works only on single-celled properties. Maybe 'set one cell in a multicell prop' should be qemu_devtree_setprop_one_cell() ? -- PMM