From 16a9368a88a28252ea1daedc1df03ccc49ea5b22 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Thu, 18 Oct 2012 14:31:10 +0200 Subject: 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. --- board/toradex/common/tegra2_partitions.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit v1.2.3