summaryrefslogtreecommitdiffstats
path: root/drivers/ddr/fsl/lc_common_dimm_params.c
diff options
context:
space:
mode:
authorYork Sun <yorksun@freescale.com>2015-03-19 09:30:27 -0700
committerYork Sun <yorksun@freescale.com>2015-04-23 08:55:53 -0700
commit6b95be228024c7d15b9164b59187ef02333bb0c8 (patch)
tree49df5d8e2ae4d0163319a538aedbeab022c1d869 /drivers/ddr/fsl/lc_common_dimm_params.c
parent66869f955417b89dbf6b7cbb72738b2205a26bf8 (diff)
downloadtalos-obmc-uboot-6b95be228024c7d15b9164b59187ef02333bb0c8.tar.gz
talos-obmc-uboot-6b95be228024c7d15b9164b59187ef02333bb0c8.zip
driver/ddr/fsl: Fix driver to support empty first slot
CS0 was not allowed to be empty by u-boot driver in the past to simplify the driver. This may be inconvenient for some debugging. This patch lifts the restrictions. Controller interleaving still requires CS0 populated. Signed-off-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'drivers/ddr/fsl/lc_common_dimm_params.c')
-rw-r--r--drivers/ddr/fsl/lc_common_dimm_params.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ddr/fsl/lc_common_dimm_params.c b/drivers/ddr/fsl/lc_common_dimm_params.c
index b295344c4d..b12eeb9f01 100644
--- a/drivers/ddr/fsl/lc_common_dimm_params.c
+++ b/drivers/ddr/fsl/lc_common_dimm_params.c
@@ -22,7 +22,7 @@ compute_cas_latency(const unsigned int ctrl_num,
unsigned int common_caslat;
unsigned int caslat_actual;
unsigned int retry = 16;
- unsigned int tmp;
+ unsigned int tmp = ~0;
const unsigned int mclk_ps = get_memory_clk_period_ps(ctrl_num);
#ifdef CONFIG_SYS_FSL_DDR3
const unsigned int taamax = 20000;
@@ -31,8 +31,7 @@ compute_cas_latency(const unsigned int ctrl_num,
#endif
/* compute the common CAS latency supported between slots */
- tmp = dimm_params[0].caslat_x;
- for (i = 1; i < number_of_dimms; i++) {
+ for (i = 0; i < number_of_dimms; i++) {
if (dimm_params[i].n_ranks)
tmp &= dimm_params[i].caslat_x;
}
OpenPOWER on IntegriCloud