diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2019-10-01 10:41:00 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-10-11 13:32:39 -0400 |
commit | 60e3d43a26d0334dd09521220e0312d50679b1c7 (patch) | |
tree | dcb5e8fe71bed3d4cfa25b7ace7be23163b9bd97 /arch/arm | |
parent | 2fff0e96a6ed4bb464f3ef7c2e3628ddf2d988d0 (diff) | |
download | u-boot-60e3d43a26d0334dd09521220e0312d50679b1c7.tar.gz u-boot-60e3d43a26d0334dd09521220e0312d50679b1c7.tar.xz u-boot-60e3d43a26d0334dd09521220e0312d50679b1c7.zip |
arm: dra7xx: Fix error path in iodelay recalibration
When an error is reported in __recalibrate_iodelay_start(), de-isolation
of IO doesn't happen. Because of this, undefined behaviour is observed
on many peripherals without any error. So make sure io is out of isolation
at the end of iodelay recalibration.
Reported-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/omap5/dra7xx_iodelay.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c index e2abb7d058..9bd7051786 100644 --- a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c +++ b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c @@ -202,8 +202,9 @@ void __recalibrate_iodelay_end(int ret) return; } - if (!ret) - ret = isolate_io(DEISOLATE_IO); + /* Deisolate IO if it is already isolated */ + if (readl((*ctrl)->ctrl_core_sma_sw_0) & CTRL_ISOLATE_MASK) + isolate_io(DEISOLATE_IO); /* lock IODELAY CONFIG registers */ writel(CFG_IODELAY_LOCK_KEY, (*ctrl)->iodelay_config_base + |