Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

memory: tegra30-emc: Fix dll_change check

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>
Link: https://patch.msgid.link/20260126-fix-emc-dllchange-v1-2-47ad3bb63262@nvidia.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

authored by

Mikko Perttunen and committed by
Krzysztof Kozlowski
0a93f235 9597ab9a

+3 -3
+3 -3
drivers/memory/tegra/tegra30-emc.c
··· 554 554 emc->emc_cfg = readl_relaxed(emc->regs + EMC_CFG); 555 555 emc_dbg = readl_relaxed(emc->regs + EMC_DBG); 556 556 557 - if (emc->dll_on == !!(timing->emc_mode_1 & 0x1)) 557 + if (emc->dll_on == !(timing->emc_mode_1 & 0x1)) 558 558 dll_change = DLL_CHANGE_NONE; 559 - else if (timing->emc_mode_1 & 0x1) 559 + else if (!(timing->emc_mode_1 & 0x1)) 560 560 dll_change = DLL_CHANGE_ON; 561 561 else 562 562 dll_change = DLL_CHANGE_OFF; 563 563 564 - emc->dll_on = !!(timing->emc_mode_1 & 0x1); 564 + emc->dll_on = !(timing->emc_mode_1 & 0x1); 565 565 566 566 if (timing->data[80] && !readl_relaxed(emc->regs + EMC_ZCAL_INTERVAL)) 567 567 emc->zcal_long = true;