summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2021-12-22 07:32:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-13 12:50:34 +0100
commitad73b43e6908321433eec18c3bd3968a8008f662 (patch)
tree880db37ed409bc0016d32489f1b1c122d64ed70f /drivers
parent12a1cf9db1785f4d25b7852eaad612df917c885c (diff)
downloadlinux-ad73b43e6908321433eec18c3bd3968a8008f662.tar.gz
linux-ad73b43e6908321433eec18c3bd3968a8008f662.tar.bz2
linux-ad73b43e6908321433eec18c3bd3968a8008f662.zip
memory: tegra20-emc: Correct memory device mask
commit 9ff684342ee7d3ea2755c6e9b60bc43085baa3ad upstream. Memory chip select is swapped when we read mode register, correct it. We didn't have devices that use a single LPDDR chip and both chips are always identical, hence this change is just a minor improvement. Fixes: 131dd9a436d8 ("memory: tegra20-emc: Support matching timings by LPDDR2 configuration") Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20211222043215.28237-2-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/memory/tegra/tegra20-emc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c
index 2ac074b96f85..636ed37a4f66 100644
--- a/drivers/memory/tegra/tegra20-emc.c
+++ b/drivers/memory/tegra/tegra20-emc.c
@@ -540,7 +540,7 @@ static int emc_read_lpddr_mode_register(struct tegra_emc *emc,
unsigned int register_addr,
unsigned int *register_data)
{
- u32 memory_dev = emem_dev + 1;
+ u32 memory_dev = emem_dev ? 1 : 2;
u32 val, mr_mask = 0xff;
int err;