From a225402cf7b41b5aeba9f2f2be4b49db81a7dd4b Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Mon, 25 Jan 2021 09:38:23 +0800 Subject: [PATCH] rockchip: board.c: support reboot stess test It's a way to test system stability before kernel stages. Signed-off-by: Joseph Chen Change-Id: I6679fbbbaa7233750b409b6b832849d8dbd36893 --- arch/arm/mach-rockchip/Kconfig | 6 ++++++ arch/arm/mach-rockchip/board.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index f1c2ec3045..be5c8d7a1a 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -777,6 +777,12 @@ config ROCKCHIP_UART_MUX_SEL_M help This select uart multiplexer for debug uart iomux in board_debug_uart_init. +config ROCKCHIP_REBOOT_TEST + bool "Rockchip reboot stress test before kernel" + default n + help + It's a reboot stress test before kernel stages. + config BASE_DEFCONFIG string "Base defconfig of config fragment" default "" diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index 6e9f03e5a6..d1e59655e0 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -912,6 +912,10 @@ void board_quiesce_devices(void *images) atags_destroy(); #endif +#ifdef CONFIG_ROCKCHIP_REBOOT_TEST + do_reset(NULL, 0, 0, NULL); +#endif + #ifdef CONFIG_FIT_ROLLBACK_PROTECT int ret;