public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] drivers/ddr/fsl: Fix typo in BIST test for DDR4
@ 2015-11-06 17:58 York Sun
  2015-11-30 17:17 ` York Sun
  0 siblings, 1 reply; 2+ messages in thread
From: York Sun @ 2015-11-06 17:58 UTC (permalink / raw)
  To: u-boot

BIST test code has a typo, resulting the binding registers not
maintained as expected. This typo results BIST runs twice on
the covered memory.

Signed-off-by: York Sun <yorksun@freescale.com>
Reported-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
---

 drivers/ddr/fsl/fsl_ddr_gen4.c |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c
index 49e4688..114c811 100644
--- a/drivers/ddr/fsl/fsl_ddr_gen4.c
+++ b/drivers/ddr/fsl/fsl_ddr_gen4.c
@@ -423,16 +423,16 @@ step2:
 	if (getenv_f("ddr_bist", buffer, CONFIG_SYS_CBSIZE) >= 0) {
 		puts("Running BIST test. This will take a while...");
 		cs0_config = ddr_in32(&ddr->cs0_config);
+		cs0_bnds = ddr_in32(&ddr->cs0_bnds);
+		cs1_bnds = ddr_in32(&ddr->cs1_bnds);
+		cs2_bnds = ddr_in32(&ddr->cs2_bnds);
+		cs3_bnds = ddr_in32(&ddr->cs3_bnds);
 		if (cs0_config & CTLR_INTLV_MASK) {
-			cs0_bnds = ddr_in32(&cs0_bnds);
-			cs1_bnds = ddr_in32(&cs1_bnds);
-			cs2_bnds = ddr_in32(&cs2_bnds);
-			cs3_bnds = ddr_in32(&cs3_bnds);
 			/* set bnds to non-interleaving */
-			ddr_out32(&cs0_bnds, (cs0_bnds & 0xfffefffe) >> 1);
-			ddr_out32(&cs1_bnds, (cs1_bnds & 0xfffefffe) >> 1);
-			ddr_out32(&cs2_bnds, (cs2_bnds & 0xfffefffe) >> 1);
-			ddr_out32(&cs3_bnds, (cs3_bnds & 0xfffefffe) >> 1);
+			ddr_out32(&ddr->cs0_bnds, (cs0_bnds & 0xfffefffe) >> 1);
+			ddr_out32(&ddr->cs1_bnds, (cs1_bnds & 0xfffefffe) >> 1);
+			ddr_out32(&ddr->cs2_bnds, (cs2_bnds & 0xfffefffe) >> 1);
+			ddr_out32(&ddr->cs3_bnds, (cs3_bnds & 0xfffefffe) >> 1);
 		}
 		ddr_out32(&ddr->mtp1, BIST_PATTERN1);
 		ddr_out32(&ddr->mtp2, BIST_PATTERN1);
@@ -469,10 +469,10 @@ step2:
 
 		if (cs0_config & CTLR_INTLV_MASK) {
 			/* restore bnds registers */
-			ddr_out32(&cs0_bnds, cs0_bnds);
-			ddr_out32(&cs1_bnds, cs1_bnds);
-			ddr_out32(&cs2_bnds, cs2_bnds);
-			ddr_out32(&cs3_bnds, cs3_bnds);
+			ddr_out32(&ddr->cs0_bnds, cs0_bnds);
+			ddr_out32(&ddr->cs1_bnds, cs1_bnds);
+			ddr_out32(&ddr->cs2_bnds, cs2_bnds);
+			ddr_out32(&ddr->cs3_bnds, cs3_bnds);
 		}
 	}
 #endif
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] drivers/ddr/fsl: Fix typo in BIST test for DDR4
  2015-11-06 17:58 [U-Boot] [PATCH] drivers/ddr/fsl: Fix typo in BIST test for DDR4 York Sun
@ 2015-11-30 17:17 ` York Sun
  0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2015-11-30 17:17 UTC (permalink / raw)
  To: u-boot



On 11/06/2015 09:58 AM, York Sun wrote:
> BIST test code has a typo, resulting the binding registers not
> maintained as expected. This typo results BIST runs twice on
> the covered memory.
> 
> Signed-off-by: York Sun <yorksun@freescale.com>
> Reported-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
> ---
> 
>  drivers/ddr/fsl/fsl_ddr_gen4.c |   24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 

Applied to fsl-qoriq master.

York

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-30 17:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-06 17:58 [U-Boot] [PATCH] drivers/ddr/fsl: Fix typo in BIST test for DDR4 York Sun
2015-11-30 17:17 ` York Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox