]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: tegra: Register the proper number of resets
authorThierry Reding <treding@nvidia.com>
Mon, 23 Mar 2015 09:57:46 +0000 (10:57 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 17 May 2015 23:12:18 +0000 (19:12 -0400)
commit06714fcfc019dfb9ff90cf5c1e450c54bf0a4ed3
tree6aca4842aba271dadff08dbf4b8d122598b5aaae
parent7b5b428d0b6a7ee1c81cf5929b44bd4354809234
clk: tegra: Register the proper number of resets

[ Upstream commit 5e43e259171e1eee8bc074d9c44be434e685087b ]

The number of resets controls is 32 times the number of peripheral
register banks rather than 32 times the number of clocks. This reduces
(drastically) the number of reset controls registered from 10080 (315
clocks * 32) to 224 (6 peripheral register banks * 32).

This also fixes a potential crash because trying to use any of the
excess reset controls (224-10079) would have caused accesses beyond
the array bounds of the peripheral register banks definition array.

Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Prashant Gaikwad <pgaikwad@nvidia.com>
Fixes: 6d5b988e7dc5 ("clk: tegra: implement a reset driver")
Cc: stable@vger.kernel.org # 3.14+
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/clk/tegra/clk.c