summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-10-18 12:49:29 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2012-10-18 19:17:50 +0200
commitcac4ae7a91a4872dd67084cb244f68446a4b39b8 (patch)
tree90343c6b35b0d43f20b82026a5e29f57c702670e /arch
parent22e3ede7d034616be39c48656a16d96fbfb27f43 (diff)
colibri_t20: nand: integrate NVIDIA partition table parsing
NVIDIA's NAND layout includes a partition table that can be used to generically construct the mtdparts kernel boot argument. As an added benefit this is completely independent of the underlying NAND part used which differs with various module versions. It further allows our customer easy adoption to their own custom partition layout. Initial partition table parsing courtesy of Mitja Špes from LXNAV.
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/arch-tegra/tegra.h5
-rw-r--r--arch/arm/lib/board.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-tegra/tegra.h b/arch/arm/include/asm/arch-tegra/tegra.h
index c51a8014e0..db00ebf167 100644
--- a/arch/arm/include/asm/arch-tegra/tegra.h
+++ b/arch/arm/include/asm/arch-tegra/tegra.h
@@ -78,6 +78,11 @@ struct timerus {
unsigned int cntr_1us;
};
+#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 {
SKU_ID_T20 = 0x8,
SKU_ID_T25SE = 0x14,
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 10ef2c8128..c6a12463e0 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -87,6 +87,10 @@ extern void rtl8019_get_enetaddr (uchar * addr);
#include <i2c.h>
#endif
+#ifdef CONFIG_COLIBRI_T20
+extern void tegra_partition_init(void);
+#endif
+
/************************************************************************
* Coloured LED functionality
@@ -594,6 +598,10 @@ 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);