summaryrefslogtreecommitdiffstats
path: root/drivers/clk/at91
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2019-02-19 17:51:14 +0100
committerStephen Boyd <sboyd@kernel.org>2019-02-20 20:34:24 +0100
commit1b328a2e095a009518ebac05e937cc0fc242fede (patch)
tree2cc85a0f9758fa9e181a871f4d818189ee8ff223 /drivers/clk/at91
parentMerge tag 'sunxi-clk-fixes-for-5.0' of https://git.kernel.org/pub/scm/linux/k... (diff)
downloadlinux-1b328a2e095a009518ebac05e937cc0fc242fede.tar.xz
linux-1b328a2e095a009518ebac05e937cc0fc242fede.zip
clk: at91: fix at91sam9x5 peripheral clock number
nck() looks at the last id in an array and unfortunately, at91sam9x35_periphck has a sentinel, hence the id is 0 and the calculated number of peripheral clocks is 1 instead of a maximum of 31. Fixes: 1eabdc2f9dd8 ("clk: at91: add at91sam9x5 PMCs driver") Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Cc: <stable@vger.kernel.org> # v4.20+ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/at91')
-rw-r--r--drivers/clk/at91/at91sam9x5.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c
index 2fe225a697df..d37e7ed9eb90 100644
--- a/drivers/clk/at91/at91sam9x5.c
+++ b/drivers/clk/at91/at91sam9x5.c
@@ -144,8 +144,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
return;
at91sam9x5_pmc = pmc_data_allocate(PMC_MAIN + 1,
- nck(at91sam9x5_systemck),
- nck(at91sam9x35_periphck), 0);
+ nck(at91sam9x5_systemck), 31, 0);
if (!at91sam9x5_pmc)
return;