summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2020-09-25 10:41:14 +0300
committerSimon Glass <sjg@chromium.org>2020-10-06 18:07:54 +0300
commit89f68302cacaa41330959420d7329b7c89afdd88 (patch)
tree30d80261c2bc56c4a00a9cb49910ce0670ce7ad0 /drivers/clk
parent6d9949fe866751c527c5dafab5350af89b7b8332 (diff)
downloadu-boot-89f68302cacaa41330959420d7329b7c89afdd88.tar.xz
dm: add cells_count parameter in *_count_phandle_with_args
The cell_count argument is required when cells_name is NULL. This patch adds this parameter in live tree API - of_count_phandle_with_args - ofnode_count_phandle_with_args - dev_count_phandle_with_args This parameter solves issue when these API is used to count the number of element of a cell without cell name. This parameter allow to force the size cell. For example: count = dev_count_phandle_with_args(dev, "array", NULL, 3); Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/clk-uclass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 4076535271..31c5997aea 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -161,7 +161,7 @@ int clk_get_bulk(struct udevice *dev, struct clk_bulk *bulk)
bulk->count = 0;
- count = dev_count_phandle_with_args(dev, "clocks", "#clock-cells");
+ count = dev_count_phandle_with_args(dev, "clocks", "#clock-cells", 0);
if (count < 1)
return count;
@@ -213,7 +213,7 @@ static int clk_set_default_parents(struct udevice *dev, int stage)
int ret;
num_parents = dev_count_phandle_with_args(dev, "assigned-clock-parents",
- "#clock-cells");
+ "#clock-cells", 0);
if (num_parents < 0) {
debug("%s: could not read assigned-clock-parents for %p\n",
__func__, dev);