summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-10-18 14:31:10 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2012-10-18 19:18:14 +0200
commit16a9368a88a28252ea1daedc1df03ccc49ea5b22 (patch)
treee8cba6893437c90e1473ec1f701fed491c2a3611
parent822ebe51342db269164a7dd7a5394e2e5892422d (diff)
colibri_t20: fix SD bootT20_LinuxImageV2.0Alpha2_20121019
If booting from SD card BCT contains information specific to SD card partition layout which is bogus if used for NAND partition parsing. Simply fall back to default offset just like in recovery BCT case. Note: in the future we could parse SD partition table as well to more generically support SD booting from various card densities.
-rw-r--r--board/toradex/common/tegra2_partitions.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/toradex/common/tegra2_partitions.c b/board/toradex/common/tegra2_partitions.c
index b8d8bf29ba1..c64d5e7299c 100644
--- a/board/toradex/common/tegra2_partitions.c
+++ b/board/toradex/common/tegra2_partitions.c
@@ -103,7 +103,11 @@ int nvtegra_read_partition_table(nvtegra_parttable_t * pt)
pt_logical = readw(bct_start + BCT_PTINFO_OFFSET);
/* In case we are running with a recovery BCT missing the partition
table offset information */
+#ifdef CONFIG_ENV_IS_IN_MMC
+ if (1) {
+#else
if (pt_logical == 0) {
+#endif
/* BCT partition size is 3 M in our default layout */
pt_logical = 3 * 1024 * 1024 / nand_info->writesize;
}