[U-Boot] [PATCH] rockchip: ram: rk3399: fix setting for some type of dram

Kever Yang kever.yang at rock-chips.com
Mon Aug 12 12:10:30 UTC 2019


We need to store all the ram related cap/map info back to register
after all the init has been done in case some of register was
reset during the process.

Signed-off-by: YouMin Chen <cym at rock-chips.com>
Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
---

 drivers/ram/rockchip/sdram_rk3399.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index 81fc71c051..edbc34327c 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -2592,8 +2592,11 @@ static int sdram_init(struct dram_info *dram,
 		}
 
 		sdram_print_ddr_info(cap_info, &params->base);
+		set_memory_map(chan, channel, params);
+		cap_info->ddrconfig = calculate_ddrconfig(params, channel);
 
 		set_ddrconfig(chan, params, channel, cap_info->ddrconfig);
+		set_cap_relate_config(chan, params, channel);
 	}
 
 	if (params->base.num_channels == 0) {
-- 
2.17.1



More information about the U-Boot mailing list