diff options
author | Ashish Mhetre <amhetre@nvidia.com> | 2023-11-07 14:27:13 +0300 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2023-11-21 12:09:28 +0300 |
commit | 0d6c918011ce4764ed277de4726a468b7ffe5fed (patch) | |
tree | a121bf0bb54be8157fce8044e1084eb5e370ab60 /drivers/memory/tegra | |
parent | fe3b082a6eb8b1526ed7397c849d6b2a6baeb6a1 (diff) | |
download | linux-0d6c918011ce4764ed277de4726a468b7ffe5fed.tar.xz |
memory: tegra: Skip SID programming if SID registers aren't set
There are few MC clients where SID security and override register
offsets are not specified like "sw_cluster0" in tegra234. Don't program
SID override for such clients because it leads to access to invalid
addresses.
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Link: https://lore.kernel.org/r/20231107112713.21399-2-amhetre@nvidia.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Diffstat (limited to 'drivers/memory/tegra')
-rw-r--r-- | drivers/memory/tegra/tegra186.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/memory/tegra/tegra186.c b/drivers/memory/tegra/tegra186.c index 8203f0db1350..d1f1dfb42716 100644 --- a/drivers/memory/tegra/tegra186.c +++ b/drivers/memory/tegra/tegra186.c @@ -75,6 +75,9 @@ static void tegra186_mc_client_sid_override(struct tegra_mc *mc, { u32 value, old; + if (client->regs.sid.security == 0 && client->regs.sid.override == 0) + return; + value = readl(mc->regs + client->regs.sid.security); if ((value & MC_SID_STREAMID_SECURITY_OVERRIDE) == 0) { /* |