diff mbox series

[U-Boot,v2] Convert CONFIG_BOARD_LATE_INIT to Kconfig

Message ID 20180818171825.3313-1-ramon.fried@gmail.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series [U-Boot,v2] Convert CONFIG_BOARD_LATE_INIT to Kconfig | expand

Commit Message

Ramon Fried Aug. 18, 2018, 5:18 p.m. UTC
This converts the remaining board defined
CONFIG_BOARD_LATE_INIT to Kconfig.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
---
Changes in v2:
* Removed config from Kconfig as it already exists on
  common/Kconfig.
* Changed the commit message.

 configs/am335x_pdu001_defconfig      | 1 +
 configs/bcm7445_defconfig            | 1 +
 configs/cl-som-imx7_defconfig        | 1 +
 configs/controlcenterdc_defconfig    | 1 +
 configs/hsdk_defconfig               | 1 +
 configs/mccmon6_nor_defconfig        | 1 +
 configs/mccmon6_sd_defconfig         | 1 +
 configs/mx53ppd_defconfig            | 1 +
 configs/stm32f746-disco_defconfig    | 1 +
 configs/stm32h743-disco_defconfig    | 1 +
 configs/stm32h743-eval_defconfig     | 1 +
 include/configs/bcmstb.h             | 1 -
 include/configs/cl-som-imx7.h        | 2 --
 include/configs/controlcenterdc.h    | 1 -
 include/configs/hsdk.h               | 1 -
 include/configs/mccmon6.h            | 1 -
 include/configs/mx53ppd.h            | 1 -
 include/configs/pdu001.h             | 1 -
 include/configs/stm32f746-disco.h    | 1 -
 include/configs/stm32h743-disco.h    | 1 -
 include/configs/stm32h743-eval.h     | 1 -
 include/configs/xilinx_zynqmp_mini.h | 1 -
 include/configs/zynq_cse.h           | 1 -
 23 files changed, 11 insertions(+), 13 deletions(-)

Comments

Tom Rini Aug. 20, 2018, 2:42 a.m. UTC | #1
On Sat, Aug 18, 2018 at 08:18:25PM +0300, Ramon Fried wrote:

> This converts the remaining board defined
> CONFIG_BOARD_LATE_INIT to Kconfig.
> 
> Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
> ---
> Changes in v2:
> * Removed config from Kconfig as it already exists on
>   common/Kconfig.
> * Changed the commit message.

OK, I went to apply this and I see where I sent you in the wrong
direction, sorry.  BOARD_LATE_INIT is something that the boards (or
SoCs) in question should be select'ing, which is what everything else
that uses it is doing.  Thanks!
Michal Simek Aug. 20, 2018, 6:45 a.m. UTC | #2
On 20.8.2018 04:42, Tom Rini wrote:
> On Sat, Aug 18, 2018 at 08:18:25PM +0300, Ramon Fried wrote:
> 
>> This converts the remaining board defined
>> CONFIG_BOARD_LATE_INIT to Kconfig.
>>
>> Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
>> ---
>> Changes in v2:
>> * Removed config from Kconfig as it already exists on
>>   common/Kconfig.
>> * Changed the commit message.
> 
> OK, I went to apply this and I see where I sent you in the wrong
> direction, sorry.  BOARD_LATE_INIT is something that the boards (or
> SoCs) in question should be select'ing, which is what everything else
> that uses it is doing.  Thanks!

For zynq and zynqmp case we need to disable this option for mini
configuration because we don't want to do full initialization in these
cases. That's why for zynq/zynqmp we need to move this symbol from
select to imply in Kconfig and fill a name for it.
It means for us it is not one line change.

I am going to send a patch to show conversion for zynq/zynqmp when
builds are done.

Thanks,
Michal
Marek Vasut Aug. 20, 2018, 8:02 a.m. UTC | #3
On 08/20/2018 04:42 AM, Tom Rini wrote:
> On Sat, Aug 18, 2018 at 08:18:25PM +0300, Ramon Fried wrote:
> 
>> This converts the remaining board defined
>> CONFIG_BOARD_LATE_INIT to Kconfig.
>>
>> Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
>> ---
>> Changes in v2:
>> * Removed config from Kconfig as it already exists on
>>   common/Kconfig.
>> * Changed the commit message.
> 
> OK, I went to apply this and I see where I sent you in the wrong
> direction, sorry.  BOARD_LATE_INIT is something that the boards (or
> SoCs) in question should be select'ing, which is what everything else
> that uses it is doing.  Thanks!

