diff options
Diffstat (limited to 'board/synopsys/emsdp/emsdp.c')
-rw-r--r-- | board/synopsys/emsdp/emsdp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/board/synopsys/emsdp/emsdp.c b/board/synopsys/emsdp/emsdp.c index 3d05f7a8a5..c0770b58c1 100644 --- a/board/synopsys/emsdp/emsdp.c +++ b/board/synopsys/emsdp/emsdp.c @@ -80,6 +80,7 @@ int board_mmc_getcd(struct mmc *mmc) #define CREG_BASE 0xF0001000 #define CREG_BOOT (void *)(CREG_BASE + 0x0FF0) #define CREG_IP_SW_RESET (void *)(CREG_BASE + 0x0FF0) +#define CREG_IP_VERSION (void *)(CREG_BASE + 0x0FF8) /* Bits in CREG_BOOT register */ #define CREG_BOOT_WP_BIT BIT(8) @@ -133,3 +134,12 @@ U_BOOT_CMD( "rom unlock - Unlock non-volatile memory for writing\n" "emsdp rom lock - Lock non-volatile memory to prevent writing\n" ); + +int checkboard(void) +{ + int version = readl(CREG_IP_VERSION); + + printf("Board: ARC EM Software Development Platform v%d.%d\n", + (version >> 16) & 0xff, version & 0xff); + return 0; +}; |