]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tegra: Add a board ID function
authorSimon Glass <sjg@chromium.org>
Wed, 15 Apr 2015 03:03:25 +0000 (21:03 -0600)
committerTom Warren <twarren@nvidia.com>
Wed, 13 May 2015 16:24:07 +0000 (09:24 -0700)
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>
arch/arm/include/asm/arch-tegra/sys_proto.h
board/nvidia/common/board.c

index 8b3fbe12faaddf7e020e40125579a89f4aaae375..914d8b956d844ccf0017576ca18b161d07e9ee65 100644 (file)
@@ -8,12 +8,13 @@
 #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
index f1a9496c04199a9843e43174e04db00482cb6ce2..b5a69dfbbcd5bd7a8263042b31b04dc68aa2d9af 100644 (file)
@@ -81,10 +81,20 @@ static void power_det_init(void)
 #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;
 }