* [U-Boot] [PATCH 1/2] arm: dra7xx: Fix error path in iodelay recalibration
@ 2019-10-01 5:11 Lokesh Vutla
2019-10-01 5:11 ` [U-Boot] [PATCH 2/2] arm: dra7xx: Hang on any failure during IOdelay recalibration Lokesh Vutla
2019-10-12 20:28 ` [U-Boot] [PATCH 1/2] arm: dra7xx: Fix error path in iodelay recalibration Tom Rini
0 siblings, 2 replies; 4+ messages in thread
From: Lokesh Vutla @ 2019-10-01 5:11 UTC (permalink / raw)
To: u-boot
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>
---
arch/arm/mach-omap2/omap5/dra7xx_iodelay.c | 5 +++--
1 file 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 +
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 2/2] arm: dra7xx: Hang on any failure during IOdelay recalibration
2019-10-01 5:11 [U-Boot] [PATCH 1/2] arm: dra7xx: Fix error path in iodelay recalibration Lokesh Vutla
@ 2019-10-01 5:11 ` Lokesh Vutla
2019-10-12 20:28 ` Tom Rini
2019-10-12 20:28 ` [U-Boot] [PATCH 1/2] arm: dra7xx: Fix error path in iodelay recalibration Tom Rini
1 sibling, 1 reply; 4+ messages in thread
From: Lokesh Vutla @ 2019-10-01 5:11 UTC (permalink / raw)
To: u-boot
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(+)
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;
}
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 1/2] arm: dra7xx: Fix error path in iodelay recalibration
2019-10-01 5:11 [U-Boot] [PATCH 1/2] arm: dra7xx: Fix error path in iodelay recalibration Lokesh Vutla
2019-10-01 5:11 ` [U-Boot] [PATCH 2/2] arm: dra7xx: Hang on any failure during IOdelay recalibration Lokesh Vutla
@ 2019-10-12 20:28 ` Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2019-10-12 20:28 UTC (permalink / raw)
To: u-boot
On Tue, Oct 01, 2019 at 10:41:00AM +0530, Lokesh Vutla wrote:
> 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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191012/88d96e01/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 2/2] arm: dra7xx: Hang on any failure during IOdelay recalibration
2019-10-01 5:11 ` [U-Boot] [PATCH 2/2] arm: dra7xx: Hang on any failure during IOdelay recalibration Lokesh Vutla
@ 2019-10-12 20:28 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2019-10-12 20:28 UTC (permalink / raw)
To: u-boot
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!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191012/e41a5336/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-12 20:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-01 5:11 [U-Boot] [PATCH 1/2] arm: dra7xx: Fix error path in iodelay recalibration Lokesh Vutla
2019-10-01 5:11 ` [U-Boot] [PATCH 2/2] arm: dra7xx: Hang on any failure during IOdelay recalibration Lokesh Vutla
2019-10-12 20:28 ` Tom Rini
2019-10-12 20:28 ` [U-Boot] [PATCH 1/2] arm: dra7xx: Fix error path in iodelay recalibration Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox