mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-01 08:59:33 +00:00
imx: ddr: imx8m: Move selfref_en after DDR scrub
When doing DDR scrub, the DDR may enter into self refresh if the selfref_en is enabled before DDR scrub. This will cause scrub can't complete that SBRSTAT.scrub_done won't be set. Since the selfref_en can be programmed during the course of normal operation, move it after DDR scrub Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
846b77e7df
commit
7c4f9b3755
1 changed files with 3 additions and 2 deletions
|
@ -235,8 +235,6 @@ int ddr_init(struct dram_timing_info *dram_timing)
|
||||||
|
|
||||||
/* Step26: Set back register in Step4 to the original values if desired */
|
/* Step26: Set back register in Step4 to the original values if desired */
|
||||||
reg32_write(DDRC_RFSHCTL3(0), 0x0000000);
|
reg32_write(DDRC_RFSHCTL3(0), 0x0000000);
|
||||||
/* enable selfref_en by default */
|
|
||||||
setbits_le32(DDRC_PWRCTL(0), 0x1);
|
|
||||||
|
|
||||||
/* enable port 0 */
|
/* enable port 0 */
|
||||||
reg32_write(DDRC_PCTRL_0(0), 0x00000001);
|
reg32_write(DDRC_PCTRL_0(0), 0x00000001);
|
||||||
|
@ -244,6 +242,9 @@ int ddr_init(struct dram_timing_info *dram_timing)
|
||||||
|
|
||||||
board_dram_ecc_scrub();
|
board_dram_ecc_scrub();
|
||||||
|
|
||||||
|
/* enable selfref_en by default */
|
||||||
|
setbits_le32(DDRC_PWRCTL(0), 0x1);
|
||||||
|
|
||||||
/* save the dram timing config into memory */
|
/* save the dram timing config into memory */
|
||||||
dram_config_save(dram_timing, CONFIG_SAVED_DRAM_TIMING_BASE);
|
dram_config_save(dram_timing, CONFIG_SAVED_DRAM_TIMING_BASE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue