Skip to contentSkip to conversation

board: phytec: k3: k3_ddrss_patch: Add ddr phy reg count

PATCH In review Dominik Haller 3 participants 3 messages Jul 2, 2024 – Jul 11, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: phytec: k3: k3_ddrss_patch: Add ddr phy reg count

Add and use the correct number of ddr phy registers to update the corresponding settings.

Fixes cbf5c99ef317 ("board: phytec: common: Introduce a method to inject DDR timings deltas")
---
 board/phytec/common/k3/k3_ddrss_patch.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
board/phytec/common/k3/k3_ddrss_patch.c +2 -1
index 39f7be8dc922..5afe5a20c7f3 100644
@@ -12,6 +12,7 @@
 #ifdef CONFIG_K3_AM64_DDRSS
 #define LPDDR4_INTR_CTL_REG_COUNT (423U)
 #define LPDDR4_INTR_PHY_INDEP_REG_COUNT (345U)
+#define LPDDR4_INTR_PHY_REG_COUNT (1406U)
 #endif
 
 static int fdt_setprop_inplace_idx_u32(void *fdt, int nodeoffset,
@@ -54,7 +55,7 @@ int fdt_apply_ddrss_timings_patch(void *fdt, struct ddrss *ddrss)
 					return ret;
 			}
 
-	for (i = 0; i < LPDDR4_INTR_PHY_INDEP_REG_COUNT; i++)
+	for (i = 0; i < LPDDR4_INTR_PHY_REG_COUNT; i++)
 		for (j = 0; j < ddrss->phy_regs_num; j++)
 			if (i == ddrss->phy_regs[j].off) {
 				ret = fdt_setprop_inplace_idx_u32(fdt,
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

Am 02.07.24 um 11:22 schrieb Dominik Haller:

Quoted 5 lines

Add and use the correct number of ddr phy registers to update the corresponding settings.

Fixes cbf5c99ef317 ("board: phytec: common: Introduce a method to inject DDR timings deltas")
Quoted 25 lines
---
  board/phytec/common/k3/k3_ddrss_patch.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
board/phytec/common/k3/k3_ddrss_patch.c +2 -1
index 39f7be8dc922..5afe5a20c7f3 100644
@@ -12,6 +12,7 @@
  #ifdef CONFIG_K3_AM64_DDRSS
  #define LPDDR4_INTR_CTL_REG_COUNT (423U)
  #define LPDDR4_INTR_PHY_INDEP_REG_COUNT (345U)
+#define LPDDR4_INTR_PHY_REG_COUNT (1406U)
  #endif
 
  static int fdt_setprop_inplace_idx_u32(void *fdt, int nodeoffset,
@@ -54,7 +55,7 @@ int fdt_apply_ddrss_timings_patch(void *fdt, struct ddrss *ddrss)
  					return ret;
  			}
 
-	for (i = 0; i < LPDDR4_INTR_PHY_INDEP_REG_COUNT; i++)
+	for (i = 0; i < LPDDR4_INTR_PHY_REG_COUNT; i++)
  		for (j = 0; j < ddrss->phy_regs_num; j++)
  			if (i == ddrss->phy_regs[j].off) {
  				ret = fdt_setprop_inplace_idx_u32(fdt,
#2 lore raw
In reply to Dominik Haller
Quoted 4 lines · Dominik Haller

Add and use the correct number of ddr phy registers to update the corresponding settings.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom