summaryrefslogtreecommitdiffstats
path: root/board/siemens/pxm2
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2014-11-18 11:51:06 +0100
committerTom Rini <trini@ti.com>2014-12-04 21:28:32 -0500
commit0c331ebcc6843bb5e4e6727d1b4a13ef2284a5ab (patch)
treeccec1c14aae6786763a60cbf2cfd7a19da3f54fb /board/siemens/pxm2
parent4ac32b9c4db8e9e427584024c93773927644f7f4 (diff)
downloadblackbird-obmc-uboot-0c331ebcc6843bb5e4e6727d1b4a13ef2284a5ab.tar.gz
blackbird-obmc-uboot-0c331ebcc6843bb5e4e6727d1b4a13ef2284a5ab.zip
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>
Diffstat (limited to 'board/siemens/pxm2')
-rw-r--r--board/siemens/pxm2/board.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c
index 559af0e0e5..264ba025b7 100644
--- a/board/siemens/pxm2/board.c
+++ b/board/siemens/pxm2/board.c
@@ -428,4 +428,38 @@ static int board_video_init(void)
return 0;
}
#endif
+
+#ifdef CONFIG_BOARD_LATE_INIT
+int board_late_init(void)
+{
+ int ret;
+
+ omap_nand_switch_ecc(1, 8);
+
+#ifdef CONFIG_FACTORYSET
+ if (factory_dat.asn[0] != 0) {
+ char tmp[2 * MAX_STRING_LENGTH + 2];
+
+ if (strncmp((const char *)factory_dat.asn, "PXM50", 5) == 0)
+ factory_dat.pxm50 = 1;
+ else
+ factory_dat.pxm50 = 0;
+ sprintf(tmp, "%s_%s", factory_dat.asn,
+ factory_dat.comp_version);
+ ret = setenv("boardid", tmp);
+ if (ret)
+ printf("error setting board id\n");
+ } else {
+ factory_dat.pxm50 = 1;
+ ret = setenv("boardid", "PXM50_1.0");
+ if (ret)
+ printf("error setting board id\n");
+ }
+ debug("PXM50: %d\n", factory_dat.pxm50);
+#endif
+
+ return 0;
+}
+#endif
+
#include "../common/board.c"
OpenPOWER on IntegriCloud