spl: kconfig: separate sysreset and firmware drivers from misc
PATCH v4 1/1 spl: kconfig: separate sysreset and firmware drivers from misc
This adds separate kconfig options for drivers/sysreset and drivers/firmware.
Up to now, CONFIG_SPL_DRIVERS_MISC_SUPPORT added drivers/misc to SPL build but also added drivers/firmware and drivers/sysreset at the same time.
Since that is confusing, this patch uses CONFIG_SPL_SYSRESET for drivers/sysreset and adds CONFIG_SPL_FIRMWARE for drivers/firmware (and accordingly for the TPL options).
CONFIG_SPL_DRIVERS_MISC_SUPPORT stays for including drivers/misc into the SPL build (and accordingly for TPL) since there are boards using non-DM (non UCLASS_MISC) files from drivers/misc. Such boards don't have CONFIG_SPL_MISC enabled, so cannot use this to include drivers/misc into the SPL build.
---
Changes in v4:
- drivers/Makefile: combine subdirectory include statements for SPL, TPL and U-Boot instead of duplicating lines
Changes in v3:
- Revert to keeping CONFIG_SPL_DRIVERS_MISC_SUPPORT as there are boards that need to include drivers/misc without UCLASS_MISC being enabled
- Only CONFIG_SPL_FIRMWARE is added as new config symbol. To ensure no arch Kconfig files need to be changed, add dependencies to ensure this is enabled where required.
Changes in v2:
- adapt config names to match the non-SPL config options:
- changed CONFIG_SPL_SYSRESET_SUPPORT to CONFIG_SPL_SYSRESET
- changed CONFIG_SPL_DRIVERS_FIRMWARE_SUPPORT to CONFIG_SPL_FIRMWARE
- changed CONFIG_SPL_DRIVERS_MISC_SUPPORT to CONFIG_SPL_MISC
configs/evb-rk3036_defconfig | 1 + configs/kylin-rk3036_defconfig | 1 + configs/sandbox_spl_defconfig | 1 + drivers/Makefile | 6 +++--- drivers/firmware/Kconfig | 7 ++++++- drivers/sysreset/Kconfig | 1 + 6 files changed, 13 insertions(+), 4 deletions(-)
configs/evb-rk3036_defconfig +1 -0
@@ -47,6 +47,7 @@ CONFIG_SPI_FLASH=y CONFIG_SF_DEFAULT_SPEED=20000000 CONFIG_PINCTRL=y # CONFIG_SPL_DM_SERIAL is not set +# CONFIG_SPL_SYSRESET is not set CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y CONFIG_USB=y
configs/kylin-rk3036_defconfig +1 -0
@@ -49,6 +49,7 @@ CONFIG_SF_DEFAULT_SPEED=20000000 CONFIG_PINCTRL=y CONFIG_DM_REGULATOR_FIXED=y # CONFIG_SPL_DM_SERIAL is not set +# CONFIG_SPL_SYSRESET is not set CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y CONFIG_USB=y
configs/sandbox_spl_defconfig +1 -0
@@ -3,6 +3,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_SPL_FIRMWARE=y CONFIG_NR_DRAM_BANKS=1 CONFIG_SPL=y CONFIG_BOOTSTAGE_STASH_ADDR=0x0
drivers/Makefile +3 -3
@@ -4,7 +4,9 @@ obj-$(CONFIG_$(SPL_TPL_)CLK) += clk/ obj-$(CONFIG_$(SPL_TPL_)DM) += core/ obj-$(CONFIG_$(SPL_TPL_)DFU) += dfu/ obj-$(CONFIG_$(SPL_TPL_)GPIO_SUPPORT) += gpio/ -obj-$(CONFIG_$(SPL_TPL_)DRIVERS_MISC_SUPPORT) += misc/ sysreset/ firmware/ +obj-$(CONFIG_$(SPL_TPL_)DRIVERS_MISC_SUPPORT) += misc/ +obj-$(CONFIG_$(SPL_TPL_)SYSRESET) += sysreset/ +obj-$(CONFIG_$(SPL_TPL_)FIRMWARE) +=firmware/ obj-$(CONFIG_$(SPL_TPL_)I2C_SUPPORT) += i2c/ obj-$(CONFIG_$(SPL_TPL_)INPUT) += input/ obj-$(CONFIG_$(SPL_TPL_)LED) += led/
@@ -81,7 +83,6 @@ obj-y += cache/ obj-$(CONFIG_CPU) += cpu/ obj-y += crypto/ obj-$(CONFIG_FASTBOOT) += fastboot/ -obj-y += firmware/ obj-$(CONFIG_FPGA) += fpga/ obj-y += misc/ obj-$(CONFIG_MMC) += mmc/
@@ -96,7 +97,6 @@ obj-y += rtc/ obj-y += scsi/ obj-y += sound/ obj-y += spmi/ -obj-y += sysreset/ obj-y += video/ obj-y += watchdog/ obj-$(CONFIG_QE) += qe/
drivers/firmware/Kconfig +6 -1
@@ -1,9 +1,13 @@ config FIRMWARE bool "Enable Firmware driver support" +config SPL_FIRMWARE + bool "Enable Firmware driver support in SPL" + depends on FIRMWARE + config SPL_ARM_PSCI_FW bool - select FIRMWARE + select SPL_FIRMWARE config ARM_PSCI_FW bool
@@ -13,6 +17,7 @@ config TI_SCI_PROTOCOL tristate "TI System Control Interface (TISCI) Message Protocol" depends on K3_SEC_PROXY select FIRMWARE + select SPL_FIRMWARE if SPL help TI System Control Interface (TISCI) Message Protocol is used to manage compute systems such as ARM, DSP etc with the system controller in
drivers/sysreset/Kconfig +1 -0
@@ -50,6 +50,7 @@ config SYSRESET_MICROBLAZE config SYSRESET_PSCI bool "Enable support for PSCI System Reset" depends on ARM_PSCI_FW + select SPL_ARM_PSCI_FW if SPL help Enable PSCI SYSTEM_RESET function call. To use this, PSCI firmware must be running on your system.
Signature · 1 line
2.20.1
PATCH v4 1/1 spl: kconfig: separate sysreset and firmware drivers from misc
Quoted 11 lines · Simon Goldschmidt
This adds separate kconfig options for
drivers/sysresetanddrivers/firmware.Up to now,
CONFIG_SPL_DRIVERS_MISC_SUPPORTaddeddrivers/miscto SPL build but also addeddrivers/firmwareanddrivers/sysresetat the same time.Since that is confusing, this patch uses
CONFIG_SPL_SYSRESETfordrivers/sysresetand addsCONFIG_SPL_FIRMWAREfordrivers/firmware(and accordingly for the TPL options).
Quoted 7 lines
CONFIG_SPL_DRIVERS_MISC_SUPPORTstays for includingdrivers/miscinto the SPL build (and accordingly for TPL) since there are boards using non-DM (nonUCLASS_MISC) files fromdrivers/misc. Such boards don't haveCONFIG_SPL_MISCenabled, so cannot use this to includedrivers/miscinto the SPL build.Signed-off-by Simon Goldschmidt <[email protected]>
Thanks and regards,
Lokesh
Marek Vasut
AppliedPATCH v4 1/1 spl: kconfig: separate sysreset and firmware drivers from misc
In reply to Simon GoldschmidtQuoted 11 lines · Simon Goldschmidt
This adds separate kconfig options for
drivers/sysresetanddrivers/firmware.Up to now,
CONFIG_SPL_DRIVERS_MISC_SUPPORTaddeddrivers/miscto SPL build but also addeddrivers/firmwareanddrivers/sysresetat the same time.Since that is confusing, this patch uses
CONFIG_SPL_SYSRESETfordrivers/sysresetand addsCONFIG_SPL_FIRMWAREfordrivers/firmware(and accordingly for the TPL options).
Quoted 7 lines
CONFIG_SPL_DRIVERS_MISC_SUPPORTstays for includingdrivers/miscinto the SPL build (and accordingly for TPL) since there are boards using non-DM (nonUCLASS_MISC) files fromdrivers/misc. Such boards don't haveCONFIG_SPL_MISCenabled, so cannot use this to includedrivers/miscinto the SPL build.Signed-off-by Simon Goldschmidt <[email protected]>
Applied, thanks.