diff mbox series

[02/10] board: stm32mp1: read OTP in command stboard

Message ID 20200212183744.5309-3-patrick.delaunay@st.com
State Accepted
Commit fdabacecf0af242d92e312faa4df6c24857f8935
Headers show
Series stm32mp1: board and SOC identifications | expand

Commit Message

Patrick Delaunay Feb. 12, 2020, 6:37 p.m. UTC
Read the value directly from the OTP and no more of the shadows
to avoid the need of reboot after stboard command to have correct value.

Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
---

 board/st/common/cmd_stboard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Patrice CHOTARD March 18, 2020, 10:05 a.m. UTC | #1
On 2/12/20 7:37 PM, Patrick Delaunay wrote:
> Read the value directly from the OTP and no more of the shadows
> to avoid the need of reboot after stboard command to have correct value.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> ---
>
>  board/st/common/cmd_stboard.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/st/common/cmd_stboard.c b/board/st/common/cmd_stboard.c
> index b740f4510e..c7ca773b1c 100644
> --- a/board/st/common/cmd_stboard.c
> +++ b/board/st/common/cmd_stboard.c
> @@ -58,7 +58,7 @@ static int do_stboard(cmd_tbl_t *cmdtp, int flag, int argc,
>  					  DM_GET_DRIVER(stm32mp_bsec),
>  					  &dev);
>  
> -	ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_BOARD),
> +	ret = misc_read(dev, STM32_BSEC_OTP(BSEC_OTP_BOARD),
>  			&otp, sizeof(otp));
>  
>  	if (ret < 0) {

Acked-by: Patrice Chotard <patrice.chotard at st.com>

Thanks

Patrice
Patrick Delaunay March 24, 2020, 8:33 a.m. UTC | #2
Hi,

> From: Patrick DELAUNAY <patrick.delaunay at st.com>
> Sent: mercredi 12 f?vrier 2020 19:38
> 
> Read the value directly from the OTP and no more of the shadows to avoid the
> need of reboot after stboard command to have correct value.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> ---

Applied to u-boot-stm/next, thanks!

Regards

Patrick
diff mbox series

Patch

diff --git a/board/st/common/cmd_stboard.c b/board/st/common/cmd_stboard.c
index b740f4510e..c7ca773b1c 100644
--- a/board/st/common/cmd_stboard.c
+++ b/board/st/common/cmd_stboard.c
@@ -58,7 +58,7 @@  static int do_stboard(cmd_tbl_t *cmdtp, int flag, int argc,
 					  DM_GET_DRIVER(stm32mp_bsec),
 					  &dev);
 
-	ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_BOARD),
+	ret = misc_read(dev, STM32_BSEC_OTP(BSEC_OTP_BOARD),
 			&otp, sizeof(otp));
 
 	if (ret < 0) {