Commit 1854d8ef authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Greg Kroah-Hartman

clk: at91: fix at91sam9x5 peripheral clock number

commit 1b328a2e upstream.

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 <[email protected]>
Acked-by: default avatarNicolas Ferre <[email protected]>
Cc: <[email protected]> # v4.20+
Signed-off-by: default avatarStephen Boyd <[email protected]>
Signed-off-by: default avatarGreg Kroah-Hartman <[email protected]>
parent 15ff5c78
......@@ -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;
......
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