diff mbox series

[2/3] ARM: stm32: Increment boot counter in SPL on DHSOM

Message ID 20221206023515.113556-2-marex@denx.de
State Accepted
Commit 1ca617f5fd5bb5a0a6e3fad5fbab60493ab14f26
Delegated to: Patrice Chotard
Headers show
Series [1/3] ARM: stm32: Enable assorted ST specific commands on DHSOM | expand

Commit Message

Marek Vasut Dec. 6, 2022, 2:35 a.m. UTC
Increment the boot counter already in U-Boot SPL instead of incrementing
it only later in U-Boot proper. This can be used by SPL to boot either of
two U-Boot copies and improve redundancy of software on the platform, e.g.
in case of full A/B update strategy.

Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
---
 configs/stm32mp15_dhcom_basic_defconfig | 1 +
 configs/stm32mp15_dhcor_basic_defconfig | 1 +
 2 files changed, 2 insertions(+)

Comments

Patrice CHOTARD Dec. 6, 2022, 7:39 a.m. UTC | #1
Hi 

On 12/6/22 03:35, Marek Vasut wrote:
> Increment the boot counter already in U-Boot SPL instead of incrementing
> it only later in U-Boot proper. This can be used by SPL to boot either of
> two U-Boot copies and improve redundancy of software on the platform, e.g.
> in case of full A/B update strategy.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
>  configs/stm32mp15_dhcom_basic_defconfig | 1 +
>  configs/stm32mp15_dhcor_basic_defconfig | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/configs/stm32mp15_dhcom_basic_defconfig b/configs/stm32mp15_dhcom_basic_defconfig
> index 92ccbb70939..f1eb022bc66 100644
> --- a/configs/stm32mp15_dhcom_basic_defconfig
> +++ b/configs/stm32mp15_dhcom_basic_defconfig
> @@ -36,6 +36,7 @@ CONFIG_CONSOLE_MUX=y
>  CONFIG_BOARD_EARLY_INIT_F=y
>  CONFIG_SPL_FOOTPRINT_LIMIT=y
>  CONFIG_SPL_MAX_FOOTPRINT=0x3db00
> +CONFIG_SPL_BOOTCOUNT_LIMIT=y
>  CONFIG_SPL_LEGACY_IMAGE_FORMAT=y
>  # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
>  CONFIG_SPL_STACK=0x30000000
> diff --git a/configs/stm32mp15_dhcor_basic_defconfig b/configs/stm32mp15_dhcor_basic_defconfig
> index 306221404df..2e9f2049784 100644
> --- a/configs/stm32mp15_dhcor_basic_defconfig
> +++ b/configs/stm32mp15_dhcor_basic_defconfig
> @@ -34,6 +34,7 @@ CONFIG_CONSOLE_MUX=y
>  CONFIG_BOARD_EARLY_INIT_F=y
>  CONFIG_SPL_FOOTPRINT_LIMIT=y
>  CONFIG_SPL_MAX_FOOTPRINT=0x3db00
> +CONFIG_SPL_BOOTCOUNT_LIMIT=y
>  CONFIG_SPL_LEGACY_IMAGE_FORMAT=y
>  # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
>  CONFIG_SPL_STACK=0x30000000

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Thanks
Patrice
Patrick DELAUNAY Dec. 6, 2022, 9:36 a.m. UTC | #2
Hi,

