Skip to content

Commit 0d6c918

Browse files
ashishmhetre8krzk
authored andcommitted
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>
1 parent fe3b082 commit 0d6c918

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/memory/tegra/tegra186.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ static void tegra186_mc_client_sid_override(struct tegra_mc *mc,
7575
{
7676
u32 value, old;
7777

78+
if (client->regs.sid.security == 0 && client->regs.sid.override == 0)
79+
return;
80+
7881
value = readl(mc->regs + client->regs.sid.security);
7982
if ((value & MC_SID_STREAMID_SECURITY_OVERRIDE) == 0) {
8083
/*

0 commit comments

Comments
 (0)