[PATCH 1/9] ddr: imx8m: Fix DDR inline ECC scruber configuration
Peng Fan (OSS)
peng.fan at oss.nxp.com
Mon Jul 28 05:24:47 CEST 2025
From: Ye Li <ye.li at nxp.com>
The ECC scruber setting is incorrect and decreases the DDR performance
in ECC enabled mode.
Detail changes:
-Before, scrub_burst was 0; this is not allowed per SNPS umctl2 spec.
Set to "2" to align with DXL whichw as found to be most optimal setting
-Before, scrub_interval was set to 1, which means back-to-back scrubber
reads will occur very frequently, potentially effecting performance.
-Set scrub_interval to 0xFF which is the default value. However, users
can tune this to meet their system needs.
Signed-off-by: Ye Li <ye.li at nxp.com>
Signed-off-by: Oliver Chen <oliver.chen at nxp.com>
Reviewed-by: Peng Fan <peng.fan at nxp.com>
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
drivers/ddr/imx/imx8m/ddr_init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ddr/imx/imx8m/ddr_init.c b/drivers/ddr/imx/imx8m/ddr_init.c
index e9209ce8b61d7ed3507bc102cc8f57ebba077067..7fdcfee1d9c982d391fe0d20e373a66d71d26e23 100644
--- a/drivers/ddr/imx/imx8m/ddr_init.c
+++ b/drivers/ddr/imx/imx8m/ddr_init.c
@@ -58,9 +58,9 @@ void ddrc_inline_ecc_scrub(unsigned int start_address,
/* Step11: Disable SBR by programming SBRCTL.scrub_en=0 */
clrbits_le32(DDRC_SBRCTL(0), 0x1);
/* Step12: Prepare for normal scrub operation(Read) and set scrub_interval*/
- reg32_write(DDRC_SBRCTL(0), 0x100);
+ reg32_write(DDRC_SBRCTL(0), 0xFF20);
/* Step13: Enable the SBR by programming SBRCTL.scrub_en=1 */
- reg32_write(DDRC_SBRCTL(0), 0x101);
+ reg32_write(DDRC_SBRCTL(0), 0xFF21);
/* Step14: Enable AXI ports by programming */
reg32_write(DDRC_PCTRL_0(0), 0x1);
/* Step15: Disable quasi-dynamic programming */
--
2.35.3
More information about the U-Boot
mailing list