On 12/6/22 03:35, Marek Vasut wrote:
> Increment the boot counter already in U-Boot SPL instead of incrementing
> it only later in U-Boot proper. This can be used by SPL to boot either of
> two U-Boot copies and improve redundancy of software on the platform, e.g.
> in case of full A/B update strategy.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
>   configs/stm32mp15_dhcom_basic_defconfig | 1 +
>   configs/stm32mp15_dhcor_basic_defconfig | 1 +
>   2 files changed, 2 insertions(+)
>


Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Thanks
Patrick
Patrice CHOTARD Dec. 7, 2022, 4:08 p.m. UTC | #3
On 12/6/22 08:39, Patrice CHOTARD wrote:
> Hi 
> 
> On 12/6/22 03:35, Marek Vasut wrote:
>> Increment the boot counter already in U-Boot SPL instead of incrementing
>> it only later in U-Boot proper. This can be used by SPL to boot either of
>> two U-Boot copies and improve redundancy of software on the platform, e.g.
>> in case of full A/B update strategy.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> ---
>> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
>> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
>> ---
>>  configs/stm32mp15_dhcom_basic_defconfig | 1 +
>>  configs/stm32mp15_dhcor_basic_defconfig | 1 +
>>  2 files changed, 2 insertions(+)
>>
>> diff --git a/configs/stm32mp15_dhcom_basic_defconfig b/configs/stm32mp15_dhcom_basic_defconfig
>> index 92ccbb70939..f1eb022bc66 100644
>> --- a/configs/stm32mp15_dhcom_basic_defconfig
>> +++ b/configs/stm32mp15_dhcom_basic_defconfig
>> @@ -36,6 +36,7 @@ CONFIG_CONSOLE_MUX=y
>>  CONFIG_BOARD_EARLY_INIT_F=y
>>  CONFIG_SPL_FOOTPRINT_LIMIT=y
>>  CONFIG_SPL_MAX_FOOTPRINT=0x3db00
>> +CONFIG_SPL_BOOTCOUNT_LIMIT=y
>>  CONFIG_SPL_LEGACY_IMAGE_FORMAT=y
>>  # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
>>  CONFIG_SPL_STACK=0x30000000
>> diff --git a/configs/stm32mp15_dhcor_basic_defconfig b/configs/stm32mp15_dhcor_basic_defconfig
>> index 306221404df..2e9f2049784 100644
>> --- a/configs/stm32mp15_dhcor_basic_defconfig
>> +++ b/configs/stm32mp15_dhcor_basic_defconfig
>> @@ -34,6 +34,7 @@ CONFIG_CONSOLE_MUX=y
>>  CONFIG_BOARD_EARLY_INIT_F=y
>>  CONFIG_SPL_FOOTPRINT_LIMIT=y
>>  CONFIG_SPL_MAX_FOOTPRINT=0x3db00
>> +CONFIG_SPL_BOOTCOUNT_LIMIT=y
>>  CONFIG_SPL_LEGACY_IMAGE_FORMAT=y
>>  # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
>>  CONFIG_SPL_STACK=0x30000000
> 
> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
> Thanks
> Patrice
Applied to u-boot-stm/master

Thanks
Patrice
diff mbox series

Patch

diff --git a/configs/stm32mp15_dhcom_basic_defconfig b/configs/stm32mp15_dhcom_basic_defconfig
index 92ccbb70939..f1eb022bc66 100644
--- a/configs/stm32mp15_dhcom_basic_defconfig
+++ b/configs/stm32mp15_dhcom_basic_defconfig
@@ -36,6 +36,7 @@  CONFIG_CONSOLE_MUX=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_FOOTPRINT_LIMIT=y
 CONFIG_SPL_MAX_FOOTPRINT=0x3db00
+CONFIG_SPL_BOOTCOUNT_LIMIT=y
 CONFIG_SPL_LEGACY_IMAGE_FORMAT=y
 # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
 CONFIG_SPL_STACK=0x30000000
diff --git a/configs/stm32mp15_dhcor_basic_defconfig b/configs/stm32mp15_dhcor_basic_defconfig
index 306221404df..2e9f2049784 100644
--- a/configs/stm32mp15_dhcor_basic_defconfig
+++ b/configs/stm32mp15_dhcor_basic_defconfig
@@ -34,6 +34,7 @@  CONFIG_CONSOLE_MUX=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_FOOTPRINT_LIMIT=y
 CONFIG_SPL_MAX_FOOTPRINT=0x3db00
+CONFIG_SPL_BOOTCOUNT_LIMIT=y
 CONFIG_SPL_LEGACY_IMAGE_FORMAT=y
 # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
 CONFIG_SPL_STACK=0x30000000