[PATCH next RFC 0/5] rockchip: panic() when DRAM init fails
Kever Yang
kever.yang at rock-chips.com
Thu Nov 7 04:35:44 CET 2024
Hi Quentin,
On 2024/11/6 01:21, Quentin Schulz wrote:
> I am the unfortunate owner of an RK3399 Puma that is failing DRAM init
> every now and then with the following cryptic error message:
> """
> pctl_start: Failed to init pctl channel 0
> """
>
> When it fails, the current logic is implemented in such a way that the
> board enters an infinite while loop. This is not ideal for embedded
> systems that are not easily accessible and also an issue when having
> devices in a CI lab for example.
It's fine for this patch to make the choice in panic to hang or to reset
the system.
But I don't understand how this help you, does it may success to init
the dram after
the reset in your case? I think in most case the board will keep reset
because this is
more likely hardware issue and not able to became success after reset.
Thanks,
- Kever
>
> Therefore, let's simply panic if the DRAM fails to init. This was tested
> only on RK3399 Puma, similar changes may be required for other SoCs to
> properly propagate the errors.
>
> While this is all but a work-around instead of fixing the DRAM init
> sequence, I believe it is important for resilience of devices in the
> field.
>
> Marking this as RFC because:
> 1) panic()s for all Rockchip SoCs but only tested on RK3399
> 2) unsure about error return values (ENODEV and the likes), not sure
> what would be better than that though :/
>
> Note that one can still hang() if they want by setting PANIC_HANG
> symbol.
>
> Signed-off-by: Quentin Schulz <quentin.schulz at cherry.de>
> ---
> Quentin Schulz (5):
> ram: rk3399: allow to fail DRAM init if pctl_start fails
> ram: rk3399: fail probe if DRAM init failed
> rockchip: spl/tpl: panic when DRAM init failed
> ram: rk3399: merge two consecutive ifs with same condition
> ram: rk3399: fail DRAM init when pctl channel init fails instead of hanging
>
> arch/arm/mach-rockchip/spl.c | 7 +++----
> arch/arm/mach-rockchip/tpl.c | 6 ++----
> drivers/ram/rockchip/sdram_rk3399.c | 24 +++++++++++-------------
> 3 files changed, 16 insertions(+), 21 deletions(-)
> ---
> base-commit: 56accc56b9aab87ef4809ccc588e1257969cd271
> change-id: 20241105-rk3399-dram-init-207325c2d9ca
>
> Best regards,
More information about the U-Boot
mailing list