]> git.baikalelectronics.ru Git - kernel.git/commit
clk: ti: clkctrl: Fix hidden dependency to node name
authorTony Lindgren <tony@atomide.com>
Tue, 10 Dec 2019 17:21:04 +0000 (09:21 -0800)
committerTero Kristo <t-kristo@ti.com>
Mon, 20 Jan 2020 10:29:27 +0000 (12:29 +0200)
commit80d18659c77f32d3eee7115101c2476d2ade310a
tree098a217365488e59b101c74b0cfacd6a56d3711d
parent78837d8939ca37ea70fc0855a8fb706d41d3eb82
clk: ti: clkctrl: Fix hidden dependency to node name

We currently have a hidden dependency to the device tree node name for
the clkctrl clocks. Instead of using standard node name like "clock", we
must use "l4-per-clkctrl" type naming so the clock driver can find the
associated clock domain. Further, if "clk" is specified for a clock node
name, the driver sets TI_CLK_CLKCTRL_COMPAT flag that uses different
logic for the clock name based on the parent node name for the all the
clkctrl clocks for the SoC.

If the clock node naming dependency is not understood, the related
clockdomain is not found, or a wrong one can get used if a clock manager
has multiple clock domains.

As each clkctrl instance represents a single clock domain, let's allow
using domain specific compatible names to specify the clock domain.

This simplifies things and removes the hidden dependency to the node
name. And then later on, after the node names have been standardized,
we can drop the related code for parsing the node names.

Let's also update the binding to use standard "clock" node naming
instead of "clk" and add the missing description for reg.

Cc: devicetree@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Documentation/devicetree/bindings/clock/ti-clkctrl.txt
drivers/clk/ti/clk.c
drivers/clk/ti/clkctrl.c