From dc619924c7734e14c459cec2fb5afcec27052bea Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Wed, 5 Dec 2018 17:04:03 +0100 Subject: [PATCH] ddr: vybrid: Add calibration code to memory controler's (DDRMC) setup code This patch extends the vf610 DDR memory controller code to support SW leveling. Signed-off-by: Lukasz Majewski Reviewed-by: Stefan Agner --- arch/arm/mach-imx/ddrmc-vf610.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-imx/ddrmc-vf610.c b/arch/arm/mach-imx/ddrmc-vf610.c index fa948f7812..461fba4d3f 100644 --- a/arch/arm/mach-imx/ddrmc-vf610.c +++ b/arch/arm/mach-imx/ddrmc-vf610.c @@ -10,6 +10,7 @@ #include #include #include +#include "ddrmc-vf610-calibration.h" void ddrmc_setup_iomux(const iomux_v3_cfg_t *pads, int pads_count) { @@ -235,4 +236,8 @@ void ddrmc_ctrl_init_ddr3(struct ddr3_jedec_timings const *timings, while (!(readl(&ddrmr->cr[80]) & DDRMC_CR80_MC_INIT_COMPLETE)) udelay(10); writel(DDRMC_CR80_MC_INIT_COMPLETE, &ddrmr->cr[81]); + +#ifdef CONFIG_DDRMC_VF610_CALIBRATION + ddrmc_calibration(ddrmr); +#endif } -- 2.39.5