Again, wouldn't it rather make sense to convert the board_late_init to
__weak symbol instead and drop the Kconfig option ?
Michal Simek Aug. 20, 2018, 8:11 a.m. UTC | #4
On 20.8.2018 10:02, Marek Vasut wrote:
> On 08/20/2018 04:42 AM, Tom Rini wrote:
>> On Sat, Aug 18, 2018 at 08:18:25PM +0300, Ramon Fried wrote:
>>
>>> This converts the remaining board defined
>>> CONFIG_BOARD_LATE_INIT to Kconfig.
>>>
>>> Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
>>> ---
>>> Changes in v2:
>>> * Removed config from Kconfig as it already exists on
>>>   common/Kconfig.
>>> * Changed the commit message.
>>
>> OK, I went to apply this and I see where I sent you in the wrong
>> direction, sorry.  BOARD_LATE_INIT is something that the boards (or
>> SoCs) in question should be select'ing, which is what everything else
>> that uses it is doing.  Thanks!
> 
> Again, wouldn't it rather make sense to convert the board_late_init to
> __weak symbol instead and drop the Kconfig option ?
> 

That's not an option for us because we need to enable this functionality
for full targets but not use them for mini configurations which don't
require it and it just wasting our limited space.

Thanks,
Michal
Marek Vasut Aug. 20, 2018, 11:16 a.m. UTC | #5
On 08/20/2018 10:11 AM, Michal Simek wrote:
> On 20.8.2018 10:02, Marek Vasut wrote:
>> On 08/20/2018 04:42 AM, Tom Rini wrote:
>>> On Sat, Aug 18, 2018 at 08:18:25PM +0300, Ramon Fried wrote:
>>>
>>>> This converts the remaining board defined
>>>> CONFIG_BOARD_LATE_INIT to Kconfig.
>>>>
>>>> Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
>>>> ---
>>>> Changes in v2:
>>>> * Removed config from Kconfig as it already exists on
>>>>   common/Kconfig.
>>>> * Changed the commit message.
>>>
>>> OK, I went to apply this and I see where I sent you in the wrong
>>> direction, sorry.  BOARD_LATE_INIT is something that the boards (or
>>> SoCs) in question should be select'ing, which is what everything else
>>> that uses it is doing.  Thanks!
>>
>> Again, wouldn't it rather make sense to convert the board_late_init to
>> __weak symbol instead and drop the Kconfig option ?
>>
> 
> That's not an option for us because we need to enable this functionality
> for full targets but not use them for mini configurations which don't
> require it and it just wasting our limited space.

Then maybe you need a different ifdef for those machines ?
Tom Rini Aug. 20, 2018, 12:01 p.m. UTC | #6
On Mon, Aug 20, 2018 at 10:02:29AM +0200, Marek Vasut wrote:
> On 08/20/2018 04:42 AM, Tom Rini wrote:
> > On Sat, Aug 18, 2018 at 08:18:25PM +0300, Ramon Fried wrote:
> > 
> >> This converts the remaining board defined
> >> CONFIG_BOARD_LATE_INIT to Kconfig.
> >>
> >> Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
> >> ---
> >> Changes in v2:
> >> * Removed config from Kconfig as it already exists on
> >>   common/Kconfig.
> >> * Changed the commit message.
> > 
> > OK, I went to apply this and I see where I sent you in the wrong
> > direction, sorry.  BOARD_LATE_INIT is something that the boards (or
> > SoCs) in question should be select'ing, which is what everything else
> > that uses it is doing.  Thanks!
> 
> Again, wouldn't it rather make sense to convert the board_late_init to
> __weak symbol instead and drop the Kconfig option ?

Despite being what I thought was the only fan of weak functions left,
no, this hook isn't nearly widely used enough to justify being used that
way.
diff mbox series

Patch

