summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Muellner <christoph.muellner@theobroma-systems.com>2018-12-06 20:00:14 +0100
committerChristoph Muellner <christoph.muellner@theobroma-systems.com>2019-04-29 12:09:07 +0200
commit739fe95bb63430789aa045603e5f1127294189d9 (patch)
treec5fdefa5e8b436aba458c262656defe0dcf2dd12
parentae9b0ca75008889b74c43814ac8d2a2bd98f789e (diff)
rockchip: rk3399-puma: Reset from SPL on error.
Every now an then we experience errors in SPL (most likely "DRAM init failed"). In such cases, the system hangs and requires a power-cycle from the user. While a power-cycle might be a proper way to address the symptom, we could also call do_reset() instead of hanging. That would allow to "heal" spurious issues. Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
-rw-r--r--arch/arm/mach-rockchip/rk3399-board-spl.c6
-rw-r--r--drivers/ram/rockchip/sdram_rk3399.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c
index ccc136f388..257cb0c8b6 100644
--- a/arch/arm/mach-rockchip/rk3399-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3399-board-spl.c
@@ -215,7 +215,7 @@ void board_init_f(ulong dummy)
ret = spl_early_init();
if (ret) {
debug("spl_early_init() failed: %d\n", ret);
- hang();
+ do_reset(NULL, 0, 0, NULL);
}
/*
@@ -240,13 +240,13 @@ void board_init_f(ulong dummy)
ret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl);
if (ret) {
pr_err("Pinctrl init failed: %d\n", ret);
- return;
+ do_reset(NULL, 0, 0, NULL);
}
ret = uclass_get_device(UCLASS_RAM, 0, &dev);
if (ret) {
pr_err("DRAM init failed: %d\n", ret);
- return;
+ do_reset(NULL, 0, 0, NULL);
}
}
diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index 94dd01156a..2a3c91d043 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -1189,7 +1189,7 @@ static int rk3399_dmc_probe(struct udevice *dev)
{
#ifdef CONFIG_SPL_BUILD
if (rk3399_dmc_init(dev))
- return 0;
+ do_reset(NULL, 0, 0, NULL);
#else
struct dram_info *priv = dev_get_priv(dev);