diff options
author | Igor Grinberg <grinberg@compulab.co.il> | 2014-11-03 11:32:18 +0200 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-11-06 11:04:40 -0500 |
commit | a937fd1682625b1f87b555e2af9117fcb2999d7c (patch) | |
tree | 6f39f972c9387f7af48fde11ecc941829debba62 /board/compulab/cm_t35/cm_t35.c | |
parent | 52d848695c36d2b6ce688d1403653653e82583b4 (diff) | |
download | u-boot-a937fd1682625b1f87b555e2af9117fcb2999d7c.tar.gz u-boot-a937fd1682625b1f87b555e2af9117fcb2999d7c.tar.xz u-boot-a937fd1682625b1f87b555e2af9117fcb2999d7c.zip |
compulab: refactor board revision handling
Move board revision handling code to a common location
for further reuse.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Reviewed-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'board/compulab/cm_t35/cm_t35.c')
-rw-r--r-- | board/compulab/cm_t35/cm_t35.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c index d0b0930f42..5453942202 100644 --- a/board/compulab/cm_t35/cm_t35.c +++ b/board/compulab/cm_t35/cm_t35.c @@ -33,6 +33,7 @@ #include <asm/ehci-omap.h> #include <asm/gpio.h> +#include "../common/common.h" #include "../common/eeprom.h" DECLARE_GLOBAL_DATA_PTR; @@ -154,34 +155,18 @@ int board_init(void) return 0; } -static u32 cm_t3x_rev; - /* * Routine: get_board_rev * Description: read system revision */ u32 get_board_rev(void) { - if (!cm_t3x_rev) - cm_t3x_rev = cl_eeprom_get_board_rev(); - - return cm_t3x_rev; + return cl_eeprom_get_board_rev(); }; -/* - * Routine: misc_init_r - * Description: display die ID - */ int misc_init_r(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); + cl_print_pcb_info(); dieid_num_r(); return 0; |