• Thierry Reding's avatar
    clk: tegra: Register the proper number of resets · 2bab5a65
    Thierry Reding authored
    commit 5e43e259 upstream.
    
    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: 6d5b988e ("clk: tegra: implement a reset driver")
    Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
    Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
    2bab5a65
clk.c 7.33 KB