summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-10-18 14:31:10 +0200
committertrdx <trdx@vm_one.(none)>2012-10-18 18:32:38 +0200
commit17e6ae4470d638aba8502e6dec76ce6e36d63ddf (patch)
treee8cba6893437c90e1473ec1f701fed491c2a3611
parent87b460ba7e21efbcb789cc404dc9da90862cf968 (diff)
colibri_t20: fix SD boot
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 b8d8bf29ba..c64d5e7299 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;
}