diff options
author | Tony Lindgren <tony@atomide.com> | 2024-02-13 12:48:52 +0200 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2024-02-26 13:08:45 +0200 |
commit | 4a5917cd504c7afd5e9de7166eb710687a9b026f (patch) | |
tree | ff7c9450aa2db9af0cd887820ba1157708239158 /drivers/clk/ti/divider.c | |
parent | 3516338543cafb658cbd235038c0047d2a8f3068 (diff) | |
download | linux-stable-4a5917cd504c7afd5e9de7166eb710687a9b026f.tar.gz linux-stable-4a5917cd504c7afd5e9de7166eb710687a9b026f.tar.bz2 linux-stable-4a5917cd504c7afd5e9de7166eb710687a9b026f.zip |
clk: ti: Improve clksel clock bit parsing for reg property
Because of legacy reasons, the TI clksel composite clocks can have
overlapping reg properties, and use a custom ti,bit-shift property.
For the clksel clocks we can start using of the standard reg property
instead of the custom ti,bit-shift property.
To do this, let's add a ti_clk_get_legacy_bit_shift() helper, and make
ti_clk_get_reg_addr() populate the clock bit offset.
This makes it possible to update the devicetree files to use the reg
property one clock at a time.
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/clk/ti/divider.c')
-rw-r--r-- | drivers/clk/ti/divider.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/clk/ti/divider.c b/drivers/clk/ti/divider.c index 5d5bb123ba94..ade99ab6cfa9 100644 --- a/drivers/clk/ti/divider.c +++ b/drivers/clk/ti/divider.c @@ -477,10 +477,7 @@ static int __init ti_clk_divider_populate(struct device_node *node, if (ret) return ret; - if (!of_property_read_u32(node, "ti,bit-shift", &val)) - div->shift = val; - else - div->shift = 0; + div->shift = div->reg.bit; if (!of_property_read_u32(node, "ti,latch-bit", &val)) div->latch = val; |