All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alison Wang <b18965@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 09/16] driver/ddr/fsl: Add support of overriding chip select write leveling
Date: Tue, 19 Aug 2014 10:54:58 +0800	[thread overview]
Message-ID: <1408416905-19771-10-git-send-email-b18965@freescale.com> (raw)
In-Reply-To: <1408416905-19771-1-git-send-email-b18965@freescale.com>

From: York Sun <yorksun@freescale.com>

JEDEC spec allows DRAM vendors to use prime DQ for write leveling. This
is not an issue unless some DQ pins are not connected. If a platform uses
regular DIMMs but with reduced DDR ECC pins, the prime DQ may end up on
those floating pins for the second rank. The workaround is to use a known
good chip select for this purpose.

Signed-off-by: York Sun <yorksun@freescale.com>
---
Change log:
 v5: No change.
 v4: No change.
 v3: No change.
 v2: No change.

 drivers/ddr/fsl/ctrl_regs.c   | 3 +++
 drivers/ddr/fsl/interactive.c | 2 ++
 include/fsl_ddr_sdram.h       | 2 ++
 3 files changed, 7 insertions(+)

diff --git a/drivers/ddr/fsl/ctrl_regs.c b/drivers/ddr/fsl/ctrl_regs.c
index 5e0ee77..d9cac22 100644
--- a/drivers/ddr/fsl/ctrl_regs.c
+++ b/drivers/ddr/fsl/ctrl_regs.c
@@ -2276,6 +2276,9 @@ compute_fsl_memctl_config_regs(const memctl_options_t *popts,
 	if (ip_rev > 0x40400)
 		unq_mrs_en = 1;
 
+	if (ip_rev > 0x40700)
+		ddr->debug[18] = popts->cswl_override;
+
 	set_ddr_sdram_cfg_2(ddr, popts, unq_mrs_en);
 	set_ddr_sdram_mode(ddr, popts, common_dimm,
 				cas_latency, additive_latency, unq_mrs_en);
diff --git a/drivers/ddr/fsl/interactive.c b/drivers/ddr/fsl/interactive.c
index 7fb4187..6aa16b2 100644
--- a/drivers/ddr/fsl/interactive.c
+++ b/drivers/ddr/fsl/interactive.c
@@ -511,6 +511,7 @@ static void fsl_ddr_options_edit(fsl_ddr_info_t *pinfo,
 		CTRL_OPTIONS(wrlvl_override),
 		CTRL_OPTIONS(wrlvl_sample),
 		CTRL_OPTIONS(wrlvl_start),
+		CTRL_OPTIONS(cswl_override),
 		CTRL_OPTIONS(rcw_override),
 		CTRL_OPTIONS(rcw_1),
 		CTRL_OPTIONS(rcw_2),
@@ -801,6 +802,7 @@ static void print_memctl_options(const memctl_options_t *popts)
 		CTRL_OPTIONS(wrlvl_override),
 		CTRL_OPTIONS(wrlvl_sample),
 		CTRL_OPTIONS(wrlvl_start),
+		CTRL_OPTIONS_HEX(cswl_override),
 		CTRL_OPTIONS(rcw_override),
 		CTRL_OPTIONS(rcw_1),
 		CTRL_OPTIONS(rcw_2),
diff --git a/include/fsl_ddr_sdram.h b/include/fsl_ddr_sdram.h
index e8a2db9..987119b 100644
--- a/include/fsl_ddr_sdram.h
+++ b/include/fsl_ddr_sdram.h
@@ -281,6 +281,7 @@ typedef struct memctl_options_partial_s {
 #define DDR_DATA_BUS_WIDTH_64 0
 #define DDR_DATA_BUS_WIDTH_32 1
 #define DDR_DATA_BUS_WIDTH_16 2
+#define DDR_CSWL_CS0	0x04000001
 /*
  * Generalized parameters for memory controller configuration,
  * might be a little specific to the FSL memory controller
@@ -340,6 +341,7 @@ typedef struct memctl_options_s {
 	unsigned int cpo_override;
 	unsigned int write_data_delay;		/* DQS adjust */
 
+	unsigned int cswl_override;
 	unsigned int wrlvl_override;
 	unsigned int wrlvl_sample;		/* Write leveling */
 	unsigned int wrlvl_start;
-- 
1.8.0

  parent reply	other threads:[~2014-08-19  2:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19  2:54 [U-Boot] [PATCH v5 0/16] arm: ls102xa: Add Freescale LS102xA SoC and LS1021AQDS/TWR board support Alison Wang
2014-08-19  2:54 ` [U-Boot] [PATCH v5 01/16] arm: ls102xa: Add Freescale LS102xA SoC support Alison Wang
2014-08-19 11:19   ` Mark Rutland
2014-08-20  2:39     ` AlisonWang
2014-08-20  9:38       ` Mark Rutland
2014-08-19  2:54 ` [U-Boot] [PATCH v5 02/16] ls102xa: i2c: Add i2c support for LS102xA Alison Wang
2014-08-19  2:54 ` [U-Boot] [PATCH v5 03/16] net: Merge asm/fsl_enet.h into fsl_mdio.h Alison Wang
2014-08-19  2:54 ` [U-Boot] [PATCH v5 04/16] net: mdio: Use mb() to be compatible for both ARM and PowerPC Alison Wang
2014-08-19  2:54 ` [U-Boot] [PATCH v5 05/16] ls102xa: etsec: Add etsec support for LS102xA Alison Wang
2014-08-19  2:54 ` [U-Boot] [PATCH v5 06/16] ls102xa: esdhc: Add esdhc " Alison Wang
2014-08-19  2:54 ` [U-Boot] [PATCH v5 07/16] driver/ddr/freescale: Add support of accumulate ECC Alison Wang
2014-08-19  2:54 ` [U-Boot] [PATCH v5 08/16] driver/ddr/freescale: Fix DDR3 driver for ARM Alison Wang
2014-08-19  2:54 ` Alison Wang [this message]
2014-08-19  2:54 ` [U-Boot] [PATCH v5 10/16] arm: ls102xa: Add basic support for LS1021AQDS board Alison Wang
2014-08-19  2:55 ` [U-Boot] [PATCH v5 11/16] arm: ls102xa: Add basic support for LS1021ATWR board Alison Wang
2014-08-19  2:55 ` [U-Boot] [PATCH v5 12/16] net: tsec: Remove tx snooping support from LS1 Alison Wang
2014-08-19  2:55 ` [U-Boot] [PATCH v5 13/16] serial: lpuart: add 32-bit registers lpuart support Alison Wang
2014-08-20 17:23   ` York Sun
2014-08-19  2:55 ` [U-Boot] [PATCH v5 14/16] video: dcu: Add DCU driver support Alison Wang
2014-08-19  2:55 ` [U-Boot] [PATCH v5 15/16] ls102xa: dcu: Add platform support for DCU on LS1021ATWR board Alison Wang
2014-08-20 17:26   ` York Sun
2014-08-19  2:55 ` [U-Boot] [PATCH v5 16/16] video: dcu: Add Sii9022A HDMI Transmitter support Alison Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1408416905-19771-10-git-send-email-b18965@freescale.com \
    --to=b18965@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.