* [PATCH] arm: mvebu: Hang if ddr3_init() fails
@ 2021-08-09 15:44 Pali Rohár
2021-08-11 6:37 ` Stefan Roese
2021-08-11 8:30 ` Stefan Roese
0 siblings, 2 replies; 3+ messages in thread
From: Pali Rohár @ 2021-08-09 15:44 UTC (permalink / raw)
To: Stefan Roese; +Cc: u-boot, Marek Behún
If ddr3_init() fails then DDR was not initialized and we cannot load and
execute U-Boot. We cannot continue, we cannot do anything in this case, so
hang.
Signed-off-by: Pali Rohár <pali@kernel.org>
---
arch/arm/mach-mvebu/spl.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
index 3b6bc3897090..f0cf60bb1488 100644
--- a/arch/arm/mach-mvebu/spl.c
+++ b/arch/arm/mach-mvebu/spl.c
@@ -345,7 +345,11 @@ void board_init_f(ulong dummy)
serdes_phy_config();
/* Setup DDR */
- ddr3_init();
+ ret = ddr3_init();
+ if (ret) {
+ debug("ddr3_init() failed: %d\n", ret);
+ hang();
+ }
#endif
/* Initialize Auto Voltage Scaling */
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm: mvebu: Hang if ddr3_init() fails
2021-08-09 15:44 [PATCH] arm: mvebu: Hang if ddr3_init() fails Pali Rohár
@ 2021-08-11 6:37 ` Stefan Roese
2021-08-11 8:30 ` Stefan Roese
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Roese @ 2021-08-11 6:37 UTC (permalink / raw)
To: Pali Rohár; +Cc: u-boot, Marek Behún
On 09.08.21 17:44, Pali Rohár wrote:
> If ddr3_init() fails then DDR was not initialized and we cannot load and
> execute U-Boot. We cannot continue, we cannot do anything in this case, so
> hang.
>
> Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Thanks,
Stefan
> ---
> arch/arm/mach-mvebu/spl.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
> index 3b6bc3897090..f0cf60bb1488 100644
> --- a/arch/arm/mach-mvebu/spl.c
> +++ b/arch/arm/mach-mvebu/spl.c
> @@ -345,7 +345,11 @@ void board_init_f(ulong dummy)
> serdes_phy_config();
>
> /* Setup DDR */
> - ddr3_init();
> + ret = ddr3_init();
> + if (ret) {
> + debug("ddr3_init() failed: %d\n", ret);
> + hang();
> + }
> #endif
>
> /* Initialize Auto Voltage Scaling */
>
Viele Grüße,
Stefan
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm: mvebu: Hang if ddr3_init() fails
2021-08-09 15:44 [PATCH] arm: mvebu: Hang if ddr3_init() fails Pali Rohár
2021-08-11 6:37 ` Stefan Roese
@ 2021-08-11 8:30 ` Stefan Roese
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Roese @ 2021-08-11 8:30 UTC (permalink / raw)
To: Pali Rohár; +Cc: u-boot, Marek Behún
On 09.08.21 17:44, Pali Rohár wrote:
> If ddr3_init() fails then DDR was not initialized and we cannot load and
> execute U-Boot. We cannot continue, we cannot do anything in this case, so
> hang.
>
> Signed-off-by: Pali Rohár <pali@kernel.org>
Applied to u-boot-marvell/master
Thanks,
Stefan
> ---
> arch/arm/mach-mvebu/spl.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
> index 3b6bc3897090..f0cf60bb1488 100644
> --- a/arch/arm/mach-mvebu/spl.c
> +++ b/arch/arm/mach-mvebu/spl.c
> @@ -345,7 +345,11 @@ void board_init_f(ulong dummy)
> serdes_phy_config();
>
> /* Setup DDR */
> - ddr3_init();
> + ret = ddr3_init();
> + if (ret) {
> + debug("ddr3_init() failed: %d\n", ret);
> + hang();
> + }
> #endif
>
> /* Initialize Auto Voltage Scaling */
>
Viele Grüße,
Stefan
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-11 8:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-09 15:44 [PATCH] arm: mvebu: Hang if ddr3_init() fails Pali Rohár
2021-08-11 6:37 ` Stefan Roese
2021-08-11 8:30 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox