* [PATCH 0/2] memory: tegra: Fix DLL setting in EMC sequences
@ 2026-01-26 6:50 Mikko Perttunen
2026-01-26 6:50 ` [PATCH 1/2] memory: tegra124-emc: Fix dll_change check Mikko Perttunen
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Mikko Perttunen @ 2026-01-26 6:50 UTC (permalink / raw)
To: Thierry Reding, Jonathan Hunter
Cc: Krzysztof Kozlowski, Svyatoslav Ryhel, linux-tegra, linux-kernel,
Thierry Reding, Mikko Perttunen
The code related to DLL setting change is incorrect in the Tegra30/
Tegra124 EMC sequences -- fix them.
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
---
Mikko Perttunen (2):
memory: tegra124-emc: Fix dll_change check
memory: tegra30-emc: Fix dll_change check
drivers/memory/tegra/tegra124-emc.c | 2 +-
drivers/memory/tegra/tegra30-emc.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
---
base-commit: a0c666c25aeefd16f4b088c6549a6fb6b65a8a1d
change-id: 20251126-fix-emc-dllchange-c2ff94dc7980
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] memory: tegra124-emc: Fix dll_change check
2026-01-26 6:50 [PATCH 0/2] memory: tegra: Fix DLL setting in EMC sequences Mikko Perttunen
@ 2026-01-26 6:50 ` Mikko Perttunen
2026-01-26 6:50 ` [PATCH 2/2] memory: tegra30-emc: " Mikko Perttunen
2026-02-24 11:01 ` [PATCH 0/2] memory: tegra: Fix DLL setting in EMC sequences Krzysztof Kozlowski
2 siblings, 0 replies; 4+ messages in thread
From: Mikko Perttunen @ 2026-01-26 6:50 UTC (permalink / raw)
To: Thierry Reding, Jonathan Hunter
Cc: Krzysztof Kozlowski, Svyatoslav Ryhel, linux-tegra, linux-kernel,
Thierry Reding, Mikko Perttunen
The code checking whether the specified memory timing enables DLL
in the EMRS register was reversed. DLL is enabled if bit A0 is low.
Fix the check.
Fixes: 73a7f0a90641 ("memory: tegra: Add EMC (external memory controller) driver")
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
---
drivers/memory/tegra/tegra124-emc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c
index 9978ff911c47..05d0d8527961 100644
--- a/drivers/memory/tegra/tegra124-emc.c
+++ b/drivers/memory/tegra/tegra124-emc.c
@@ -608,7 +608,7 @@ static int tegra124_emc_prepare_timing_change(struct tegra_emc *emc,
if ((last->emc_mode_1 & 0x1) == (timing->emc_mode_1 & 0x1))
dll_change = DLL_CHANGE_NONE;
- else if (timing->emc_mode_1 & 0x1)
+ else if (!(timing->emc_mode_1 & 0x1))
dll_change = DLL_CHANGE_ON;
else
dll_change = DLL_CHANGE_OFF;
--
2.52.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/2] memory: tegra30-emc: Fix dll_change check
2026-01-26 6:50 [PATCH 0/2] memory: tegra: Fix DLL setting in EMC sequences Mikko Perttunen
2026-01-26 6:50 ` [PATCH 1/2] memory: tegra124-emc: Fix dll_change check Mikko Perttunen
@ 2026-01-26 6:50 ` Mikko Perttunen
2026-02-24 11:01 ` [PATCH 0/2] memory: tegra: Fix DLL setting in EMC sequences Krzysztof Kozlowski
2 siblings, 0 replies; 4+ messages in thread
From: Mikko Perttunen @ 2026-01-26 6:50 UTC (permalink / raw)
To: Thierry Reding, Jonathan Hunter
Cc: Krzysztof Kozlowski, Svyatoslav Ryhel, linux-tegra, linux-kernel,
Thierry Reding, Mikko Perttunen
The code checking whether the specified memory timing enables DLL
in the EMRS register was reversed. DLL is enabled if bit A0 is low.
Fix the check.
Fixes: e34212c75a68 ("memory: tegra: Introduce Tegra30 EMC driver")
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
---
drivers/memory/tegra/tegra30-emc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/memory/tegra/tegra30-emc.c b/drivers/memory/tegra/tegra30-emc.c
index 914116d8ec16..2c32d28156e0 100644
--- a/drivers/memory/tegra/tegra30-emc.c
+++ b/drivers/memory/tegra/tegra30-emc.c
@@ -554,14 +554,14 @@ static int emc_prepare_timing_change(struct tegra_emc *emc, unsigned long rate)
emc->emc_cfg = readl_relaxed(emc->regs + EMC_CFG);
emc_dbg = readl_relaxed(emc->regs + EMC_DBG);
- if (emc->dll_on == !!(timing->emc_mode_1 & 0x1))
+ if (emc->dll_on == !(timing->emc_mode_1 & 0x1))
dll_change = DLL_CHANGE_NONE;
- else if (timing->emc_mode_1 & 0x1)
+ else if (!(timing->emc_mode_1 & 0x1))
dll_change = DLL_CHANGE_ON;
else
dll_change = DLL_CHANGE_OFF;
- emc->dll_on = !!(timing->emc_mode_1 & 0x1);
+ emc->dll_on = !(timing->emc_mode_1 & 0x1);
if (timing->data[80] && !readl_relaxed(emc->regs + EMC_ZCAL_INTERVAL))
emc->zcal_long = true;
--
2.52.0
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] memory: tegra: Fix DLL setting in EMC sequences
2026-01-26 6:50 [PATCH 0/2] memory: tegra: Fix DLL setting in EMC sequences Mikko Perttunen
2026-01-26 6:50 ` [PATCH 1/2] memory: tegra124-emc: Fix dll_change check Mikko Perttunen
2026-01-26 6:50 ` [PATCH 2/2] memory: tegra30-emc: " Mikko Perttunen
@ 2026-02-24 11:01 ` Krzysztof Kozlowski
2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-24 11:01 UTC (permalink / raw)
To: Thierry Reding, Jonathan Hunter, Mikko Perttunen
Cc: Svyatoslav Ryhel, linux-tegra, linux-kernel, Thierry Reding
On Mon, 26 Jan 2026 15:50:41 +0900, Mikko Perttunen wrote:
> The code related to DLL setting change is incorrect in the Tegra30/
> Tegra124 EMC sequences -- fix them.
>
>
Applied, thanks!
[1/2] memory: tegra124-emc: Fix dll_change check
https://git.kernel.org/krzk/linux-mem-ctrl/c/53f3329cd35797056ab915e8bc1c723ec38e2907
[2/2] memory: tegra30-emc: Fix dll_change check
https://git.kernel.org/krzk/linux-mem-ctrl/c/3c6133ece23b5c3f90fe90c9e524bc322c52c921
Best regards,
--
Krzysztof Kozlowski <krzk@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-02-24 11:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-26 6:50 [PATCH 0/2] memory: tegra: Fix DLL setting in EMC sequences Mikko Perttunen
2026-01-26 6:50 ` [PATCH 1/2] memory: tegra124-emc: Fix dll_change check Mikko Perttunen
2026-01-26 6:50 ` [PATCH 2/2] memory: tegra30-emc: " Mikko Perttunen
2026-02-24 11:01 ` [PATCH 0/2] memory: tegra: Fix DLL setting in EMC sequences Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®