The serie contains 2 updates within clkgen-fsyn and clkgen-mux
in order to allow those drivers to pick up the reg property
within their parent node instead of their own node. Such
behavior is already in place for the other st clk drivers and
to allow to not have several time the same reg value within
the device tree.
Those changes are also done in order to avoid DT warning seen
when compiling with W=1 and indicating unique-unit-address issues.
Alain Volmat (2):
clk: st: clkgen-fsyn: search reg within node or parent
clk: st: clkgen-mux: search reg within node or parent
drivers/clk/st/clkgen-fsyn.c | 11 +++++++++--
drivers/clk/st/clkgen-mux.c | 11 +++++++++--
2 files changed, 18 insertions(+), 4 deletions(-)
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
In order to avoid having duplicated addresses within the DT,
only have one unit-address per clockgen and each driver within
the clockgen should look at the parent node (overall clockgen)
to figure out the reg property. Such behavior is already in
place in other STi platform clock drivers such as clk-flexgen
and clkgen-pll. Keep backward compatibility by first looking
at reg within the node before looking into the parent node.
Signed-off-by: Alain Volmat <redacted>
---
drivers/clk/st/clkgen-fsyn.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
In order to avoid having duplicated addresses within the DT,
only have one unit-address per clockgen and each driver within
the clockgen should look at the parent node (overall clockgen)
to figure out the reg property. Such behavior is already in
place in other STi platform clock drivers such as clk-flexgen
and clkgen-pll. Keep backward compatibility by first looking
at reg within the node before looking into the parent node.
Signed-off-by: Alain Volmat <redacted>
---
drivers/clk/st/clkgen-fsyn.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
Ah one remark, reviewing the patch 2, i saw you added a pr_err() in case of error,
perhaps you can add one here also.
Patrice
On 12/15/21 11:03 AM, Patrice CHOTARD wrote:
Hi Alain
On 12/2/21 8:28 AM, Alain Volmat wrote:
quoted
In order to avoid having duplicated addresses within the DT,
only have one unit-address per clockgen and each driver within
the clockgen should look at the parent node (overall clockgen)
to figure out the reg property. Such behavior is already in
place in other STi platform clock drivers such as clk-flexgen
and clkgen-pll. Keep backward compatibility by first looking
at reg within the node before looking into the parent node.
Signed-off-by: Alain Volmat <redacted>
---
drivers/clk/st/clkgen-fsyn.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
In order to avoid having duplicated addresses within the DT,
only have one unit-address per clockgen and each driver within
the clockgen should look at the parent node (overall clockgen)
to figure out the reg property. Such behavior is already in
place in other STi platform clock drivers such as clk-flexgen
and clkgen-pll. Keep backward compatibility by first looking
at reg within the node before looking into the parent node.
Signed-off-by: Alain Volmat <redacted>
---
drivers/clk/st/clkgen-mux.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
@@ -57,10 +57,17 @@ static void __init st_of_clkgen_mux_setup(struct device_node *np,constchar**parents;intnum_parents=0;+/*+*Firstcheckforregpropertywithinthenodetokeepbackward+*compatibility,thenifregdoesn'texistlookattheparentnode+*/reg=of_iomap(np,0);if(!reg){-pr_err("%s: Failed to get base address\n",__func__);-return;+reg=of_iomap(of_get_parent(np),0);+if(!reg){+pr_err("%s: Failed to get base address\n",__func__);+return;+}}parents=clkgen_mux_get_parents(np,&num_parents);
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel