diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2020-09-10 18:26:17 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-09-22 12:54:13 -0600 |
commit | 01d89e3d12e07a1a1ee0f8528706441a84eee328 (patch) | |
tree | f690e7daeb0eae0db58b96a8261cb0cec1b4fe3b /drivers/core/of_access.c | |
parent | 3e15c315f97401f394ae83ed17fbef72b765222a (diff) | |
download | u-boot-01d89e3d12e07a1a1ee0f8528706441a84eee328.zip u-boot-01d89e3d12e07a1a1ee0f8528706441a84eee328.tar.gz u-boot-01d89e3d12e07a1a1ee0f8528706441a84eee328.tar.bz2 |
dm: add cells_count parameter in live DT APIs of_parse_phandle_with_args
In the live tree API ofnode_parse_phandle_with_args, the cell_count
argument must be used when cells_name is NULL.
But this argument is not provided to the live DT function
of_parse_phandle_with_args even it is provided to
fdtdec_parse_phandle_with_args.
This patch adds support of the cells_count parameter in dev_ and
of_node API to allow migration and support of live DT:
- of_parse_phandle_with_args
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/of_access.c')
-rw-r--r-- | drivers/core/of_access.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c index 922e78f..bcf1644 100644 --- a/drivers/core/of_access.c +++ b/drivers/core/of_access.c @@ -745,13 +745,14 @@ struct device_node *of_parse_phandle(const struct device_node *np, int of_parse_phandle_with_args(const struct device_node *np, const char *list_name, const char *cells_name, - int index, struct of_phandle_args *out_args) + int cell_count, int index, + struct of_phandle_args *out_args) { if (index < 0) return -EINVAL; - return __of_parse_phandle_with_args(np, list_name, cells_name, 0, - index, out_args); + return __of_parse_phandle_with_args(np, list_name, cells_name, + cell_count, index, out_args); } int of_count_phandle_with_args(const struct device_node *np, |