From: Patrick Delaunay <patrick.delaunay@foss.st.com>
Date: Tue, 7 Dec 2021 09:05:59 +0000 (+0100)
Subject: stm32mp: correct the dependency for bootcount configs
X-Git-Tag: v2025.01-rc5-pxa1908~1566^2~7
X-Git-Url: http://git.dujemihanovic.xyz/%22mailto:Murray.Jensen%40csiro.au/static/%7B%7B?a=commitdiff_plain;h=5c68904fe1890c00baaa455bcd336fa9c92ec243;p=u-boot.git

stm32mp: correct the dependency for bootcount configs

Default value for CONFIG_SYS_BOOTCOUNT_SINGLEWORD and
CONFIG_SYS_BOOTCOUNT_ADDR are only needed when
CONFIG_BOOTCOUNT_GENERIC is used.

This patch avoids to define these configs when an other bootcount backend
is activated, for example for CONFIG_BOOTCOUNT_ENV.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
---

diff --git a/arch/arm/mach-stm32mp/Kconfig b/arch/arm/mach-stm32mp/Kconfig
index 1ed2aad63e..811c0fc261 100644
--- a/arch/arm/mach-stm32mp/Kconfig
+++ b/arch/arm/mach-stm32mp/Kconfig
@@ -195,7 +195,7 @@ config PRE_CON_BUF_SZ
 config BOOTSTAGE_STASH_ADDR
 	default 0xC3000000
 
-if BOOTCOUNT_LIMIT
+if BOOTCOUNT_GENERIC
 config SYS_BOOTCOUNT_SINGLEWORD
 	default y