diff --git a/configs/am335x_pdu001_defconfig b/configs/am335x_pdu001_defconfig
index 625ee6603d..3a69bbf460 100644
--- a/configs/am335x_pdu001_defconfig
+++ b/configs/am335x_pdu001_defconfig
@@ -11,6 +11,7 @@  CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="am335x-pdu001"
 CONFIG_LOCALVERSION="-EETS-1.0.0"
+CONFIG_BOARD_LATE_INIT=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_BOOTDELAY=1
 # CONFIG_USE_BOOTCOMMAND is not set
diff --git a/configs/bcm7445_defconfig b/configs/bcm7445_defconfig
index 8b4247882f..c1e8194fcc 100644
--- a/configs/bcm7445_defconfig
+++ b/configs/bcm7445_defconfig
@@ -2,6 +2,7 @@  CONFIG_ARM=y
 CONFIG_ARCH_BCMSTB=y
 CONFIG_SYS_TEXT_BASE=0x80100000
 CONFIG_TARGET_BCM7445=y
+CONFIG_BOARD_LATE_INIT=y
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_BOOTDELAY=1
diff --git a/configs/cl-som-imx7_defconfig b/configs/cl-som-imx7_defconfig
index d47dd66197..3321d02e14 100644
--- a/configs/cl-som-imx7_defconfig
+++ b/configs/cl-som-imx7_defconfig
@@ -13,6 +13,7 @@  CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
 CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
+CONFIG_BOARD_LATE_INIT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=3
diff --git a/configs/controlcenterdc_defconfig b/configs/controlcenterdc_defconfig
index a66a281ede..e492a09255 100644
--- a/configs/controlcenterdc_defconfig
+++ b/configs/controlcenterdc_defconfig
@@ -12,6 +12,7 @@  CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="armada-38x-controlcenterdc"
 CONFIG_DEBUG_UART=y
+CONFIG_BOARD_LATE_INIT=y
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
diff --git a/configs/hsdk_defconfig b/configs/hsdk_defconfig
index eec19478c6..332cc6a2b7 100644
--- a/configs/hsdk_defconfig
+++ b/configs/hsdk_defconfig
@@ -7,6 +7,7 @@  CONFIG_DEBUG_UART_CLOCK=33333333
 CONFIG_SYS_CLK_FREQ=500000000
 CONFIG_DEFAULT_DEVICE_TREE="hsdk"
 CONFIG_DEBUG_UART=y
+CONFIG_BOARD_LATE_INIT=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200n8"
 CONFIG_BOARD_EARLY_INIT_F=y
diff --git a/configs/mccmon6_nor_defconfig b/configs/mccmon6_nor_defconfig
index 93cf3eef27..b5e3152443 100644
--- a/configs/mccmon6_nor_defconfig
+++ b/configs/mccmon6_nor_defconfig
@@ -7,6 +7,7 @@  CONFIG_TARGET_MCCMON6=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
 # CONFIG_CMD_BMODE is not set
+CONFIG_BOARD_LATE_INIT=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/liebherr/mccmon6/mon6_imximage_nor.cfg"
 # CONFIG_USE_BOOTCOMMAND is not set
diff --git a/configs/mccmon6_sd_defconfig b/configs/mccmon6_sd_defconfig
index 2abaa82a35..23bcb37d06 100644
--- a/configs/mccmon6_sd_defconfig
+++ b/configs/mccmon6_sd_defconfig
@@ -8,6 +8,7 @@  CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
 # CONFIG_CMD_BMODE is not set
+CONFIG_BOARD_LATE_INIT=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/liebherr/mccmon6/mon6_imximage_sd.cfg"
 # CONFIG_USE_BOOTCOMMAND is not set
diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig
index 8a0cc5d481..9bd20cb4b6 100644
--- a/configs/mx53ppd_defconfig
+++ b/configs/mx53ppd_defconfig
@@ -2,6 +2,7 @@  CONFIG_ARM=y
 CONFIG_ARCH_MX5=y
 CONFIG_SYS_TEXT_BASE=0x77800000
 CONFIG_TARGET_MX53PPD=y
