From: Dmitry Osipenko <digetx@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v1 1/4] memory: tegra: Fix missed registers values latching
Date: Fri, 12 Apr 2019 01:12:47 +0300 [thread overview]
Message-ID: <20190411221250.23233-2-digetx@gmail.com> (raw)
In-Reply-To: <20190411221250.23233-1-digetx@gmail.com>
Some of Memory Controller registers are shadowed and require latching in
order to copy assembly state into the active, MC_EMEM_ARB_CFG is one of
these registers.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
drivers/memory/tegra/mc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c
index 0a53598d982f..60474597180b 100644
--- a/drivers/memory/tegra/mc.c
+++ b/drivers/memory/tegra/mc.c
@@ -51,6 +51,9 @@
#define MC_EMEM_ADR_CFG 0x54
#define MC_EMEM_ADR_CFG_EMEM_NUMDEV BIT(0)
+#define MC_TIMING_CONTROL 0xfc
+#define MC_TIMING_UPDATE BIT(0)
+
static const struct of_device_id tegra_mc_of_match[] = {
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
{ .compatible = "nvidia,tegra20-mc-gart", .data = &tegra20_mc_soc },
@@ -301,6 +304,9 @@ static int tegra_mc_setup_latency_allowance(struct tegra_mc *mc)
writel(value, mc->regs + la->reg);
}
+ /* latch new values */
+ writel(MC_TIMING_UPDATE, mc->regs + MC_TIMING_CONTROL);
+
return 0;
}
--
2.21.0
next prev parent reply other threads:[~2019-04-11 22:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-11 22:12 [PATCH v1 0/4] memory: tegra: Fix memory arbitration programming Dmitry Osipenko
2019-04-11 22:12 ` Dmitry Osipenko [this message]
2019-04-11 22:12 ` [PATCH v1 2/4] memory: tegra: Fix integer overflow on tick value calculation Dmitry Osipenko
2019-04-11 22:12 ` [PATCH v1 3/4] memory: tegra: Replace readl-writel with mc_readl-mc_writel Dmitry Osipenko
2019-04-11 22:12 ` [PATCH v1 4/4] Revert "ARM: tegra: Restore memory arbitration on resume from LP1 on Tegra30+" Dmitry Osipenko
2019-04-18 9:37 ` [PATCH v1 0/4] memory: tegra: Fix memory arbitration programming Thierry Reding
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=20190411221250.23233-2-digetx@gmail.com \
--to=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).