diff mbox series

[U-Boot,2/2] arm: dra7xx: Hang on any failure during IOdelay recalibration

Message ID 20191001051101.2739-2-lokeshvutla@ti.com
State Accepted
Commit 5c6e497eaaf2c76344f82e823c2a0aad3cc26167
Delegated to: Tom Rini
Headers show
Series [U-Boot,1/2] arm: dra7xx: Fix error path in iodelay recalibration | expand

Commit Message

Lokesh Vutla Oct. 1, 2019, 5:11 a.m. UTC
If there is any failure during IOdelay recalibration sequence, IOs are
not guaranteed to behave as expected. So hang on any failure during the
sequence.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 arch/arm/mach-omap2/omap5/dra7xx_iodelay.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Tom Rini Oct. 12, 2019, 8:28 p.m. UTC | #1
On Tue, Oct 01, 2019 at 10:41:01AM +0530, Lokesh Vutla wrote:

> If there is any failure during IOdelay recalibration sequence, IOs are
> not guaranteed to behave as expected. So hang on any failure during the
> sequence.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
index 9bd7051786..9eda57c450 100644
--- a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
+++ b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
@@ -241,6 +241,12 @@  void __recalibrate_iodelay_end(int ret)
 		debug("IODELAY: IO delay recalibration successfully completed\n");
 	}
 
+	/* If there is an error during iodelay recalibration, SoC is in a bad
+	 * state. Do not progress any further.
+	 */
+	if (ret)
+		hang();
+
 	return;
 }