summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc85xx/ddr-gen3.c
diff options
context:
space:
mode:
authorYork Sun <yorksun@freescale.com>2011-01-10 12:03:00 +0000
committerKumar Gala <galak@kernel.crashing.org>2011-01-19 22:58:23 -0600
commite1fd16b6f5e80d932c73f5a36141adfb35126e83 (patch)
tree7a1bda7894afa9187f50936172aff0529324d7b1 /arch/powerpc/cpu/mpc85xx/ddr-gen3.c
parentd2a9568c57f0aa02f097911d3811e002a1eec1b8 (diff)
downloadu-boot-imx-e1fd16b6f5e80d932c73f5a36141adfb35126e83.zip
u-boot-imx-e1fd16b6f5e80d932c73f5a36141adfb35126e83.tar.gz
u-boot-imx-e1fd16b6f5e80d932c73f5a36141adfb35126e83.tar.bz2
mpc85xx: Enable unique mode registers and dynamic ODT for DDR3
Added fsl_ddr_get_version() function to for DDR3 to poll DDRC IP version (major, minor, errata) to determine if unique mode registers are available. If true, always use unique mode registers. Dynamic ODT is enabled if needed. The table is documented in doc/README.fsl-ddr. This function may also need to be extend for future other platforms if such a feature exists. Enable address parity and RCW by default for RDIMMs. Change default output driver impedance from 34 ohm to 40ohm. Make it 34ohm for quad-rank RDIMMs. Use a formula to calculate rodt_on for timing_cfg_5. Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/cpu/mpc85xx/ddr-gen3.c')
-rw-r--r--arch/powerpc/cpu/mpc85xx/ddr-gen3.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/ddr-gen3.c b/arch/powerpc/cpu/mpc85xx/ddr-gen3.c
index 4e768d3..9bc36f3 100644
--- a/arch/powerpc/cpu/mpc85xx/ddr-gen3.c
+++ b/arch/powerpc/cpu/mpc85xx/ddr-gen3.c
@@ -66,6 +66,12 @@ void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,
out_be32(&ddr->sdram_cfg_2, regs->ddr_sdram_cfg_2);
out_be32(&ddr->sdram_mode, regs->ddr_sdram_mode);
out_be32(&ddr->sdram_mode_2, regs->ddr_sdram_mode_2);
+ out_be32(&ddr->sdram_mode_3, regs->ddr_sdram_mode_3);
+ out_be32(&ddr->sdram_mode_4, regs->ddr_sdram_mode_4);
+ out_be32(&ddr->sdram_mode_5, regs->ddr_sdram_mode_5);
+ out_be32(&ddr->sdram_mode_6, regs->ddr_sdram_mode_6);
+ out_be32(&ddr->sdram_mode_7, regs->ddr_sdram_mode_7);
+ out_be32(&ddr->sdram_mode_8, regs->ddr_sdram_mode_8);
out_be32(&ddr->sdram_md_cntl, regs->ddr_sdram_md_cntl);
out_be32(&ddr->sdram_interval, regs->ddr_sdram_interval);
out_be32(&ddr->sdram_data_init, regs->ddr_data_init);