On 20 June 2017 at 03:59, <patrice.chot...@st.com> wrote: > From: Patrice Chotard <patrice.chot...@st.com> > > This function is usefull to get phandle number contained > in a property list. > For example, this allows to allocate the right amount > of memory to keep clock's reference contained into the > "clocks" property. > > To implement it, either of_count_phandle_with_args() or > fdtdec_parse_phandle_with_args() are used respectively > for live tree and flat tree. > By passing index = -1, these 2 functions returns the > number of phandle contained into the property list. > > Signed-off-by: Patrice Chotard <patrice.chot...@st.com> > --- > > v7: _ add ofnode_count_phandle_with_args() which returns > the phandle number contained into a property list. > > > drivers/core/of_access.c | 7 +++++++ > drivers/core/ofnode.c | 12 ++++++++++++ > include/dm/of_access.h | 18 ++++++++++++++++++ > include/dm/ofnode.h | 17 +++++++++++++++++ > 4 files changed, 54 insertions(+)
Reviewed-by: Simon Glass <s...@chromium.org> _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot