1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-26 16:13:55 +01:00

driver/ddr/fsl: Add address parity support for DDR4 UDIMM/discrete

Add support of address parity for DDR4 UDIMM or discrete memory.
It requires to configurate corresponding MR5[2:0] and
TIMING_CFG_7[PAR_LAT]. Parity can be turned on by hwconfig,
e.g. hwconfig=fsl_ddr:parity=on.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
This commit is contained in:
Shengzhou Liu
2016-03-10 17:36:56 +08:00
committed by York Sun
parent 5e8e27b743
commit eb118807a4
4 changed files with 82 additions and 8 deletions

View File

@@ -1002,8 +1002,19 @@ unsigned int populate_memctl_options(const common_timing_params_t *common_dimm,
popts->twot_en = 0;
popts->threet_en = 0;
/* for RDIMM, address parity enable */
popts->ap_en = 1;
/* for RDIMM and DDR4 UDIMM/discrete memory, address parity enable */
if (popts->registered_dimm_en)
popts->ap_en = 1; /* 0 = disable, 1 = enable */
else
popts->ap_en = 0; /* disabled for DDR4 UDIMM/discrete default */
if (hwconfig_sub_f("fsl_ddr", "parity", buf)) {
if (hwconfig_subarg_cmp_f("fsl_ddr", "parity", "on", buf)) {
if (popts->registered_dimm_en ||
(CONFIG_FSL_SDRAM_TYPE == SDRAM_TYPE_DDR4))
popts->ap_en = 1;
}
}
/*
* BSTTOPRE precharge interval