diff options
author | York Sun <yorksun@freescale.com> | 2015-03-19 09:30:27 -0700 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2015-04-23 08:55:53 -0700 |
commit | 6b95be228024c7d15b9164b59187ef02333bb0c8 (patch) | |
tree | 49df5d8e2ae4d0163319a538aedbeab022c1d869 /drivers/ddr/fsl/options.c | |
parent | 66869f955417b89dbf6b7cbb72738b2205a26bf8 (diff) |
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/options.c')
-rw-r--r-- | drivers/ddr/fsl/options.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c index 5beb11b02b..3b30fa284c 100644 --- a/drivers/ddr/fsl/options.c +++ b/drivers/ddr/fsl/options.c @@ -728,7 +728,12 @@ unsigned int populate_memctl_options(int all_dimms_registered, /* Choose ddr controller address mirror mode */ #if defined(CONFIG_SYS_FSL_DDR3) || defined(CONFIG_SYS_FSL_DDR4) - popts->mirrored_dimm = pdimm[0].mirrored_dimm; + for (i = 0; i < CONFIG_DIMM_SLOTS_PER_CTLR; i++) { + if (pdimm[i].n_ranks) { + popts->mirrored_dimm = pdimm[i].mirrored_dimm; + break; + } + } #endif /* Global Timing Parameters. */ |