+CONFIG_BOARD_LATE_INIT=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/ge/mx53ppd/imximage.cfg"
 CONFIG_BOOTDELAY=1
diff --git a/configs/stm32f746-disco_defconfig b/configs/stm32f746-disco_defconfig
index b376e8b1c3..e9b2318b42 100644
--- a/configs/stm32f746-disco_defconfig
+++ b/configs/stm32f746-disco_defconfig
@@ -5,6 +5,7 @@  CONFIG_SYS_MALLOC_F_LEN=0xC00
 CONFIG_STM32F7=y
 CONFIG_TARGET_STM32F746_DISCO=y
 CONFIG_DEFAULT_DEVICE_TREE="stm32f746-disco"
+CONFIG_BOARD_LATE_INIT=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
diff --git a/configs/stm32h743-disco_defconfig b/configs/stm32h743-disco_defconfig
index e98d18c11d..c1131318e2 100644
--- a/configs/stm32h743-disco_defconfig
+++ b/configs/stm32h743-disco_defconfig
@@ -5,6 +5,7 @@  CONFIG_SYS_MALLOC_F_LEN=0xF00
 CONFIG_STM32H7=y
 CONFIG_TARGET_STM32H743_DISCO=y
 CONFIG_DEFAULT_DEVICE_TREE="stm32h743i-disco"
+CONFIG_BOARD_LATE_INIT=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_BOOTDELAY=3
 # CONFIG_USE_BOOTCOMMAND is not set
diff --git a/configs/stm32h743-eval_defconfig b/configs/stm32h743-eval_defconfig
index 84d0ca7a84..636981d5d2 100644
--- a/configs/stm32h743-eval_defconfig
+++ b/configs/stm32h743-eval_defconfig
@@ -5,6 +5,7 @@  CONFIG_SYS_MALLOC_F_LEN=0xF00
 CONFIG_STM32H7=y
 CONFIG_TARGET_STM32H743_EVAL=y
 CONFIG_DEFAULT_DEVICE_TREE="stm32h743i-eval"
+CONFIG_BOARD_LATE_INIT=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_BOOTDELAY=3
 # CONFIG_USE_BOOTCOMMAND is not set
diff --git a/include/configs/bcmstb.h b/include/configs/bcmstb.h
index c74fe4086e..2cc5b4f0c2 100644
--- a/include/configs/bcmstb.h
+++ b/include/configs/bcmstb.h
@@ -183,6 +183,5 @@  extern phys_addr_t prior_stage_fdt_address;
  * Set fdtaddr to prior stage-provided DTB in board_late_init, when
  * writeable environment is available.
  */
-#define CONFIG_BOARD_LATE_INIT
 
 #endif /* __BCMSTB_H */
diff --git a/include/configs/cl-som-imx7.h b/include/configs/cl-som-imx7.h
index faea6c6b93..972872f2c5 100644
--- a/include/configs/cl-som-imx7.h
+++ b/include/configs/cl-som-imx7.h
@@ -17,8 +17,6 @@ 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(32 * SZ_1M)
 
-#define CONFIG_BOARD_LATE_INIT
-
 /* Uncomment to enable secure boot support */
 /* #define CONFIG_SECURE_BOOT */
 #define CONFIG_CSF_SIZE			0x4000
diff --git a/include/configs/controlcenterdc.h b/include/configs/controlcenterdc.h
index b38cab1164..0fce0fa38b 100644
--- a/include/configs/controlcenterdc.h
+++ b/include/configs/controlcenterdc.h
@@ -13,7 +13,6 @@ 
 #define CONFIG_CUSTOMER_BOARD_SUPPORT
 
 #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
-#define CONFIG_BOARD_LATE_INIT
 
 /*
  * TEXT_BASE needs to be below 16MiB, since this area is scrubbed
diff --git a/include/configs/hsdk.h b/include/configs/hsdk.h
index 5da053002e..222252a08b 100644
--- a/include/configs/hsdk.h
+++ b/include/configs/hsdk.h
@@ -128,6 +128,5 @@  setenv core_iccm_3 0x6; setenv core_dccm_3 0x6;\0"
 /*
  * Callback configuration
  */
-#define CONFIG_BOARD_LATE_INIT
 
 #endif /* _CONFIG_HSDK_H_ */
