* [U-Boot] [PATCH] driver/ddr/fsl: Check condition for erratum A-009803
@ 2016-05-25 8:15 Shengzhou Liu
2016-06-04 5:06 ` York Sun
0 siblings, 1 reply; 2+ messages in thread
From: Shengzhou Liu @ 2016-05-25 8:15 UTC (permalink / raw)
To: u-boot
Add condition of checking the enabled of address parity
for erratum A-009803, if parity is not enabled, the
workaround of erratum A-009803 should not be applied.
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
---
drivers/ddr/fsl/fsl_ddr_gen4.c | 42 +++++++++++++++++++++++-------------------
1 file changed, 23 insertions(+), 19 deletions(-)
diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c
index 608810d..fa9ced6 100644
--- a/drivers/ddr/fsl/fsl_ddr_gen4.c
+++ b/drivers/ddr/fsl/fsl_ddr_gen4.c
@@ -205,12 +205,14 @@ void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,
#ifdef CONFIG_SYS_FSL_ERRATUM_A009803
/* part 1 of 2 */
- if (regs->ddr_sdram_cfg & SDRAM_CFG_RD_EN) { /* for RDIMM */
- ddr_out32(&ddr->ddr_sdram_rcw_2,
- regs->ddr_sdram_rcw_2 & ~0x0f000000);
+ if (regs->ddr_sdram_cfg_2 & SDRAM_CFG2_AP_EN) {
+ if (regs->ddr_sdram_cfg & SDRAM_CFG_RD_EN) { /* for RDIMM */
+ ddr_out32(&ddr->ddr_sdram_rcw_2,
+ regs->ddr_sdram_rcw_2 & ~0x0f000000);
+ }
+ ddr_out32(&ddr->err_disable, regs->err_disable |
+ DDR_ERR_DISABLE_APED);
}
-
- ddr_out32(&ddr->err_disable, regs->err_disable | DDR_ERR_DISABLE_APED);
#else
ddr_out32(&ddr->err_disable, regs->err_disable);
#endif
@@ -376,22 +378,24 @@ step2:
#endif /* CONFIG_SYS_FSL_ERRATUM_A008511 */
#ifdef CONFIG_SYS_FSL_ERRATUM_A009803
- /* if it's RDIMM */
- if (regs->ddr_sdram_cfg & SDRAM_CFG_RD_EN) {
- for (i = 0; i < CONFIG_CHIP_SELECTS_PER_CTRL; i++) {
- if (!(regs->cs[i].config & SDRAM_CS_CONFIG_EN))
- continue;
- set_wait_for_bits_clear(&ddr->sdram_md_cntl,
- MD_CNTL_MD_EN |
- MD_CNTL_CS_SEL(i) |
- 0x070000ed,
- MD_CNTL_MD_EN);
- udelay(1);
+ if (regs->ddr_sdram_cfg_2 & SDRAM_CFG2_AP_EN) {
+ /* if it's RDIMM */
+ if (regs->ddr_sdram_cfg & SDRAM_CFG_RD_EN) {
+ for (i = 0; i < CONFIG_CHIP_SELECTS_PER_CTRL; i++) {
+ if (!(regs->cs[i].config & SDRAM_CS_CONFIG_EN))
+ continue;
+ set_wait_for_bits_clear(&ddr->sdram_md_cntl,
+ MD_CNTL_MD_EN |
+ MD_CNTL_CS_SEL(i) |
+ 0x070000ed,
+ MD_CNTL_MD_EN);
+ udelay(1);
+ }
}
- }
- ddr_out32(&ddr->err_disable,
- regs->err_disable & ~DDR_ERR_DISABLE_APED);
+ ddr_out32(&ddr->err_disable,
+ regs->err_disable & ~DDR_ERR_DISABLE_APED);
+ }
#endif
}
#endif
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] driver/ddr/fsl: Check condition for erratum A-009803
2016-05-25 8:15 [U-Boot] [PATCH] driver/ddr/fsl: Check condition for erratum A-009803 Shengzhou Liu
@ 2016-06-04 5:06 ` York Sun
0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2016-06-04 5:06 UTC (permalink / raw)
To: u-boot
On 05/25/2016 01:25 AM, Shengzhou Liu wrote:
> Add condition of checking the enabled of address parity
> for erratum A-009803, if parity is not enabled, the
> workaround of erratum A-009803 should not be applied.
>
> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
> ---
> drivers/ddr/fsl/fsl_ddr_gen4.c | 42 +++++++++++++++++++++++-------------------
> 1 file changed, 23 insertions(+), 19 deletions(-)
Applied to fsl-qoriq master branch. Awaiting upstream.
Thanks.
York
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-04 5:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-25 8:15 [U-Boot] [PATCH] driver/ddr/fsl: Check condition for erratum A-009803 Shengzhou Liu
2016-06-04 5:06 ` York Sun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox