arm, am335x: siemens boards add FIT support
add FIT support and set "boardid" from factoryset records
"DEV/id" and "COMP/ver". "boardid" is used for selecting
which fit configuration gets booted on the board.
Signed-off-by: Heiko Schocher <hs@denx.de>
diff --git a/board/siemens/rut/board.c b/board/siemens/rut/board.c
index 1752df2..fb840f7 100644
--- a/board/siemens/rut/board.c
+++ b/board/siemens/rut/board.c
@@ -467,4 +467,27 @@
return 0;
}
#endif /* ifdef CONFIG_VIDEO */
+
+#ifdef CONFIG_BOARD_LATE_INIT
+int board_late_init(void)
+{
+ int ret;
+ char tmp[2 * MAX_STRING_LENGTH + 2];
+
+ omap_nand_switch_ecc(1, 8);
+
+ if (factory_dat.asn[0] != 0)
+ sprintf(tmp, "%s_%s", factory_dat.asn,
+ factory_dat.comp_version);
+ else
+ sprintf(tmp, "QMX7.E38_4.0");
+
+ ret = setenv("boardid", tmp);
+ if (ret)
+ printf("error setting board id\n");
+
+ return 0;
+}
+#endif
+
#include "../common/board.c"