diff options
author | Patrick Delaunay | 2020-02-12 19:37:42 +0100 |
---|---|---|
committer | Patrick Delaunay | 2020-03-24 14:15:05 +0100 |
commit | 61f6d4619859642c64870d54f75029d217e587fb (patch) | |
tree | 8a3f048b13e5a328f21a2a326c43a26e7998a630 /board/st | |
parent | 888dc681362b003e9c7c3022f5057945006b89c7 (diff) |
board: stm32mp1: display reference only for STMicroelectronics board
Display the reference MBxxxx found in OTP49
only for STMicroelectronics boards when CONFIG_CMD_STBOARD
is activated.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
# Conflicts:
# board/st/stm32mp1/stm32mp1.c
Diffstat (limited to 'board/st')
-rw-r--r-- | board/st/stm32mp1/stm32mp1.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 4dd0098c6e8..07f5344ec90 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -105,20 +105,20 @@ int checkboard(void) puts("\n"); /* display the STMicroelectronics board identification */ - ret = uclass_get_device_by_driver(UCLASS_MISC, - DM_GET_DRIVER(stm32mp_bsec), - &dev); - - if (!ret) - ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_BOARD), - &otp, sizeof(otp)); - if (ret > 0 && otp) { - printf("Board: MB%04x Var%d.%d Rev.%c-%02d\n", - otp >> 16, - (otp >> 12) & 0xF, - (otp >> 4) & 0xF, - ((otp >> 8) & 0xF) - 1 + 'A', - otp & 0xF); + if (CONFIG_IS_ENABLED(CMD_STBOARD)) { + ret = uclass_get_device_by_driver(UCLASS_MISC, + DM_GET_DRIVER(stm32mp_bsec), + &dev); + if (!ret) + ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_BOARD), + &otp, sizeof(otp)); + if (ret > 0 && otp) + printf("Board: MB%04x Var%d.%d Rev.%c-%02d\n", + otp >> 16, + (otp >> 12) & 0xF, + (otp >> 4) & 0xF, + ((otp >> 8) & 0xF) - 1 + 'A', + otp & 0xF); } return 0; |