mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
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
This commit is contained in:
parent
888dc68136
commit
61f6d46198
1 changed files with 14 additions and 14 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue