« Previous | Next » 

Revision 97c38f8c


Added by Peter Maydell over 7 years ago

device_tree: Add qemu_devtree_setprop_sized_cells() utility functions

We already have a qemu_devtree_setprop_cells() which sets a dtb
property to an array of cells whose values are specified by varargs.
However for the fairly common case of setting a property to a list
of addresses or of address,size pairs the number of cells used by
each element in the list depends on the parent's #address-cells
and #size-cells properties. To make this easier we provide an analogous
qemu_devtree_setprop_sized_cells() macro which allows the number
of cells used by each element to be specified. This is implemented
using an underlying qemu_devtree_setprop_sized_cells_from_array()
function which takes the values and sizes as an array; this may
also be directly useful for cases where the cell contents are
constructed programmatically.

Signed-off-by: Peter Maydell <>
Reviewed-by: Peter Crosthwaite <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences