clk/ast2600: Fix soc revision for AHB
authorJoel Stanley <joel@jms.id.au>
Wed, 22 Sep 2021 23:54:49 +0000 (09:24 +0930)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 08:48:32 +0000 (09:48 +0100)
commitc4584223f5de309c0dae2df1ac412ac9a99a6e07
tree42a32ed7d38eebec5aeb03bbb59031d36f1926da
parent3024018bb2df1c709b8b959e7f7719e30b49092e
clk/ast2600: Fix soc revision for AHB

[ Upstream commit f45c5b1c27293f834682e89003f88b3512329ab4 ]

Move the soc revision parsing to the initial probe, saving the driver
from parsing the register multiple times.

Use this variable to select the correct divisor table for the AHB clock.
Before this fix the A2 would have used the A0 table.

Fixes: 2d491066ccd4 ("clk: ast2600: Fix AHB clock divider for A1")
Signed-off-by: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20210922235449.213631-1-joel@jms.id.au
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/clk-ast2600.c