summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/ddrmc-vf610.c
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2018-12-04 11:10:20 +0100
committerStefano Babic <sbabic@denx.de>2019-01-09 16:27:23 +0100
commit52c2c97e7c5b3ba326bae53a7940e27878efd405 (patch)
treeddb0de9dccc8eb634e9a46c9f0445d2ae664fb22 /arch/arm/mach-imx/ddrmc-vf610.c
parentb77e368fa27631f13c06acdb0020fb64b59d4411 (diff)
ARM: vf610: ddrmc: fix initialization completion detection
The CR80 register has multiple interrupt bits, the code is supposed to check bit 8 but instead uses a logical and. In most cases this probably did not affect real operations since at that stage typically none of the other bits are set. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'arch/arm/mach-imx/ddrmc-vf610.c')
-rw-r--r--arch/arm/mach-imx/ddrmc-vf610.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/ddrmc-vf610.c b/arch/arm/mach-imx/ddrmc-vf610.c
index 7cc8f5d2c0..9739738a08 100644
--- a/arch/arm/mach-imx/ddrmc-vf610.c
+++ b/arch/arm/mach-imx/ddrmc-vf610.c
@@ -233,6 +233,7 @@ void ddrmc_ctrl_init_ddr3(struct ddr3_jedec_timings const *timings,
/* all inits done, start the DDR controller */
writel(DDRMC_CR00_DRAM_CLASS_DDR3 | DDRMC_CR00_START, &ddrmr->cr[0]);
- while (!(readl(&ddrmr->cr[80]) && 0x100))
+ while (!(readl(&ddrmr->cr[80]) & DDRMC_CR80_MC_INIT_COMPLETE))
udelay(10);
+ writel(DDRMC_CR80_MC_INIT_COMPLETE, &ddrmr->cr[81]);
}