aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-rockchip/rk3288-board.c
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2019-07-22 20:02:14 +0800
committerKever Yang <kever.yang@rock-chips.com>2019-07-29 10:27:45 +0800
commit271318a660eefe5623286eceaefd1b49389cbbdc (patch)
treed9163e309b988b45888ca5985ebae26de300e0da /arch/arm/mach-rockchip/rk3288-board.c
parent88a87bcbb344ec63c62c001c356aaad8f60c84fa (diff)
downloadu-boot-271318a660eefe5623286eceaefd1b49389cbbdc.zip
u-boot-271318a660eefe5623286eceaefd1b49389cbbdc.tar.gz
u-boot-271318a660eefe5623286eceaefd1b49389cbbdc.tar.bz2
rockchip: rk3288: Move rk3288_detect_reset_reason to soc file
The rk3288_detect_reset_reason() is per-SoC operation, move it to rk3288.c, and extend the rk_board_late_init() with rk3288_board_late_init() to make all the board works fine as before. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'arch/arm/mach-rockchip/rk3288-board.c')
-rw-r--r--arch/arm/mach-rockchip/rk3288-board.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c
index 1c37038..1f33f25 100644
--- a/arch/arm/mach-rockchip/rk3288-board.c
+++ b/arch/arm/mach-rockchip/rk3288-board.c
@@ -24,47 +24,9 @@ __weak int rk_board_late_init(void)
return 0;
}
-static void rk3288_detect_reset_reason(void)
-{
- struct rk3288_cru *cru = rockchip_get_cru();
- const char *reason;
-
- if (IS_ERR(cru))
- return;
-
- switch (cru->cru_glb_rst_st) {
- case GLB_POR_RST:
- reason = "POR";
- break;
- case FST_GLB_RST_ST:
- case SND_GLB_RST_ST:
- reason = "RST";
- break;
- case FST_GLB_TSADC_RST_ST:
- case SND_GLB_TSADC_RST_ST:
- reason = "THERMAL";
- break;
- case FST_GLB_WDT_RST_ST:
- case SND_GLB_WDT_RST_ST:
- reason = "WDOG";
- break;
- default:
- reason = "unknown reset";
- }
-
- env_set("reset_reason", reason);
-
- /*
- * Clear cru_glb_rst_st, so we can determine the last reset cause
- * for following resets.
- */
- rk_clrreg(&cru->cru_glb_rst_st, GLB_RST_ST_MASK);
-}
-
int board_late_init(void)
{
setup_boot_mode();
- rk3288_detect_reset_reason();
return rk_board_late_init();
}