diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2015-08-06 01:47:00 +0300 |
---|---|---|
committer | Tom Warren <twarren@nvidia.com> | 2015-08-13 23:06:01 +0300 |
commit | a5825625e56d7af4630d7892b214fc38c75264e3 (patch) | |
tree | 84cfd379ef96b6fd8691f120bff00f8386273390 /board/toradex/colibri_t20 | |
parent | a1f34ed87356ffa0095ca1962098abfcc58fe374 (diff) | |
download | u-boot-a5825625e56d7af4630d7892b214fc38c75264e3.tar.xz |
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 <marcel.ziswiler@toradex.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'board/toradex/colibri_t20')
-rw-r--r-- | board/toradex/colibri_t20/colibri_t20.c | 12 |
1 files changed, 12 insertions, 0 deletions
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 <asm/arch/clock.h> #include <asm/arch/funcmux.h> #include <asm/arch/pinmux.h> +#include <asm/arch-tegra/ap.h> #include <asm/arch-tegra/board.h> +#include <asm/arch-tegra/tegra.h> #include <asm/gpio.h> +#include <asm/io.h> + +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 /* |