Commit 1b328a2e authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Stephen Boyd

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: 1eabdc2f ("clk: at91: add at91sam9x5 PMCs driver")
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
Cc: <stable@vger.kernel.org> # v4.20+
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 05c3ae7a
...@@ -144,8 +144,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np, ...@@ -144,8 +144,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
return; return;
at91sam9x5_pmc = pmc_data_allocate(PMC_MAIN + 1, at91sam9x5_pmc = pmc_data_allocate(PMC_MAIN + 1,
nck(at91sam9x5_systemck), nck(at91sam9x5_systemck), 31, 0);
nck(at91sam9x35_periphck), 0);
if (!at91sam9x5_pmc) if (!at91sam9x5_pmc)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment