summaryrefslogtreecommitdiff
path: root/drivers/ddr/imx/imx8m/ddrphy_train.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-07-17 08:04:28 -0400
committerTom Rini <trini@konsulko.com>2020-07-17 08:04:28 -0400
commit42e7659db0ac7089d3a2f80ee1c3b8eb64d84706 (patch)
treec2b2dda157f71ce80ca4fb00332519f161896a5c /drivers/ddr/imx/imx8m/ddrphy_train.c
parentfee68b98fe3890631a9bdf8f8db328179011ee3f (diff)
parentab8b4e818cbc3846672c13b12f1d75daccfac519 (diff)
Merge tag 'u-boot-imx-20200716' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
i.MX for 2020.10 ---------------- - i.MX DDR driver fix/update for i.MX8M - i.MX pinctrl driver fix. - Use arm_smccc_smc to remove imx sip function - i.MX8M clk update - support booting aarch32 kernel on aarch64 hardware - fused part support for i.MX8MP - imx6: pcm058 to DM Travis: https://travis-ci.org/github/sbabic/u-boot-imx/builds/708734785
Diffstat (limited to 'drivers/ddr/imx/imx8m/ddrphy_train.c')
-rw-r--r--drivers/ddr/imx/imx8m/ddrphy_train.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/ddr/imx/imx8m/ddrphy_train.c b/drivers/ddr/imx/imx8m/ddrphy_train.c
index f2a997b50a6..08fed6178f3 100644
--- a/drivers/ddr/imx/imx8m/ddrphy_train.c
+++ b/drivers/ddr/imx/imx8m/ddrphy_train.c
@@ -8,6 +8,7 @@
#include <linux/kernel.h>
#include <asm/arch/ddr.h>
#include <asm/arch/lpddr4_define.h>
+#include <asm/arch/sys_proto.h>
int ddr_cfg_phy(struct dram_timing_info *dram_timing)
{
@@ -71,9 +72,15 @@ int ddr_cfg_phy(struct dram_timing_info *dram_timing)
/* Read the Message Block results */
dwc_ddrphy_apb_wr(0xd0000, 0x0);
+
ddrphy_init_read_msg_block(fsp_msg->fw_type);
+
+ if(fsp_msg->fw_type != FW_2D_IMAGE)
+ get_trained_CDD(i);
+
dwc_ddrphy_apb_wr(0xd0000, 0x1);
+
fsp_msg++;
}