All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] mv_ddr: ddr3: fix tRAS timimg parameter
@ 2019-02-28 21:11 Chris Packham
  2019-02-28 21:11 ` [U-Boot] [PATCH 2/2] mv_ddr: ddr3: only use active chip-selects when tuning ODT Chris Packham
  2019-03-19 12:38 ` [U-Boot] [PATCH 1/2] mv_ddr: ddr3: fix tRAS timimg parameter Stefan Roese
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Packham @ 2019-02-28 21:11 UTC (permalink / raw)
  To: u-boot

From: Chris Packham <chris.packham@alliedtelesis.co.nz>

Based on the JEDEC standard JESD79-3F. The tRAS timings should include
the highest speed bins at a given frequency. This is similar to commit
683c67b ("mv_ddr: ddr3: fix tfaw timimg parameter") where the wrong
comparison was used in the initial implementation.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>

[https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/pull/15]
Signed-off-by: Chris Packham <judge.packham@gmail.com>
---

 drivers/ddr/marvell/a38x/ddr3_training_db.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/ddr/marvell/a38x/ddr3_training_db.c b/drivers/ddr/marvell/a38x/ddr3_training_db.c
index 111a8586c6e3..b2f11a839961 100644
--- a/drivers/ddr/marvell/a38x/ddr3_training_db.c
+++ b/drivers/ddr/marvell/a38x/ddr3_training_db.c
@@ -420,13 +420,13 @@ unsigned int mv_ddr_speed_bin_timing_get(enum mv_ddr_speed_bin index, enum mv_dd
 		result = speed_bin_table_t_rcd_t_rp[index];
 		break;
 	case SPEED_BIN_TRAS:
-		if (index < SPEED_BIN_DDR_1066G)
+		if (index <= SPEED_BIN_DDR_1066G)
 			result = 37500;
-		else if (index < SPEED_BIN_DDR_1333J)
+		else if (index <= SPEED_BIN_DDR_1333J)
 			result = 36000;
-		else if (index < SPEED_BIN_DDR_1600K)
+		else if (index <= SPEED_BIN_DDR_1600K)
 			result = 35000;
-		else if (index < SPEED_BIN_DDR_1866M)
+		else if (index <= SPEED_BIN_DDR_1866M)
 			result = 34000;
 		else
 			result = 33000;
-- 
2.21.0

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

end of thread, other threads:[~2019-03-19 12:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-28 21:11 [U-Boot] [PATCH 1/2] mv_ddr: ddr3: fix tRAS timimg parameter Chris Packham
2019-02-28 21:11 ` [U-Boot] [PATCH 2/2] mv_ddr: ddr3: only use active chip-selects when tuning ODT Chris Packham
2019-03-03  8:09   ` Baruch Siach
2019-03-19 12:39   ` Stefan Roese
2019-03-19 12:38 ` [U-Boot] [PATCH 1/2] mv_ddr: ddr3: fix tRAS timimg parameter Stefan Roese

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.