diff --git a/include/configs/mccmon6.h b/include/configs/mccmon6.h
index 0816fae365..372bcf119f 100644
--- a/include/configs/mccmon6.h
+++ b/include/configs/mccmon6.h
@@ -35,7 +35,6 @@ 
 #define CONFIG_SYS_MALLOC_LEN		(10 * SZ_1M)
 
 #define CONFIG_BOARD_EARLY_INIT_F
-#define CONFIG_BOARD_LATE_INIT
 
 #define CONFIG_MXC_UART
 #define CONFIG_MXC_UART_BASE		UART1_BASE
diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h
index e08e83151f..c38d198f7e 100644
--- a/include/configs/mx53ppd.h
+++ b/include/configs/mx53ppd.h
@@ -27,7 +27,6 @@ 
 #define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000
 
 #define CONFIG_MISC_INIT_R
-#define CONFIG_BOARD_LATE_INIT
 #define CONFIG_REVISION_TAG
 
 #define CONFIG_MXC_UART
diff --git a/include/configs/pdu001.h b/include/configs/pdu001.h
index 7b809e2329..012de3b16f 100644
--- a/include/configs/pdu001.h
+++ b/include/configs/pdu001.h
@@ -23,7 +23,6 @@ 
 
 #define MACH_TYPE_PDU001	5075
 #define CONFIG_MACH_TYPE	MACH_TYPE_PDU001
-#define CONFIG_BOARD_LATE_INIT
 
 /* Clock Defines */
 #define V_OSCK			24000000  /* Clock output from T2 */
diff --git a/include/configs/stm32f746-disco.h b/include/configs/stm32f746-disco.h
index 3a76c5807a..e654407b5b 100644
--- a/include/configs/stm32f746-disco.h
+++ b/include/configs/stm32f746-disco.h
@@ -57,7 +57,6 @@ 
 /*
  * Command line configuration.
  */
-#define CONFIG_BOARD_LATE_INIT
 #define CONFIG_DISPLAY_BOARDINFO
 
 /* For SPL */
diff --git a/include/configs/stm32h743-disco.h b/include/configs/stm32h743-disco.h
index 822ab2de77..67dbee0b6c 100644
--- a/include/configs/stm32h743-disco.h
+++ b/include/configs/stm32h743-disco.h
@@ -49,6 +49,5 @@ 
 /*
  * Command line configuration.
  */
-#define CONFIG_BOARD_LATE_INIT
 
 #endif /* __CONFIG_H */
diff --git a/include/configs/stm32h743-eval.h b/include/configs/stm32h743-eval.h
index b49dc1a34a..8bc5247261 100644
--- a/include/configs/stm32h743-eval.h
+++ b/include/configs/stm32h743-eval.h
@@ -49,6 +49,5 @@ 
 /*
  * Command line configuration.
  */
-#define CONFIG_BOARD_LATE_INIT
 
 #endif /* __CONFIG_H */
diff --git a/include/configs/xilinx_zynqmp_mini.h b/include/configs/xilinx_zynqmp_mini.h
index becb125f0a..f4c02276f9 100644
--- a/include/configs/xilinx_zynqmp_mini.h
+++ b/include/configs/xilinx_zynqmp_mini.h
@@ -24,7 +24,6 @@ 
 #undef CONFIG_BOOTM_NETBSD
 #undef CONFIG_BOOTM_VXWORKS
 #undef CONFIG_BOOTM_LINUX
-#undef CONFIG_BOARD_LATE_INIT
 
 /* BOOTP options */
 #undef CONFIG_BOOTP_BOOTFILESIZE
diff --git a/include/configs/zynq_cse.h b/include/configs/zynq_cse.h
index c4587a1837..e7a4d4108a 100644
--- a/include/configs/zynq_cse.h
+++ b/include/configs/zynq_cse.h
@@ -17,7 +17,6 @@ 
 
 /* Undef unneeded configs */
 #undef CONFIG_EXTRA_ENV_SETTINGS
-#undef CONFIG_BOARD_LATE_INIT
 #undef CONFIG_ZLIB
 #undef CONFIG_GZIP