Change DM_SEQ_ALIAS to be configurable for SPL
Subsystems (2)
v2 cover Change DM_SEQ_ALIAS to be configurable for SPL
Add a config option for SPL_DM_SEQ_ALIAS and enable it for the Zynq targets which require it for SPI flash support in SPL.
Changes in v2:
* Add patches to enable the config for mvebu and socfpga targets.
Nathan Rossi (4):
spl: dm: Add SPL_DM_SEQ_ALIAS config option
arm: zynq: Enable SPL_DM_SEQ_ALIAS for all Zynq configs
arm: mvebu: Select SPL_DM_SEQ_ALIAS
arm: socfpga: Enable SPL_DM_SEQ_ALIAS for all SOCFPGA configs
arch/arm/Kconfig | 1 + configs/socfpga_arria5_defconfig | 1 + configs/socfpga_cyclone5_defconfig | 1 + configs/socfpga_de0_nano_soc_defconfig | 1 + configs/socfpga_mcvevk_defconfig | 1 + configs/socfpga_sockit_defconfig | 1 + configs/socfpga_socrates_defconfig | 1 + configs/socfpga_sr1500_defconfig | 1 + configs/zynq_microzed_defconfig | 1 + configs/zynq_picozed_defconfig | 1 + configs/zynq_zc702_defconfig | 1 + configs/zynq_zc706_defconfig | 1 + configs/zynq_zc770_xm010_defconfig | 1 + configs/zynq_zc770_xm011_defconfig | 1 + configs/zynq_zc770_xm012_defconfig | 1 + configs/zynq_zc770_xm013_defconfig | 1 + configs/zynq_zed_defconfig | 1 + configs/zynq_zybo_defconfig | 1 + drivers/core/Kconfig | 9 +++++++++ drivers/core/device.c | 2 +- include/config_uncmd_spl.h | 1 - include/configs/socfpga_common.h | 1 - 22 files changed, 28 insertions(+), 3 deletions(-)
Signature · 1 line
2.6.4
PATCH v2 1/4 spl: dm: Add SPL_DM_SEQ_ALIAS config option
The Device Model sequence alias feature is required by some Uclasses. Instead of disabling the feature for all SPL targets allow it to be configured.
The config option is disabled by default to reduce code size for targets that are not interested or do not require this feature.
---
v2: no changes.
--- drivers/core/Kconfig | 9 +++++++++ drivers/core/device.c | 2 +- include/config_uncmd_spl.h | 1 - 3 files changed, 10 insertions(+), 2 deletions(-)
drivers/core/Kconfig +9 -0
@@ -60,6 +60,15 @@ config DM_SEQ_ALIAS help Most boards will have a '/aliases' node containing the path to numbered devices (e.g. serial0 = &serial0). This feature can be + disabled if it is not required. + +config SPL_DM_SEQ_ALIAS + bool "Support numbered aliases in device tree in SPL" + depends on DM + default n + help + Most boards will have a '/aliases' node containing the path to + numbered devices (e.g. serial0 = &serial0). This feature can be disabled if it is not required, to save code space in SPL. config REGMAP
drivers/core/device.c +1 -1
@@ -64,7 +64,7 @@ int device_bind(struct udevice *parent, const struct driver *drv, dev->seq =-1 ; dev->req_seq =-1 ; -if (CONFIG_IS_ENABLED (OF_CONTROL ) &&IS_ENABLED (CONFIG_DM_SEQ_ALIAS )) { +if (CONFIG_IS_ENABLED (OF_CONTROL ) &&CONFIG_IS_ENABLED (DM_SEQ_ALIAS )) {/* * Some devices, such as a SPI bus, I2C bus and serial ports * are numbered using aliases.
include/config_uncmd_spl.h +0 -1
@@ -29,7 +29,6 @@#endif #undef CONFIG_DM_WARN -#undef CONFIG_DM_SEQ_ALIAS#undef CONFIG_DM_STDIO#endif /* CONFIG_SPL_BUILD */
Signature · 1 line
2.6.4
PATCH v2 2/4 arm: zynq: Enable SPL_DM_SEQ_ALIAS for all Zynq configs
In reply to Nathan RossiThis feature is required in SPL to enable support for loading from SPI flash when the device is booted from QSPI.
---
v2: no changes.
--- configs/zynq_microzed_defconfig | 1 + configs/zynq_picozed_defconfig | 1 + configs/zynq_zc702_defconfig | 1 + configs/zynq_zc706_defconfig | 1 + configs/zynq_zc770_xm010_defconfig | 1 + configs/zynq_zc770_xm011_defconfig | 1 + configs/zynq_zc770_xm012_defconfig | 1 + configs/zynq_zc770_xm013_defconfig | 1 + configs/zynq_zed_defconfig | 1 + configs/zynq_zybo_defconfig | 1 + 10 files changed, 10 insertions(+)
configs/zynq_microzed_defconfig +1 -0
@@ -3,6 +3,7 @@ CONFIG_ARCH_ZYNQ=y CONFIG_TARGET_ZYNQ_MICROZED=y CONFIG_DEFAULT_DEVICE_TREE="zynq-microzed" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_SIGNATURE=y
configs/zynq_picozed_defconfig +1 -0
@@ -3,6 +3,7 @@ CONFIG_ARCH_ZYNQ=y CONFIG_TARGET_ZYNQ_PICOZED=y CONFIG_DEFAULT_DEVICE_TREE="zynq-picozed" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set CONFIG_CMD_GPIO=y
configs/zynq_zc702_defconfig +1 -0
@@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_ZYNQ=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zc702" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_SIGNATURE=y
configs/zynq_zc706_defconfig +1 -0
@@ -3,6 +3,7 @@ CONFIG_ARCH_ZYNQ=y CONFIG_TARGET_ZYNQ_ZC706=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zc706" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_SIGNATURE=y
configs/zynq_zc770_xm010_defconfig +1 -0
@@ -3,6 +3,7 @@ CONFIG_ARCH_ZYNQ=y CONFIG_TARGET_ZYNQ_ZC770=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm010" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_SIGNATURE=y
configs/zynq_zc770_xm011_defconfig +1 -0
@@ -3,6 +3,7 @@ CONFIG_ARCH_ZYNQ=y CONFIG_TARGET_ZYNQ_ZC770=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm011" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_SIGNATURE=y
configs/zynq_zc770_xm012_defconfig +1 -0
@@ -3,6 +3,7 @@ CONFIG_ARCH_ZYNQ=y CONFIG_TARGET_ZYNQ_ZC770=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm012" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_SIGNATURE=y
configs/zynq_zc770_xm013_defconfig +1 -0
@@ -3,6 +3,7 @@ CONFIG_ARCH_ZYNQ=y CONFIG_TARGET_ZYNQ_ZC770=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm013" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_SIGNATURE=y
configs/zynq_zed_defconfig +1 -0
@@ -3,6 +3,7 @@ CONFIG_ARCH_ZYNQ=y CONFIG_TARGET_ZYNQ_ZED=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zed" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_SIGNATURE=y
configs/zynq_zybo_defconfig +1 -0
@@ -3,6 +3,7 @@ CONFIG_ARCH_ZYNQ=y CONFIG_TARGET_ZYNQ_ZYBO=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zybo" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_SIGNATURE=y
Signature · 1 line
2.6.4
PATCH v2 3/4 arm: mvebu: Select SPL_DM_SEQ_ALIAS
In reply to Nathan RossiSelect SPL_DM_SEQ_ALIAS which is required for certain uclasses, specifically SPI Flash.
---
v2: Added this patch
--- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
@@ -118,6 +118,7 @@ config ARCH_MVEBU select OF_SEPARATE select DM select DM_SERIAL + select SPL_DM_SEQ_ALIAS config TARGET_DEVKIT3250 bool "Support devkit3250"
Signature · 1 line
2.6.4
PATCH v2 3/4 arm: mvebu: Select SPL_DM_SEQ_ALIAS
Quoted 18 lines · Nathan Rossi
Select
SPL_DM_SEQ_ALIASwhich is required for certain uclasses, specifically SPI Flash.Signed-off-by Nathan Rossi <[email protected]>Cc Albert Aribaud <[email protected]>Cc Stefan Roese <[email protected]>---
v2: Added this patch--- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/arm/Kconfig +0
-0
arch/arm/Kconfig config ARCH_MVEBU · line 124
Quoted 7 lines
arch/arm/Kconfig +1
-0@@ -118,6 +118,7 @@ config ARCH_MVEBU select OF_SEPARATE select DM select DM_SERIAL + select SPL_DM_SEQ_ALIAS config TARGET_DEVKIT3250 bool "Support devkit3250"
Thanks,
Stefan
PATCH v2 4/4 arm: socfpga: Enable SPL_DM_SEQ_ALIAS for all SOCFPGA configs
In reply to Nathan RossiThis feature is required in SPL to enable support for loading from SPI flash.
Also clean up the #define in socfpga_common.h.
---
v2: Added this patch
--- configs/socfpga_arria5_defconfig | 1 + configs/socfpga_cyclone5_defconfig | 1 + configs/socfpga_de0_nano_soc_defconfig | 1 + configs/socfpga_mcvevk_defconfig | 1 + configs/socfpga_sockit_defconfig | 1 + configs/socfpga_socrates_defconfig | 1 + configs/socfpga_sr1500_defconfig | 1 + include/configs/socfpga_common.h | 1 - 8 files changed, 7 insertions(+), 1 deletion(-)
configs/socfpga_arria5_defconfig +1 -0
@@ -7,6 +7,7 @@ CONFIG_TARGET_SOCFPGA_ARRIA5_SOCDK=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria5_socdk" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set
configs/socfpga_cyclone5_defconfig +1 -0
@@ -7,6 +7,7 @@ CONFIG_TARGET_SOCFPGA_CYCLONE5_SOCDK=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set
configs/socfpga_de0_nano_soc_defconfig +1 -0
@@ -7,6 +7,7 @@ CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de0_nano_soc" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set
configs/socfpga_mcvevk_defconfig +1 -0
@@ -7,6 +7,7 @@ CONFIG_TARGET_SOCFPGA_DENX_MCVEVK=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_mcvevk" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set
configs/socfpga_sockit_defconfig +1 -0
@@ -7,6 +7,7 @@ CONFIG_TARGET_SOCFPGA_TERASIC_SOCKIT=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sockit" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set
configs/socfpga_socrates_defconfig +1 -0
@@ -7,6 +7,7 @@ CONFIG_TARGET_SOCFPGA_EBV_SOCRATES=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set
configs/socfpga_sr1500_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_DM_GPIO=y CONFIG_TARGET_SOCFPGA_SR1500=y CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sr1500" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y CONFIG_SPL_STACK_R_ADDR=0x00800000 # CONFIG_CMD_IMLS is not set
include/configs/socfpga_common.h +0 -1
@@ -370,7 +370,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);/* SPL QSPI boot support */ #ifdef CONFIG_SPL_SPI_SUPPORT -#define CONFIG_DM_SEQ_ALIAS 1#define CONFIG_SPL_SPI_FLASH_SUPPORT #define CONFIG_SPL_SPI_LOAD #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000
Signature · 1 line
2.6.4
PATCH v2 4/4 arm: socfpga: Enable SPL_DM_SEQ_ALIAS for all SOCFPGA configs
Quoted 10 lines · Nathan Rossi
This feature is required in SPL to enable support for loading from SPI flash.
Also clean up the #define in
socfpga_common.h.Signed-off-by Nathan Rossi <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Chin-Liang See <[email protected]>Cc Marek Vasut <[email protected]>Cc Stefan Roese <[email protected]>
Quoted 6 lines
---
v2: Added this patch--- configs/socfpga_arria5_defconfig | 1 + configs/socfpga_cyclone5_defconfig | 1 + configs/socfpga_de0_nano_soc_defconfig | 1 +
de0nano board has no SPI flash
Quoted 1 line
configs/socfpga_mcvevk_defconfig | 1 +
mcvevk board has no SPI flash
Quoted 3 lines
configs/socfpga_sockit_defconfig | 1 + configs/socfpga_socrates_defconfig | 1 + configs/socfpga_sr1500_defconfig | 1 +
I am not sure about this one, Stefan ?
Quoted 99 lines
include/configs/socfpga_common.h | 1 - 8 files changed, 7 insertions(+), 1 deletion(-)(quoted diff) +0
-0b/configs/socfpga_arria5_defconfig index 68d12df..6e8976f 100644
configs/socfpga_arria5_defconfig +1
-0@@ -7,6 +7,7 @@ CONFIG_TARGET_SOCFPGA_ARRIA5_SOCDK=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria5_socdk" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set(quoted diff) +0
-0b/configs/socfpga_cyclone5_defconfig index accee92..e31aa71 100644
configs/socfpga_cyclone5_defconfig +1
-0@@ -7,6 +7,7 @@ CONFIG_TARGET_SOCFPGA_CYCLONE5_SOCDK=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set(quoted diff) +0
-0b/configs/socfpga_de0_nano_soc_defconfig index 65c1197..3a29238 100644
configs/socfpga_de0_nano_soc_defconfig +1
-0@@ -7,6 +7,7 @@ CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de0_nano_soc" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set(quoted diff) +0
-0b/configs/socfpga_mcvevk_defconfig index c98d4a1..61cee08 100644
configs/socfpga_mcvevk_defconfig +1
-0@@ -7,6 +7,7 @@ CONFIG_TARGET_SOCFPGA_DENX_MCVEVK=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_mcvevk" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set(quoted diff) +0
-0b/configs/socfpga_sockit_defconfig index b4f41a9..59fbb2c 100644
configs/socfpga_sockit_defconfig +1
-0@@ -7,6 +7,7 @@ CONFIG_TARGET_SOCFPGA_TERASIC_SOCKIT=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sockit" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set(quoted diff) +0
-0b/configs/socfpga_socrates_defconfig index fe940f9..aaba8cb 100644
configs/socfpga_socrates_defconfig +1
-0@@ -7,6 +7,7 @@ CONFIG_TARGET_SOCFPGA_EBV_SOCRATES=y CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set(quoted diff) +0
-0b/configs/socfpga_sr1500_defconfig index 3d98a63..a4f0835 100644
configs/socfpga_sr1500_defconfig +1
-0@@ -6,6 +6,7 @@ CONFIG_DM_GPIO=y CONFIG_TARGET_SOCFPGA_SR1500=y CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sr1500" CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_STACK_R=y CONFIG_SPL_STACK_R_ADDR=0x00800000 # CONFIG_CMD_IMLS is not set(quoted diff) +0
-0
b/include/configs/socfpga_common.hindex a09e906..8de0ab9 100644include/configs/socfpga_common.h +0
-1@@ -370,7 +370,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);/* SPL QSPI boot support */ #ifdef CONFIG_SPL_SPI_SUPPORT -#define CONFIG_DM_SEQ_ALIAS 1#define CONFIG_SPL_SPI_FLASH_SUPPORT #define CONFIG_SPL_SPI_LOAD #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000
PATCH v2 4/4 arm: socfpga: Enable SPL_DM_SEQ_ALIAS for all SOCFPGA configs
Quoted 22 lines · Marek Vasut
Quoted 10 lines · Nathan Rossi
This feature is required in SPL to enable support for loading from SPI flash.
Also clean up the #define in
socfpga_common.h.Signed-off-by Nathan Rossi <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Chin-Liang See <[email protected]>Cc Marek Vasut <[email protected]>Cc Stefan Roese <[email protected]>Quoted 6 lines
---
v2: Added this patch--- configs/socfpga_arria5_defconfig | 1 + configs/socfpga_cyclone5_defconfig | 1 + configs/socfpga_de0_nano_soc_defconfig | 1 +de0nano board has no SPI flash
Quoted 1 line
configs/socfpga_mcvevk_defconfig | 1 +
Quoted 7 lines
mcvevk board has no SPI flash
Quoted 3 lines
configs/socfpga_sockit_defconfig | 1 + configs/socfpga_socrates_defconfig | 1 + configs/socfpga_sr1500_defconfig | 1 +I am not sure about this one, Stefan ?
Yes, the SR1500 has SPI NOR and boots from it.
So when Marek's comments are addressed, then you can add my:
Thanks,
Stefan