diff --git a/board/nm/nmhw21/board.c b/board/nm/nmhw21/board.c index ba13444836..668426e843 100644 --- a/board/nm/nmhw21/board.c +++ b/board/nm/nmhw21/board.c @@ -148,6 +148,7 @@ DECLARE_GLOBAL_DATA_PTR; static int hw_ver = -1; static int hw_rev = -1; static int hw_patch = -1; +static int hw_type = -1; static char hw_variant_name[64]; #endif @@ -983,8 +984,13 @@ static void get_hw_version(void) bd_get_hw_version(&hw_ver, &hw_rev); bd_get_hw_patch(&hw_patch); + bd_get_hw_type(&hw_type); + if (hw_type == 0) { + /* Fallback to HW21 if tag is not present */ + hw_type = 21; + } - printf("HW21: V%d.%d\n", hw_ver, hw_rev); + printf("HW%02d: V%d.%d\n", hw_type, hw_ver, hw_rev); /* add hardware versions to environment */ snprintf(hw_versions, sizeof(hw_versions), "CP=%d.%d", hw_ver, hw_rev); @@ -998,8 +1004,13 @@ static void get_hw_version(void) { bd_get_hw_version(&hw_ver, &hw_rev); bd_get_hw_patch(&hw_patch); + bd_get_hw_type(&hw_type); + if (hw_type == 0) { + /* Fallback to HW21 if tag is not present */ + hw_type = 21; + } - printf("MB: V%d.%d\n", hw_ver, hw_rev); + printf("MB: V%d.%d (HW%2d)\n", hw_ver, hw_rev, hw_type); } #endif