[PATCH 3/9] Convert CONFIG_BOARD_POSTCLK_INIT to Kconfig

Tom Rini trini at konsulko.com
Fri Feb 25 17:19:47 CET 2022


This converts the following to Kconfig:
   CONFIG_BOARD_POSTCLK_INIT

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 README                       | 1 -
 arch/arm/Kconfig             | 2 ++
 arch/xtensa/Kconfig          | 1 +
 common/Kconfig               | 6 ++++++
 include/configs/brppt2.h     | 1 -
 include/configs/mx6_common.h | 1 -
 include/configs/mx7ulp_com.h | 1 -
 include/configs/mx7ulp_evk.h | 1 -
 include/configs/xtfpga.h     | 2 --
 9 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/README b/README
index f51f392111f9..5d2c1baec512 100644
--- a/README
+++ b/README
@@ -1972,7 +1972,6 @@ typically in board_init_f() and board_init_r().
 - CONFIG_BOARD_EARLY_INIT_F: Call board_early_init_f()
 - CONFIG_BOARD_EARLY_INIT_R: Call board_early_init_r()
 - CONFIG_BOARD_LATE_INIT: Call board_late_init()
-- CONFIG_BOARD_POSTCLK_INIT: Call board_postclk_init()
 
 Configuration Settings:
 -----------------------
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 391a77c2b44e..06a540d965da 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -869,6 +869,7 @@ config ARCH_MX31
 
 config ARCH_MX7ULP
 	bool "NXP MX7ULP"
+	select BOARD_POSTCLK_INIT
 	select CPU_V7A
 	select GPIO_EXTRA_HEADER
 	select MACH_IMX
@@ -894,6 +895,7 @@ config ARCH_MX7
 
 config ARCH_MX6
 	bool "Freescale MX6"
+	select BOARD_POSTCLK_INIT
 	select CPU_V7A
 	select GPIO_EXTRA_HEADER
 	select MACH_IMX
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 35e5b89dda04..8f668cc67ed0 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -13,6 +13,7 @@ choice
 
 config TARGET_XTFPGA
 	bool "Support XTFPGA"
+	select BOARD_POSTCLK_INIT
 
 endchoice
 
diff --git a/common/Kconfig b/common/Kconfig
index 82cd864baf93..add4cdae0282 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -524,6 +524,12 @@ config BOARD_EARLY_INIT_R
 	  relocation. With this option, U-Boot calls board_early_init_r()
 	  in the post-relocation init sequence.
 
+config BOARD_POSTCLK_INIT
+	bool "Call board_postclk_init"
+	help
+	  Some boards need this to initialize select items, after clocks /
+	  timebase and before env / serial.
+
 config BOARD_LATE_INIT
 	bool "Execute Board late init"
 	help
diff --git a/include/configs/brppt2.h b/include/configs/brppt2.h
index 7ab7f559e3ed..612999fbabe3 100644
--- a/include/configs/brppt2.h
+++ b/include/configs/brppt2.h
@@ -17,7 +17,6 @@
 #define CONFIG_SYS_PL310_BASE		L2_PL310_BASE
 #endif /* !CONFIG_SYS_L2CACHE_OFF */
 
-#define CONFIG_BOARD_POSTCLK_INIT
 #define CONFIG_MXC_GPT_HCLK
 
 /* MMC */
diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
index 5ff931ee3bc9..a0e481703bcb 100644
--- a/include/configs/mx6_common.h
+++ b/include/configs/mx6_common.h
@@ -18,7 +18,6 @@
 #endif
 
 #endif
-#define CONFIG_BOARD_POSTCLK_INIT
 #define CONFIG_MXC_GPT_HCLK
 
 #define CONFIG_SYS_BOOTM_LEN	0x1000000
diff --git a/include/configs/mx7ulp_com.h b/include/configs/mx7ulp_com.h
index 75f5cf0b6de3..319de9b01429 100644
--- a/include/configs/mx7ulp_com.h
+++ b/include/configs/mx7ulp_com.h
@@ -15,7 +15,6 @@
 #include "imx7ulp_spl.h"
 #endif
 
-#define CONFIG_BOARD_POSTCLK_INIT
 #define CONFIG_SYS_BOOTM_LEN		0x1000000
 
 /*
diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h
index 8f2cbc643eec..e80d748d991b 100644
--- a/include/configs/mx7ulp_evk.h
+++ b/include/configs/mx7ulp_evk.h
@@ -11,7 +11,6 @@
 #include <linux/sizes.h>
 #include <asm/arch/imx-regs.h>
 
-#define CONFIG_BOARD_POSTCLK_INIT
 #define CONFIG_SYS_BOOTM_LEN		0x1000000
 
 #define CONFIG_MMCROOT                  "/dev/mmcblk0p2"  /* USDHC1 */
diff --git a/include/configs/xtfpga.h b/include/configs/xtfpga.h
index 8c2cdb5cbdd8..038dd775312f 100644
--- a/include/configs/xtfpga.h
+++ b/include/configs/xtfpga.h
@@ -97,8 +97,6 @@
 /* U-Boot general configuration */
 /*==============================*/
 
-#define CONFIG_BOARD_POSTCLK_INIT
-
 #define CONFIG_BOOTFILE			"uImage"
 	/* Console I/O Buffer Size  */
 #define CONFIG_SYS_CBSIZE		1024
-- 
2.25.1



More information about the U-Boot mailing list