diff options
author | Bai Ping <ping.bai@nxp.com> | 2018-11-03 22:17:07 +0800 |
---|---|---|
committer | Bai Ping <ping.bai@nxp.com> | 2018-11-03 22:24:35 +0800 |
commit | bbc3e45463808a8d2f69c2fd95fe46c4078f6d2e (patch) | |
tree | c675af5419e6bc6a327c423494989b601abdace4 | |
parent | cdaae0eed8e74c49f917c88f77567b5b342004d6 (diff) |
plat: imx8mq: fix boot hang if no valid dram info
If no valid dram info to copy from DRAM, skip
copy the dram info.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
-rw-r--r-- | plat/imx/common/imx8m/dram.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plat/imx/common/imx8m/dram.c b/plat/imx/common/imx8m/dram.c index abb607ad..b8245db5 100644 --- a/plat/imx/common/imx8m/dram.c +++ b/plat/imx/common/imx8m/dram.c @@ -40,6 +40,10 @@ void imx8mq_dram_timing_copy(struct dram_timing_info *from, cfg1 = (struct dram_cfg_param *) ((unsigned long) to + sizeof(struct dram_timing_info)); cfg2 = from->ddrc_cfg; + /* if no valid dram timing info, return */ + if (((unsigned long)from + sizeof(struct dram_timing_info)) != (unsigned long)cfg2) + return; + /* copy the ddrc init config */ to->ddrc_cfg_num = from->ddrc_cfg_num; to->ddrphy_cfg_num = from->ddrphy_cfg_num; |