From: Jon Hunter <jonathanh@nvidia.com>
To: Ashish Mhetre <amhetre@nvidia.com>,
krzk@kernel.org, thierry.reding@kernel.org
Cc: ketanp@nvidia.com, linux-kernel@vger.kernel.org,
linux-tegra@vger.kernel.org
Subject: Re: [PATCH V3 3/3] memory: tegra: Restore MC interrupt masks on resume
Date: Thu, 30 Apr 2026 12:42:03 +0100 [thread overview]
Message-ID: <df25dd7a-1f59-4fd5-bdae-ba3a99e700f1@nvidia.com> (raw)
In-Reply-To: <20260430095202.1167651-4-amhetre@nvidia.com>
On 30/04/2026 10:52, Ashish Mhetre wrote:
> The MC interrupt mask registers lose their state across SC7. Without
SC7 may not mean anything to anyone that is not familiar with Tegra. I
often refer to this as 'Tegra low power suspend state (aka. SC7)'. Or we
can just simply say 'suspend' instead of 'SC7'.
Krzysztof, do you want use to clarify this and update the commit message?
> re-applying them on resume, MC interrupts that were enabled at probe
> remain masked after wake, so any post-resume MC error goes unreported.
>
> Factor the existing intmask programming out of tegra_mc_probe() into
> tegra_mc_setup_intmask() and reuse it from the system resume callback
> so the mask state is restored on wake.
>
> Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
> ---
> drivers/memory/tegra/mc.c | 23 ++++++++++++++++-------
> 1 file changed, 16 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c
> index 64e41338cdf2..cfcfc7291106 100644
> --- a/drivers/memory/tegra/mc.c
> +++ b/drivers/memory/tegra/mc.c
> @@ -911,6 +911,19 @@ static void tegra_mc_num_channel_enabled(struct tegra_mc *mc)
> }
> }
>
> +static void tegra_mc_setup_intmask(struct tegra_mc *mc)
> +{
> + unsigned int i;
> +
> + for (i = 0; i < mc->soc->num_intmasks; i++) {
> + if (mc->soc->num_channels)
> + mc_ch_writel(mc, MC_BROADCAST_CHANNEL, mc->soc->intmasks[i].mask,
> + mc->soc->intmasks[i].reg);
> + else
> + mc_writel(mc, mc->soc->intmasks[i].mask, mc->soc->intmasks[i].reg);
> + }
> +}
> +
> static int tegra_mc_probe(struct platform_device *pdev)
> {
> struct tegra_mc *mc;
> @@ -971,13 +984,7 @@ static int tegra_mc_probe(struct platform_device *pdev)
> }
> }
>
> - for (i = 0; i < mc->soc->num_intmasks; i++) {
> - if (mc->soc->num_channels)
> - mc_ch_writel(mc, MC_BROADCAST_CHANNEL, mc->soc->intmasks[i].mask,
> - mc->soc->intmasks[i].reg);
> - else
> - mc_writel(mc, mc->soc->intmasks[i].mask, mc->soc->intmasks[i].reg);
> - }
> + tegra_mc_setup_intmask(mc);
> }
>
> if (mc->soc->reset_ops) {
> @@ -1018,6 +1025,8 @@ static int tegra_mc_resume(struct device *dev)
> if (mc->soc->ops && mc->soc->ops->resume)
> mc->soc->ops->resume(mc);
>
> + tegra_mc_setup_intmask(mc);
> +
> return 0;
> }
>
Otherwise this looks good to me.
Jon
--
nvpublic
next prev parent reply other threads:[~2026-04-30 11:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 9:51 [PATCH V3 0/3] memory: tegra: Restore MC state on system resume Ashish Mhetre
2026-04-30 9:52 ` [PATCH V3 1/3] memory: tegra: Make ->resume() callback return void Ashish Mhetre
2026-04-30 9:52 ` [PATCH V3 2/3] memory: tegra: Wire up system sleep PM ops Ashish Mhetre
2026-04-30 9:52 ` [PATCH V3 3/3] memory: tegra: Restore MC interrupt masks on resume Ashish Mhetre
2026-04-30 11:42 ` Jon Hunter [this message]
2026-05-01 9:26 ` Krzysztof Kozlowski
2026-05-01 10:29 ` [PATCH V3 0/3] memory: tegra: Restore MC state on system resume Jon Hunter
2026-05-04 17:48 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=df25dd7a-1f59-4fd5-bdae-ba3a99e700f1@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=amhetre@nvidia.com \
--cc=ketanp@nvidia.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox