From a5825625e56d7af4630d7892b214fc38c75264e3 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Thu, 6 Aug 2015 00:47:00 +0200 Subject: apalis/colibri_t20/t30: integrate recovery mode detection Allow detecting whether or not U-Boot was launched through the recovery mode of the resp. NVIDIA SoC. Make use of a board specific arch_misc_init() and enable the same via CONFIG_ARCH_MISC_INIT configuration option. Signed-off-by: Marcel Ziswiler Acked-by: Stephen Warren Signed-off-by: Tom Warren --- board/toradex/colibri_t20/colibri_t20.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'board/toradex/colibri_t20') diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c index 8ae9ccf538..7210a8a34e 100644 --- a/board/toradex/colibri_t20/colibri_t20.c +++ b/board/toradex/colibri_t20/colibri_t20.c @@ -8,8 +8,20 @@ #include #include #include +#include #include +#include #include +#include + +int arch_misc_init(void) +{ + if (readl(NV_PA_BASE_SRAM + NVBOOTINFOTABLE_BOOTTYPE) == + NVBOOTTYPE_RECOVERY) + printf("USB recovery mode\n"); + + return 0; +} #ifdef CONFIG_TEGRA_MMC /* -- cgit