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_t30/colibri_t30.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'board/toradex/colibri_t30') diff --git a/board/toradex/colibri_t30/colibri_t30.c b/board/toradex/colibri_t30/colibri_t30.c index f4bc7d8..7ca79eb 100644 --- a/board/toradex/colibri_t30/colibri_t30.c +++ b/board/toradex/colibri_t30/colibri_t30.c @@ -8,10 +8,22 @@ #include #include #include +#include +#include +#include #include "pinmux-config-colibri_t30.h" #include #include +int arch_misc_init(void) +{ + if (readl(NV_PA_BASE_SRAM + NVBOOTINFOTABLE_BOOTTYPE) == + NVBOOTTYPE_RECOVERY) + printf("USB recovery mode\n"); + + return 0; +} + /* * Routine: pinmux_init * Description: Do individual peripheral pinmux configs -- cgit v1.1