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>
This commit is contained in:
parent
a1f34ed873
commit
a5825625e5
@ -9,7 +9,10 @@
|
||||
#include <dm.h>
|
||||
#include <asm/arch/gp_padctrl.h>
|
||||
#include <asm/arch/pinmux.h>
|
||||
#include <asm/arch-tegra/ap.h>
|
||||
#include <asm/arch-tegra/tegra.h>
|
||||
#include <asm/gpio.h>
|
||||
#include <asm/io.h>
|
||||
#include <i2c.h>
|
||||
#include <netdev.h>
|
||||
|
||||
@ -18,6 +21,15 @@
|
||||
#define PMU_I2C_ADDRESS 0x2D
|
||||
#define MAX_I2C_RETRY 3
|
||||
|
||||
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
|
||||
|
@ -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
|
||||
/*
|
||||
|
@ -8,10 +8,22 @@
|
||||
#include <common.h>
|
||||
#include <asm/arch/pinmux.h>
|
||||
#include <asm/arch/gp_padctrl.h>
|
||||
#include <asm/arch-tegra/ap.h>
|
||||
#include <asm/arch-tegra/tegra.h>
|
||||
#include <asm/io.h>
|
||||
#include "pinmux-config-colibri_t30.h"
|
||||
#include <i2c.h>
|
||||
#include <asm/gpio.h>
|
||||
|
||||
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
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
#include "tegra30-common.h"
|
||||
|
||||
#define CONFIG_ARCH_MISC_INIT
|
||||
|
||||
/* High-level configuration options */
|
||||
#define CONFIG_TEGRA_BOARD_STRING "Toradex Apalis T30"
|
||||
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
#include "tegra20-common.h"
|
||||
|
||||
#define CONFIG_ARCH_MISC_INIT
|
||||
|
||||
/* High-level configuration options */
|
||||
#define CONFIG_TEGRA_BOARD_STRING "Toradex Colibri T20"
|
||||
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
#include "tegra30-common.h"
|
||||
|
||||
#define CONFIG_ARCH_MISC_INIT
|
||||
|
||||
/* High-level configuration options */
|
||||
#define CONFIG_TEGRA_BOARD_STRING "Toradex Colibri T30"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user