aboutsummaryrefslogtreecommitdiff
path: root/board/compulab/common/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/compulab/common/common.c')
-rw-r--r--board/compulab/common/common.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/board/compulab/common/common.c b/board/compulab/common/common.c
new file mode 100644
index 00000000000..6d2d7b0bd02
--- /dev/null
+++ b/board/compulab/common/common.c
@@ -0,0 +1,25 @@
+/*
+ * (C) Copyright 2014 CompuLab, Ltd. <www.compulab.co.il>
+ *
+ * Authors: Igor Grinberg <grinberg@compulab.co.il>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/bootm.h>
+
+#include "common.h"
+#include "eeprom.h"
+
+void cl_print_pcb_info(void)
+{
+ u32 board_rev = get_board_rev();
+ u32 rev_major = board_rev / 100;
+ u32 rev_minor = board_rev - (rev_major * 100);
+
+ if ((rev_minor / 10) * 10 == rev_minor)
+ rev_minor = rev_minor / 10;
+
+ printf("PCB: %u.%u\n", rev_major, rev_minor);
+}