Add a way of displaying a numeric board ID on start-up.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
#ifndef _SYS_PROTO_H_
#define _SYS_PROTO_H_
-struct tegra_sysinfo {
- char *board_string;
-};
-
void invalidate_dcache(void);
-extern const struct tegra_sysinfo sysinfo;
+/**
+ * tegra_board_id() - Get the board iD
+ *
+ * @return a board ID, or -ve on error
+ */
+int tegra_board_id(void);
#endif
#endif
}
+__weak int tegra_board_id(void)
+{
+ return -1;
+}
+
#ifdef CONFIG_DISPLAY_BOARDINFO
int checkboard(void)
{
- printf("Board: %s\n", CONFIG_TEGRA_BOARD_STRING);
+ int board_id = tegra_board_id();
+
+ printf("Board: %s", CONFIG_TEGRA_BOARD_STRING);
+ if (board_id != -1)
+ printf(", ID: %d\n", board_id);
+ printf("\n");
return 0;
}