Skip to contentSkip to conversation

memory: tegra30-emc: Print additional memory info

PATCH Applied Dmitry Osipenko 2 participants 3 messages Dec 22, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 memory: tegra30-emc: Print additional memory info

Print out memory type and LPDDR2 configuration on Tegra30, making it similar to the memory info printed by the Tegra20 memory driver. This info is useful for debugging purposes.

---

Changelog:

v2: - Corrected swapped chip-select mask in emc_read_lpddr_mode_register().

 drivers/memory/tegra/Kconfig       |   1 +
 drivers/memory/tegra/tegra30-emc.c | 131 ++++++++++++++++++++++++++---
 2 files changed, 122 insertions(+), 10 deletions(-)
drivers/memory/tegra/Kconfig +1 -0
index 7951764b4efe..3fe83d7c2bf8 100644
@@ -28,6 +28,7 @@ config TEGRA30_EMC
 	default y
 	depends on ARCH_TEGRA_3x_SOC || COMPILE_TEST
 	select PM_OPP
+	select DDR
 	help
 	  This driver is for the External Memory Controller (EMC) found on
 	  Tegra30 chips. The EMC controls the external DRAM on the board.
drivers/memory/tegra/tegra30-emc.c +121 -10

205 lines not on this page · raw message

Signature · 1 line
2.33.1
#1 lore raw

PATCH v2 2/2 memory: tegra20-emc: Correct memory device mask

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.

---

Changelog:

v2: - New patch in v2.

 drivers/memory/tegra/tegra20-emc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/memory/tegra/tegra20-emc.c +1 -1
index 497b6edbf3ca..25ba3c5e4ad6 100644
@@ -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;
 
Signature · 1 line
2.33.1
#2 lore raw
In reply to Dmitry Osipenko
Quoted 5 lines · Dmitry Osipenko

Print out memory type and LPDDR2 configuration on Tegra30, making it similar to the memory info printed by the Tegra20 memory driver. This info is useful for debugging purposes.

Applied, thanks!

[1/2] memory: tegra30-emc: Print additional memory info

      commit: 23a0ea001466a9d063f65254110ac7f07f5c3937
[2/2] memory: tegra20-emc: Correct memory device mask
      commit: e2f01d07fad2c3fd3875a2d7dd62e1903fdf874c

Best regards,

Signature · 1 line
Krzysztof Kozlowski <[email protected]>