summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/arch-tegra/tegra.h1
-rw-r--r--arch/arm/include/asm/global_data.h7
-rw-r--r--arch/arm/lib/board.c22
3 files changed, 21 insertions, 9 deletions
diff --git a/arch/arm/include/asm/arch-tegra/tegra.h b/arch/arm/include/asm/arch-tegra/tegra.h
index db00ebf167d..73cd230e119 100644
--- a/arch/arm/include/asm/arch-tegra/tegra.h
+++ b/arch/arm/include/asm/arch-tegra/tegra.h
@@ -80,7 +80,6 @@ struct timerus {
#define NVBOOTINFOTABLE_BCTSIZE 0x38 /* BCT size in BIT in IRAM */
#define NVBOOTINFOTABLE_BCTPTR 0x3C /* BCT pointer in BIT in IRAM */
-#define BCT_PTINFO_OFFSET 3820
/* These are the available SKUs (product types) for Tegra */
enum {
diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
index 97cfbf67c63..87c6761326d 100644
--- a/arch/arm/include/asm/global_data.h
+++ b/arch/arm/include/asm/global_data.h
@@ -80,10 +80,13 @@ typedef struct global_data {
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
#if defined(CONFIG_COLIBRI_T20) || defined(CONFIG_COLIBRI_T30)
- unsigned env_offset; /* offset to U-Boot environment */
unsigned conf_blk_offset; /* offset to Toradex config block */
- unsigned kernel_offset; /* offset to kernel in mass storage */
+ unsigned env_offset; /* offset to U-Boot environment */
+#if (defined(CONFIG_ENV_IS_IN_MMC) && defined(CONFIG_COLIBRI_T20)) || defined(CONFIG_COLIBRI_T30)
+ unsigned gpt_offset; /* offset to GPT in mass storage */
#endif
+ unsigned kernel_offset; /* offset to kernel in mass storage */
+#endif /* CONFIG_COLIBRI_T20 | CONFIG_COLIBRI_T30 */
} gd_t;
/*
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index c6a12463e03..43b3733087b 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -87,8 +87,8 @@ extern void rtl8019_get_enetaddr (uchar * addr);
#include <i2c.h>
#endif
-#ifdef CONFIG_COLIBRI_T20
-extern void tegra_partition_init(void);
+#if defined(CONFIG_COLIBRI_T20) || defined(CONFIG_COLIBRI_T30)
+extern void tegra_partition_init(int boot_type);
#endif
@@ -598,15 +598,25 @@ void board_init_r (gd_t *id, ulong dest_addr)
onenand_init();
#endif
-#ifdef CONFIG_COLIBRI_T20
- tegra_partition_init();
-#endif
-
#ifdef CONFIG_GENERIC_MMC
puts("MMC: ");
mmc_initialize(bd);
#endif
+#if defined(CONFIG_COLIBRI_T20) || defined(CONFIG_COLIBRI_T30)
+ tegra_partition_init(
+#ifdef CONFIG_COLIBRI_T20
+#ifndef CONFIG_ENV_IS_IN_MMC
+ 0
+#else /* !CONFIG_ENV_IS_IN_MMC */
+ 1
+#endif /* !CONFIG_ENV_IS_IN_MMC */
+#else /* CONFIG_COLIBRI_T20 */
+ 2
+#endif /* CONFIG_COLIBRI_T20 */
+ );
+#endif /* CONFIG_COLIBRI_T20 | CONFIG_COLIBRI_T30 */
+
#ifdef CONFIG_HAS_DATAFLASH
AT91F_DataflashInit();
dataflash_print_info();