Commit ec7466443432966db95ed2324732ee810bfa8229

Authored by Simon Glass
Committed by Tom Warren
1 parent 7d874132c4

tegra: Add a board ID function

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>

Showing 2 changed files with 17 additions and 6 deletions Side-by-side Diff

arch/arm/include/asm/arch-tegra/sys_proto.h
... ... @@ -8,13 +8,14 @@
8 8 #ifndef _SYS_PROTO_H_
9 9 #define _SYS_PROTO_H_
10 10  
11   -struct tegra_sysinfo {
12   - char *board_string;
13   -};
14   -
15 11 void invalidate_dcache(void);
16 12  
17   -extern const struct tegra_sysinfo sysinfo;
  13 +/**
  14 + * tegra_board_id() - Get the board iD
  15 + *
  16 + * @return a board ID, or -ve on error
  17 + */
  18 +int tegra_board_id(void);
18 19  
19 20 #endif
board/nvidia/common/board.c
... ... @@ -81,10 +81,20 @@
81 81 #endif
82 82 }
83 83  
  84 +__weak int tegra_board_id(void)
  85 +{
  86 + return -1;
  87 +}
  88 +
84 89 #ifdef CONFIG_DISPLAY_BOARDINFO
85 90 int checkboard(void)
86 91 {
87   - printf("Board: %s\n", CONFIG_TEGRA_BOARD_STRING);
  92 + int board_id = tegra_board_id();
  93 +
  94 + printf("Board: %s", CONFIG_TEGRA_BOARD_STRING);
  95 + if (board_id != -1)
  96 + printf(", ID: %d\n", board_id);
  97 + printf("\n");
88 98  
89 99 return 0;
90 100 }