summaryrefslogtreecommitdiff
path: root/board/toradex/common/configblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/toradex/common/configblock.c')
-rw-r--r--board/toradex/common/configblock.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/board/toradex/common/configblock.c b/board/toradex/common/configblock.c
index 5d28bc7d38..bd76b845a8 100644
--- a/board/toradex/common/configblock.c
+++ b/board/toradex/common/configblock.c
@@ -8,6 +8,7 @@
#include <malloc.h>
#include <mmc.h>
+#include <nand.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -141,6 +142,12 @@ int read_trdx_cfg_block(void)
/* Switch back to regular eMMC user partition */
mmc_switch_part(0, 0);
#endif /* CONFIG_TRDX_CFG_BLOCK_IS_IN_MMC */
+#ifdef CONFIG_TRDX_CFG_BLOCK_IS_IN_NAND
+ /* Read production parameter config block from first NAND block */
+ if (nand_read_skip_bad(&nand_info[0], CONFIG_TRDX_CFG_BLOCK_OFFSET,
+ &size, NULL, nand_info[0].size, config_block))
+ return 1;
+#endif
/* Check validity */
cfg_block_ethaddr = config_block + 8;