arm: socfpga: stack and Kconfig cleanups
Subsystems (3)
v2 cover arm: socfpga: stack and Kconfig cleanups
This series cleans up stack definitions in socfpga_common.h as well as cleans up defconfig files by implying/defaulting common things in Kconfig files.
Finally, it reduces the malloc pool size used in first stage of gen5 SPL (without ddr available) in order to have more space available for code.
As this series does not contain direct bugfixes, it targets the socfpga-next branch.
Changes in v2:
- fix commit message: "SPL post-reloc", not "SPL pre-reloc"
- added patch to imply/default common config options
- added patch to reduce gen5 SPL initial malloc pool to 2 KiB
Simon Goldschmidt (5):
arm: socfpga: fix comment about SPL memory layout
arm: socfpga: a10: move SPL stack size to Kconfig
arm: socfpga: put initial U-Boot stack into DDR
arm: socfpga: imply/default common config options
arm: socfpga: gen5: reduce SPL pre-reloc malloc
arch/arm/Kconfig | 3 ++ arch/arm/mach-socfpga/Kconfig | 22 ++++++++++++++ configs/socfpga_arria10_defconfig | 7 ----- configs/socfpga_arria5_defconfig | 10 ------- configs/socfpga_cyclone5_defconfig | 10 ------- configs/socfpga_dbm_soc1_defconfig | 10 ------- configs/socfpga_de0_nano_soc_defconfig | 10 ------- configs/socfpga_de10_nano_defconfig | 10 ------- configs/socfpga_de1_soc_defconfig | 10 ------- configs/socfpga_is1_defconfig | 8 ------ configs/socfpga_sockit_defconfig | 10 ------- configs/socfpga_socrates_defconfig | 10 ------- configs/socfpga_sr1500_defconfig | 10 ------- configs/socfpga_stratix10_defconfig | 4 --- configs/socfpga_vining_fpga_defconfig | 10 ------- include/configs/socfpga_common.h | 40 +++++++++++--------------- 16 files changed, 41 insertions(+), 143 deletions(-)
Signature · 1 line
2.17.1
PATCH v2 1/5 arm: socfpga: fix comment about SPL memory layout
The comment about SPL memory layout for socfpga gen5 is outdated: the initial malloc memory is now at the end of the SRAM, gd is below it (see board_init_f_alloc_reserve).
---
Changes in v2: None
include/configs/socfpga_common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
include/configs/socfpga_common.h +3 -3
@@ -237,9 +237,9 @@ unsigned int cm_get_qspi_controller_clk_hz(void);* * 0xFFFF_0000 ...... Start of SRAM * 0xFFFF_xxxx ...... Top of stack (grows down) -* 0xFFFF_yyyy ...... Malloc area -* 0xFFFF_zzzz ...... Global Data -* 0xFFFF_FF00 ...... End of SRAM +* 0xFFFF_yyyy ...... Global Data +* 0xFFFF_zzzz ...... Malloc area +* 0xFFFF_FFFF ...... End of SRAM * * SRAM Memory layout for Arria 10: * 0xFFE0_0000 ...... Start of SRAM (bottom)
Signature · 1 line
2.17.1
PATCH v2 2/5 arm: socfpga: a10: move SPL stack size to Kconfig
In reply to Simon GoldschmidtInstead of fixing the SPL stack to 64 KiB in the board config header via CONFIG_SYS_SPL_MALLOC_SIZE, let's just use CONFIG_SPL_SYS_MALLOC_F_LEN in the defconfig.
This also has the advandage that it removes sub-mach specific ifdefs in socfpga_common.h.
---
Changes in v2: None
configs/socfpga_arria10_defconfig | 1 + include/configs/socfpga_common.h | 14 -------------- 2 files changed, 1 insertion(+), 14 deletions(-)
configs/socfpga_arria10_defconfig +1 -0
@@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y CONFIG_SYS_TEXT_BASE=0x01000040 CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SPL_SYS_MALLOC_F_LEN=0x10000 CONFIG_TARGET_SOCFPGA_ARRIA10_SOCDK=y CONFIG_SPL=y CONFIG_IDENT_STRING="socfpga_arria10"
include/configs/socfpga_common.h +0 -14
@@ -251,16 +251,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);#define CONFIG_SPL_TEXT_BASE CONFIG_SYS_INIT_RAM_ADDR#define CONFIG_SPL_MAX_SIZE CONFIG_SYS_INIT_RAM_SIZE -#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10 ) -/* SPL memory allocation configuration, this is for FAT implementation */ -#ifndef CONFIG_SYS_SPL_MALLOC_START -#define CONFIG_SYS_SPL_MALLOC_SIZE 0x00010000 -#define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SYS_INIT_RAM_SIZE - \ - CONFIG_SYS_SPL_MALLOC_SIZE + \ - CONFIG_SYS_INIT_RAM_ADDR) -#endif -#endif -/* SPL SDMMC boot support */ #ifdef CONFIG_SPL_MMC_SUPPORT #if defined(CONFIG_SPL_FS_FAT ) || defined(CONFIG_SPL_FS_EXT4 )
@@ -287,11 +277,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void);/* * Stack setup */ -#if defined(CONFIG_TARGET_SOCFPGA_GEN5 )#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR -#elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10 ) -#define CONFIG_SPL_STACK CONFIG_SYS_SPL_MALLOC_START -#endif /* Extra Environment */ #ifndef CONFIG_SPL_BUILD
Signature · 1 line
2.17.1
PATCH v2 2/5 arm: socfpga: a10: move SPL stack size to Kconfig
Quoted 9 lines · Simon Goldschmidt
Instead of fixing the SPL stack to 64 KiB in the board config header via
CONFIG_SYS_SPL_MALLOC_SIZE, let's just useCONFIG_SPL_SYS_MALLOC_F_LENin the defconfig.This also has the advandage that it removes sub-mach specific ifdefs in
socfpga_common.h.Signed-off-by Simon Goldschmidt <[email protected]>
Tien Fong teste this on A10 and it does not work as CONFIG_SPL_SYS_MALLOC_F_LEN only uses simple malloc while the A10 SPL requires full malloc (like CONFIG_SYS_SPL_MALLOC_SIZE
provides).
I'll need to work on v3...
Regards,
Simon
Quoted 56 lines
---
Changes in v2: None
configs/socfpga_arria10_defconfig | 1 + include/configs/socfpga_common.h | 14 -------------- 2 files changed, 1 insertion(+), 14 deletions(-)configs/socfpga_arria10_defconfig +1
-0@@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y CONFIG_SYS_TEXT_BASE=0x01000040 CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SPL_SYS_MALLOC_F_LEN=0x10000 CONFIG_TARGET_SOCFPGA_ARRIA10_SOCDK=y CONFIG_SPL=y CONFIG_IDENT_STRING="socfpga_arria10"include/configs/socfpga_common.h +0
-15@@ -251,16 +251,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);#define CONFIG_SPL_TEXT_BASE CONFIG_SYS_INIT_RAM_ADDR#define CONFIG_SPL_MAX_SIZE CONFIG_SYS_INIT_RAM_SIZE -#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10 ) -/* SPL memory allocation configuration, this is for FAT implementation */ -#ifndef CONFIG_SYS_SPL_MALLOC_START -#define CONFIG_SYS_SPL_MALLOC_SIZE 0x00010000 -#define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SYS_INIT_RAM_SIZE - \ - CONFIG_SYS_SPL_MALLOC_SIZE + \ - CONFIG_SYS_INIT_RAM_ADDR) -#endif -#endif -/* SPL SDMMC boot support */ #ifdef CONFIG_SPL_MMC_SUPPORT #if defined(CONFIG_SPL_FS_FAT ) || defined(CONFIG_SPL_FS_EXT4 )@@ -287,11 +277,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void);/* * Stack setup */ -#if defined(CONFIG_TARGET_SOCFPGA_GEN5 )#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR -#elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10 ) -#define CONFIG_SPL_STACK CONFIG_SYS_SPL_MALLOC_START -#endif /* Extra Environment */ #ifndef CONFIG_SPL_BUILD --2.17.1
PATCH v2 3/5 arm: socfpga: put initial U-Boot stack into DDR
In reply to Simon GoldschmidtIf SPL post-reloc stage puts the stack into DDR, U-Boot should be able to do that, too.
The reason to do so is that this way, U-Boot initial stack can be larger than SPL initial stack. In situations where we want to save the SPL in SRAM for next boot without reloading, this prevents overwriting the SPL DTB in SRAM if U-Boot stack usage gets too high.
---
Changes in v2:
- fix commit message: "SPL post-reloc", not "SPL pre-reloc"
include/configs/socfpga_common.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
include/configs/socfpga_common.h +13 -7
@@ -38,12 +38,23 @@#if ((CONFIG_SYS_BOOTCOUNT_ADDR >CONFIG_SYS_INIT_RAM_ADDR ) && \ (CONFIG_SYS_BOOTCOUNT_ADDR < (CONFIG_SYS_INIT_RAM_ADDR + \CONFIG_SYS_INIT_RAM_SIZE ))) -#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_BOOTCOUNT_ADDR +#define CONFIG_SPL_STACK CONFIG_SYS_BOOTCOUNT_ADDR#else -#define CONFIG_SYS_INIT_SP_ADDR \ +#define CONFIG_SPL_STACK \ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE)#endif +/* +* U-Boot stack setup: if SPL post-reloc uses DDR stack, use it in pre-reloc +* phase of U-Boot, too. This prevents overwriting SPL data if stack/heap usage +* in U-Boot pre-reloc is higher than in SPL. +*/ +#if defined(CONFIG_SPL_STACK_R_ADDR ) &&CONFIG_SPL_STACK_R_ADDR +#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SPL_STACK_R_ADDR +#else +#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SPL_STACK +#endif +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1/*
@@ -274,11 +285,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000#endif -/* -* Stack setup -*/ -#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR -/* Extra Environment */ #ifndef CONFIG_SPL_BUILD
Signature · 1 line
2.17.1
PATCH v2 4/5 arm: socfpga: imply/default common config options
In reply to Simon GoldschmidtThis commit moves common config options used in all socfpga boards to select/imply in Kconfig. This both cleans up the defconfig files as well as makes future changes easier.
Options implied/defaulted for all sub-arches:
- SPL, SPL_DM, USE_TINY_PRINTF, NR_DRAM_BANKS
Options implied/defaulted for implied for A10 & gen5:
- FPGA_SOCFPGA, SYS_MALLOC_F_LEN, SYS_TEXT_BASE
Options implied/defaulted for A10:
- SPL_SYS_MALLOC_F_LEN
Options implied/defaulted for gen5:
- SPL_STACK_R, SPL_SYS_MALLOC_SIMPLE, SPL_STACK_R_ADDR
---
Changes in v2:
- added patch to imply/default common config options
arch/arm/Kconfig | 3 +++ arch/arm/mach-socfpga/Kconfig | 21 +++++++++++++++++++++ configs/socfpga_arria10_defconfig | 8 -------- configs/socfpga_arria5_defconfig | 10 ---------- configs/socfpga_cyclone5_defconfig | 10 ---------- configs/socfpga_dbm_soc1_defconfig | 10 ---------- configs/socfpga_de0_nano_soc_defconfig | 10 ---------- configs/socfpga_de10_nano_defconfig | 10 ---------- configs/socfpga_de1_soc_defconfig | 10 ---------- configs/socfpga_is1_defconfig | 8 -------- configs/socfpga_sockit_defconfig | 10 ---------- configs/socfpga_socrates_defconfig | 10 ---------- configs/socfpga_sr1500_defconfig | 10 ---------- configs/socfpga_stratix10_defconfig | 4 ---- configs/socfpga_vining_fpga_defconfig | 10 ---------- 15 files changed, 24 insertions(+), 120 deletions(-)
arch/arm/Kconfig +3 -0
@@ -839,12 +839,15 @@ config ARCH_SOCFPGA imply DM_SPI imply DM_SPI_FLASH imply FAT_WRITE + imply SPL + imply SPL_DM imply SPL_LIBDISK_SUPPORT imply SPL_MMC_SUPPORT imply SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION imply SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE imply SPL_SPI_FLASH_SUPPORT imply SPL_SPI_SUPPORT + imply USE_TINY_PRINTF config ARCH_SUNXI bool "Support sunxi (Allwinner) SoCs"
arch/arm/mach-socfpga/Kconfig +21 -0
@@ -1,8 +1,25 @@ if ARCH_SOCFPGA +config NR_DRAM_BANKS + default 1 + +config SPL_STACK_R_ADDR + default 0x00800000 if TARGET_SOCFPGA_GEN5 + +config SPL_SYS_MALLOC_F_LEN + default 0x10000 if TARGET_SOCFPGA_ARRIA10 + config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE default 0xa2 +config SYS_MALLOC_F_LEN + default 0x2000 if TARGET_SOCFPGA_ARRIA10 + default 0x2000 if TARGET_SOCFPGA_GEN5 + +config SYS_TEXT_BASE + default 0x01000040 if TARGET_SOCFPGA_ARRIA10 + default 0x01000040 if TARGET_SOCFPGA_GEN5 + config TARGET_SOCFPGA_ARRIA5 bool select TARGET_SOCFPGA_GEN5
@@ -21,6 +38,7 @@ config TARGET_SOCFPGA_ARRIA10 select SYSCON select SPL_SYSCON if SPL select ETH_DESIGNWARE_SOCFPGA + imply FPGA_SOCFPGA config TARGET_SOCFPGA_CYCLONE5 bool
@@ -29,6 +47,9 @@ config TARGET_SOCFPGA_CYCLONE5 config TARGET_SOCFPGA_GEN5 bool select ALTERA_SDRAM + imply FPGA_SOCFPGA + imply SPL_STACK_R + imply SPL_SYS_MALLOC_SIMPLE config TARGET_SOCFPGA_STRATIX10 bool
configs/socfpga_arria10_defconfig +0 -8
@@ -1,13 +1,8 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 -CONFIG_SPL_SYS_MALLOC_F_LEN=0x10000 CONFIG_TARGET_SOCFPGA_ARRIA10_SOCDK=y -CONFIG_SPL=y CONFIG_IDENT_STRING="socfpga_arria10" CONFIG_DISTRO_DEFAULTS=y -CONFIG_NR_DRAM_BANKS=1 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200" # CONFIG_USE_BOOTCOMMAND is not set
@@ -29,9 +24,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" # CONFIG_EFI_PARTITION is not set CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc" CONFIG_ENV_IS_IN_MMC=y -CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y -CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y CONFIG_DM_MMC=y
@@ -43,4 +36,3 @@ CONFIG_SPI=y CONFIG_TIMER=y CONFIG_SPL_TIMER=y CONFIG_DESIGNWARE_APB_TIMER=y -CONFIG_USE_TINY_PRINTF=y
configs/socfpga_arria5_defconfig +0 -10
@@ -1,12 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_ARRIA5_SOCDK=y -CONFIG_SPL=y -CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DISTRO_DEFAULTS=y -CONFIG_NR_DRAM_BANKS=1 CONFIG_FIT=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -16,8 +11,6 @@ CONFIG_DEFAULT_FDT_FILE="socfpga_arria5_socdk.dtb" CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y -CONFIG_SPL_SYS_MALLOC_SIMPLE=y -CONFIG_SPL_STACK_R=y CONFIG_SPL_SPI_LOAD=y CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y
@@ -39,10 +32,8 @@ CONFIG_CMD_UBI=y # CONFIG_EFI_PARTITION is not set CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria5_socdk" CONFIG_ENV_IS_IN_MMC=y -CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DFU_MMC=y -CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y CONFIG_DM_I2C=y
@@ -72,4 +63,3 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y -CONFIG_USE_TINY_PRINTF=y
configs/socfpga_cyclone5_defconfig +0 -10
@@ -1,12 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_CYCLONE5_SOCDK=y -CONFIG_SPL=y -CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DISTRO_DEFAULTS=y -CONFIG_NR_DRAM_BANKS=1 CONFIG_FIT=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -16,8 +11,6 @@ CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_socdk.dtb" CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y -CONFIG_SPL_SYS_MALLOC_SIMPLE=y -CONFIG_SPL_STACK_R=y CONFIG_SPL_SPI_LOAD=y CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y
@@ -39,10 +32,8 @@ CONFIG_CMD_UBI=y # CONFIG_EFI_PARTITION is not set CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk" CONFIG_ENV_IS_IN_MMC=y -CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DFU_MMC=y -CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y CONFIG_DM_I2C=y
@@ -73,4 +64,3 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y -CONFIG_USE_TINY_PRINTF=y
configs/socfpga_dbm_soc1_defconfig +0 -10
@@ -1,11 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_DEVBOARDS_DBM_SOC1=y -CONFIG_SPL=y -CONFIG_SPL_STACK_R_ADDR=0x00800000 -CONFIG_NR_DRAM_BANKS=1 CONFIG_FIT=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200"
@@ -15,8 +10,6 @@ CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y -CONFIG_SPL_SYS_MALLOC_SIMPLE=y -CONFIG_SPL_STACK_R=y CONFIG_SPL_SPI_LOAD=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y
@@ -41,9 +34,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_dbm_soc1" CONFIG_ENV_IS_IN_MMC=y -CONFIG_SPL_DM=y CONFIG_DFU_MMC=y -CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y CONFIG_DM_I2C=y
@@ -67,4 +58,3 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y -CONFIG_USE_TINY_PRINTF=y
configs/socfpga_de0_nano_soc_defconfig +0 -10
@@ -1,12 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y -CONFIG_SPL=y -CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DISTRO_DEFAULTS=y -CONFIG_NR_DRAM_BANKS=1 CONFIG_FIT=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -17,8 +12,6 @@ CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set -CONFIG_SPL_SYS_MALLOC_SIMPLE=y -CONFIG_SPL_STACK_R=y CONFIG_SPL_SPI_LOAD=y CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y
@@ -40,9 +33,7 @@ CONFIG_CMD_UBI=y # CONFIG_EFI_PARTITION is not set CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de0_nano_soc" CONFIG_ENV_IS_IN_MMC=y -CONFIG_SPL_DM=y CONFIG_DFU_MMC=y -CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y CONFIG_DM_I2C=y
@@ -68,4 +59,3 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y -CONFIG_USE_TINY_PRINTF=y
configs/socfpga_de10_nano_defconfig +0 -10
@@ -1,12 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_TERASIC_DE10_NANO=y -CONFIG_SPL=y -CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DISTRO_DEFAULTS=y -CONFIG_NR_DRAM_BANKS=1 CONFIG_FIT=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -16,8 +11,6 @@ CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de10_nano.dtb" CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y -CONFIG_SPL_SYS_MALLOC_SIMPLE=y -CONFIG_SPL_STACK_R=y CONFIG_SPL_SPI_LOAD=y CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y
@@ -36,9 +29,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" # CONFIG_EFI_PARTITION is not set CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de10_nano" CONFIG_ENV_IS_IN_MMC=y -CONFIG_SPL_DM=y CONFIG_DFU_MMC=y -CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y CONFIG_DM_I2C=y
@@ -64,4 +55,3 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y -CONFIG_USE_TINY_PRINTF=y
configs/socfpga_de1_soc_defconfig +0 -10
@@ -1,12 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_TERASIC_DE1_SOC=y -CONFIG_SPL=y -CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DISTRO_DEFAULTS=y -CONFIG_NR_DRAM_BANKS=1 CONFIG_FIT=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -17,8 +12,6 @@ CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set -CONFIG_SPL_SYS_MALLOC_SIMPLE=y -CONFIG_SPL_STACK_R=y CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y
@@ -36,8 +29,6 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" # CONFIG_EFI_PARTITION is not set CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de1_soc" CONFIG_ENV_IS_IN_MMC=y -CONFIG_SPL_DM=y -CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y CONFIG_DM_I2C=y
@@ -55,5 +46,4 @@ CONFIG_SPI=y CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_DWC2=y -CONFIG_USE_TINY_PRINTF=y # CONFIG_EFI_LOADER is not set
configs/socfpga_is1_defconfig +0 -8
@@ -1,12 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_IS1=y -CONFIG_SPL=y -CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DISTRO_DEFAULTS=y -CONFIG_NR_DRAM_BANKS=1 CONFIG_FIT=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200"
@@ -17,7 +12,6 @@ CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y -CONFIG_SPL_STACK_R=y CONFIG_SPL_SPI_LOAD=y CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y
@@ -36,11 +30,9 @@ CONFIG_CMD_UBI=y # CONFIG_EFI_PARTITION is not set CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_is1" CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_BOOTCOUNT_LIMIT=y CONFIG_SYS_BOOTCOUNT_ADDR=0xfffffff8 -CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y CONFIG_DM_I2C=y
configs/socfpga_sockit_defconfig +0 -10
@@ -1,12 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_TERASIC_SOCKIT=y -CONFIG_SPL=y -CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DISTRO_DEFAULTS=y -CONFIG_NR_DRAM_BANKS=1 CONFIG_FIT=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -16,8 +11,6 @@ CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_sockit.dtb" CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y -CONFIG_SPL_SYS_MALLOC_SIMPLE=y -CONFIG_SPL_STACK_R=y CONFIG_SPL_SPI_LOAD=y CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y
@@ -39,10 +32,8 @@ CONFIG_CMD_UBI=y # CONFIG_EFI_PARTITION is not set CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sockit" CONFIG_ENV_IS_IN_MMC=y -CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DFU_MMC=y -CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y CONFIG_DM_I2C=y
@@ -73,4 +64,3 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y -CONFIG_USE_TINY_PRINTF=y
configs/socfpga_socrates_defconfig +0 -10
@@ -1,12 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_EBV_SOCRATES=y -CONFIG_SPL=y -CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DISTRO_DEFAULTS=y -CONFIG_NR_DRAM_BANKS=1 CONFIG_FIT=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -16,8 +11,6 @@ CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_socrates.dtb" CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y -CONFIG_SPL_SYS_MALLOC_SIMPLE=y -CONFIG_SPL_STACK_R=y CONFIG_SPL_SPI_LOAD=y CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y
@@ -40,10 +33,8 @@ CONFIG_CMD_UBI=y # CONFIG_EFI_PARTITION is not set CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates" CONFIG_ENV_IS_IN_MMC=y -CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DFU_MMC=y -CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y CONFIG_DM_I2C=y
@@ -73,4 +64,3 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y -CONFIG_USE_TINY_PRINTF=y
configs/socfpga_sr1500_defconfig +0 -10
@@ -1,12 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_SR1500=y -CONFIG_SPL=y -CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DISTRO_DEFAULTS=y -CONFIG_NR_DRAM_BANKS=1 CONFIG_FIT=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -18,8 +13,6 @@ CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_SPL_SYS_MALLOC_SIMPLE=y -CONFIG_SPL_STACK_R=y CONFIG_SPL_SPI_LOAD=y CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y
@@ -40,11 +33,9 @@ CONFIG_CMD_UBI=y # CONFIG_EFI_PARTITION is not set CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sr1500" CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_BOOTCOUNT_LIMIT=y CONFIG_SYS_BOOTCOUNT_ADDR=0xfffffff8 -CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y CONFIG_DM_I2C=y
@@ -63,4 +54,3 @@ CONFIG_MII=y CONFIG_DM_RESET=y CONFIG_SPI=y CONFIG_CADENCE_QSPI=y -CONFIG_USE_TINY_PRINTF=y
configs/socfpga_stratix10_defconfig +0 -4
@@ -3,10 +3,8 @@ CONFIG_ARCH_SOCFPGA=y CONFIG_SYS_TEXT_BASE=0x1000 CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_STRATIX10_SOCDK=y -CONFIG_SPL=y CONFIG_IDENT_STRING="socfpga_stratix10" CONFIG_SPL_FS_FAT=y -CONFIG_NR_DRAM_BANKS=1 CONFIG_BOOTDELAY=5 CONFIG_SPL_SPI_LOAD=y CONFIG_HUSH_PARSER=y
@@ -30,7 +28,6 @@ CONFIG_OF_EMBED=y CONFIG_DEFAULT_DEVICE_TREE="socfpga_stratix10_socdk" CONFIG_ENV_IS_IN_MMC=y CONFIG_NET_RANDOM_ETHADDR=y -CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y
@@ -55,4 +52,3 @@ CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_DWC2=y CONFIG_USB_STORAGE=y -CONFIG_USE_TINY_PRINTF=y
configs/socfpga_vining_fpga_defconfig +0 -10
@@ -1,12 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_TEXT_BASE=0x01000040 -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_SOCFPGA_SAMTEC_VINING_FPGA=y -CONFIG_SPL=y -CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_DISTRO_DEFAULTS=y -CONFIG_NR_DRAM_BANKS=1 CONFIG_FIT=y CONFIG_BOOTDELAY=5 CONFIG_USE_BOOTARGS=y
@@ -19,8 +14,6 @@ CONFIG_MISC_INIT_R=y CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y -CONFIG_SPL_SYS_MALLOC_SIMPLE=y -CONFIG_SPL_STACK_R=y CONFIG_SPL_SPI_LOAD=y CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y
@@ -45,12 +38,10 @@ CONFIG_CMD_UBI=y CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_vining_fpga" CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_NET_RANDOM_ETHADDR=y -CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DFU_SF=y -CONFIG_FPGA_SOCFPGA=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y CONFIG_LED_STATUS=y
@@ -90,4 +81,3 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y -CONFIG_USE_TINY_PRINTF=y
Signature · 1 line
2.17.1
PATCH v2 4/5 arm: socfpga: imply/default common config options
Quoted 65 lines · Simon Goldschmidt
This commit moves common config options used in all socfpga boards to select/imply in
Kconfig. This both cleans up the defconfig files as well as makes future changes easier.Options implied/defaulted for all sub-arches:
- SPL,SPL_DM,USE_TINY_PRINTF,NR_DRAM_BANKSOptions implied/defaulted for implied for A10 & gen5:
-FPGA_SOCFPGA,SYS_MALLOC_F_LEN,SYS_TEXT_BASEOptions implied/defaulted for A10:
-SPL_SYS_MALLOC_F_LENOptions implied/defaulted for gen5:
-SPL_STACK_R,SPL_SYS_MALLOC_SIMPLE,SPL_STACK_R_ADDRSigned-off-by Simon Goldschmidt <[email protected]>---
Changes in v2:
- added patch to imply/default common config optionsarch/arm/Kconfig | 3 +++ arch/arm/mach-socfpga/Kconfig | 21 +++++++++++++++++++++ configs/socfpga_arria10_defconfig | 8 -------- configs/socfpga_arria5_defconfig | 10 ---------- configs/socfpga_cyclone5_defconfig | 10 ---------- configs/socfpga_dbm_soc1_defconfig | 10 ---------- configs/socfpga_de0_nano_soc_defconfig | 10 ---------- configs/socfpga_de10_nano_defconfig | 10 ---------- configs/socfpga_de1_soc_defconfig | 10 ---------- configs/socfpga_is1_defconfig | 8 -------- configs/socfpga_sockit_defconfig | 10 ---------- configs/socfpga_socrates_defconfig | 10 ---------- configs/socfpga_sr1500_defconfig | 10 ---------- configs/socfpga_stratix10_defconfig | 4 ---- configs/socfpga_vining_fpga_defconfig | 10 ---------- 15 files changed, 24 insertions(+), 120 deletions(-)arch/arm/Kconfig +3
-0@@ -839,12 +839,15 @@ config ARCH_SOCFPGA imply DM_SPI imply DM_SPI_FLASH imply FAT_WRITE + imply SPL + imply SPL_DM imply SPL_LIBDISK_SUPPORT imply SPL_MMC_SUPPORT imply SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION imply SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE imply SPL_SPI_FLASH_SUPPORT imply SPL_SPI_SUPPORT + imply USE_TINY_PRINTF config ARCH_SUNXI bool "Support sunxi (Allwinner) SoCs"arch/arm/mach-socfpga/Kconfig +0
-0@@ -1,8 +1,25 @@ if ARCH_SOCFPGA
arch/arm/mach-socfpga/Kconfig line 11
Quoted 10 lines
arch/arm/mach-socfpga/Kconfig +9
-0+config NR_DRAM_BANKS + default 1 + +config SPL_STACK_R_ADDR + default 0x00800000 if TARGET_SOCFPGA_GEN5 + +config SPL_SYS_MALLOC_F_LEN + default 0x10000 if TARGET_SOCFPGA_ARRIA10 +
This is already defined in /Kconfig, won't you end up with duplicate/redefined symbols this way ?
CCing Yamada-san, since he's the Kconfig guru.
Signature · 2 lines
Best regards, Marek Vasut
PATCH v2 4/5 arm: socfpga: imply/default common config options
Marek Vasut <[email protected]> schrieb am Mo., 4. März 2019, 22:19:
Quoted 68 lines · Simon Goldschmidt
Review
Quoted 60 lines
This commit moves common config options used in all socfpga boards to select/imply in
Kconfig. This both cleans up the defconfig files as well as makes future changes easier.Options implied/defaulted for all sub-arches:
- SPL,SPL_DM,USE_TINY_PRINTF,NR_DRAM_BANKSOptions implied/defaulted for implied for A10 & gen5:
-FPGA_SOCFPGA,SYS_MALLOC_F_LEN,SYS_TEXT_BASEOptions implied/defaulted for A10:
-SPL_SYS_MALLOC_F_LENOptions implied/defaulted for gen5:
-SPL_STACK_R,SPL_SYS_MALLOC_SIMPLE,SPL_STACK_R_ADDRSigned-off-by Simon Goldschmidt <[email protected]>---
Changes in v2:
- added patch to imply/default common config optionsarch/arm/Kconfig | 3 +++ arch/arm/mach-socfpga/Kconfig | 21 +++++++++++++++++++++ configs/socfpga_arria10_defconfig | 8 -------- configs/socfpga_arria5_defconfig | 10 ---------- configs/socfpga_cyclone5_defconfig | 10 ---------- configs/socfpga_dbm_soc1_defconfig | 10 ---------- configs/socfpga_de0_nano_soc_defconfig | 10 ---------- configs/socfpga_de10_nano_defconfig | 10 ---------- configs/socfpga_de1_soc_defconfig | 10 ---------- configs/socfpga_is1_defconfig | 8 -------- configs/socfpga_sockit_defconfig | 10 ---------- configs/socfpga_socrates_defconfig | 10 ---------- configs/socfpga_sr1500_defconfig | 10 ---------- configs/socfpga_stratix10_defconfig | 4 ---- configs/socfpga_vining_fpga_defconfig | 10 ---------- 15 files changed, 24 insertions(+), 120 deletions(-)arch/arm/Kconfig +3
-0@@ -839,12 +839,15 @@ config ARCH_SOCFPGA imply DM_SPI imply DM_SPI_FLASH imply FAT_WRITE + imply SPL + imply SPL_DM imply SPL_LIBDISK_SUPPORT imply SPL_MMC_SUPPORT imply SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION imply SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE imply SPL_SPI_FLASH_SUPPORT imply SPL_SPI_SUPPORT + imply USE_TINY_PRINTF config ARCH_SUNXI bool "Support sunxi (Allwinner) SoCs"(quoted diff) +0
-0b/arch/arm/mach-socfpga/Kconfig
Quoted 6 lines
index
5e87371f8c..da801eb660100644arch/arm/mach-socfpga/Kconfig +0
-0@@ -1,8 +1,25 @@ if ARCH_SOCFPGA
Quoted 13 lines
arch/arm/mach-socfpga/Kconfig line 11
Quoted 9 lines
arch/arm/mach-socfpga/Kconfig +9
-0+config NR_DRAM_BANKS + default 1 + +config SPL_STACK_R_ADDR + default 0x00800000 if TARGET_SOCFPGA_GEN5 + +config SPL_SYS_MALLOC_F_LEN + default 0x10000 if TARGET_SOCFPGA_ARRIA10 +This is already defined in /Kconfig, won't you end up with duplicate/redefined symbols this way ?
I did not get errors. I copied the handling from SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE in the same file. Plus it seems like it's done like this in other Kconfig files, too.
Quoted 2 lines
CCing Yamada-san, since he's the
Kconfigguru.
Right, getting more insight here would be nice.
Regards,
Simon
PATCH v2 4/5 arm: socfpga: imply/default common config options
Quoted 84 lines · Simon Goldschmidt
Marek Vasut <marex at denx.de <mailto:[email protected]>> schrieb am Mo., 4. März 2019, 22:19:
On 3/4/19 9:53 PM, Simon Goldschmidt wrote:
> This commit moves common config options used in all socfpga boards > to select/imply inKconfig. This both cleans up the defconfig files > as well as makes future changes easier.
>
> Options implied/defaulted for all sub-arches:
> - SPL,SPL_DM,USE_TINY_PRINTF,NR_DRAM_BANKS
>
> Options implied/defaulted for implied for A10 & gen5:
> -FPGA_SOCFPGA,SYS_MALLOC_F_LEN,SYS_TEXT_BASE
>
> Options implied/defaulted for A10:
> -SPL_SYS_MALLOC_F_LEN
>
> Options implied/defaulted for gen5:
> -SPL_STACK_R,SPL_SYS_MALLOC_SIMPLE,SPL_STACK_R_ADDR>
> Signed-off-by: Simon Goldschmidt <[email protected] <mailto:[email protected]>>
> ---
>
> Changes in v2:
> - added patch to imply/default common config options
>
> arch/arm/Kconfig | 3 +++
> arch/arm/mach-socfpga/Kconfig | 21 +++++++++++++++++++++ > configs/socfpga_arria10_defconfig | 8 --------
> configs/socfpga_arria5_defconfig | 10 ---------- > configs/socfpga_cyclone5_defconfig | 10 ---------- > configs/socfpga_dbm_soc1_defconfig | 10 ---------- > configs/socfpga_de0_nano_soc_defconfig | 10 ---------- > configs/socfpga_de10_nano_defconfig | 10 ---------- > configs/socfpga_de1_soc_defconfig | 10 ---------- > configs/socfpga_is1_defconfig | 8 --------
> configs/socfpga_sockit_defconfig | 10 ---------- > configs/socfpga_socrates_defconfig | 10 ---------- > configs/socfpga_sr1500_defconfig | 10 ---------- > configs/socfpga_stratix10_defconfig | 4 ----
> configs/socfpga_vining_fpga_defconfig | 10 ---------- > 15 files changed, 24 insertions(+), 120 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> indexded7c11a4c..71bb14acce100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -839,12 +839,15 @@ configARCH_SOCFPGA
> implyDM_SPI
> implyDM_SPI_FLASH
> implyFAT_WRITE
> + imply SPL
> + implySPL_DM
> implySPL_LIBDISK_SUPPORT
> implySPL_MMC_SUPPORT
> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE> implySPL_SPI_FLASH_SUPPORT
> implySPL_SPI_SUPPORT
> + implyUSE_TINY_PRINTF
>
> configARCH_SUNXI
> bool "Support sunxi (Allwinner) SoCs"
> diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
> index5e87371f8c..da801eb660100644
> --- a/arch/arm/mach-socfpga/Kconfig
> +++ b/arch/arm/mach-socfpga/Kconfig
> @@ -1,8 +1,25 @@
> ifARCH_SOCFPGA
>
> +configNR_DRAM_BANKS
> + default 1
> +
> +configSPL_STACK_R_ADDR
> + default0x00800000ifTARGET_SOCFPGA_GEN5
> +
> +configSPL_SYS_MALLOC_F_LEN
> + default0x10000ifTARGET_SOCFPGA_ARRIA10
> +
Quoted 7 lines
This is already defined in /Kconfig, won't you end up with duplicate/redefined symbols this way ?
I did not get errors. I copied the handling
from SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE in the same file. Plus it seems like it's done like this in otherKconfigfiles, too.
I know it is done. I am not convinced it's right.
Quoted 4 lines
CCing Yamada-san, since he's the
Kconfigguru.Right, getting more insight here would be nice.
Yes please.
Signature · 2 lines
Best regards, Marek Vasut
PATCH v2 4/5 arm: socfpga: imply/default common config options
Am 04.03.2019 um 22:34 schrieb Marek Vasut:
Quoted 89 lines · Simon Goldschmidt
Quoted 88 lines
Marek Vasut <marex at denx.de <mailto:[email protected]>> schrieb am Mo., 4. März 2019, 22:19:
On 3/4/19 9:53 PM, Simon Goldschmidt wrote:
> This commit moves common config options used in all socfpga boards > to select/imply inKconfig. This both cleans up the defconfig files > as well as makes future changes easier.
>
> Options implied/defaulted for all sub-arches:
> - SPL,SPL_DM,USE_TINY_PRINTF,NR_DRAM_BANKS
>
> Options implied/defaulted for implied for A10 & gen5:
> -FPGA_SOCFPGA,SYS_MALLOC_F_LEN,SYS_TEXT_BASE
>
> Options implied/defaulted for A10:
> -SPL_SYS_MALLOC_F_LEN
>
> Options implied/defaulted for gen5:
> -SPL_STACK_R,SPL_SYS_MALLOC_SIMPLE,SPL_STACK_R_ADDR>
> Signed-off-by: Simon Goldschmidt <[email protected] <mailto:[email protected]>>
> ---
>
> Changes in v2:
> - added patch to imply/default common config options
>
> arch/arm/Kconfig | 3 +++
> arch/arm/mach-socfpga/Kconfig | 21 +++++++++++++++++++++ > configs/socfpga_arria10_defconfig | 8 --------
> configs/socfpga_arria5_defconfig | 10 ---------- > configs/socfpga_cyclone5_defconfig | 10 ---------- > configs/socfpga_dbm_soc1_defconfig | 10 ---------- > configs/socfpga_de0_nano_soc_defconfig | 10 ---------- > configs/socfpga_de10_nano_defconfig | 10 ---------- > configs/socfpga_de1_soc_defconfig | 10 ---------- > configs/socfpga_is1_defconfig | 8 --------
> configs/socfpga_sockit_defconfig | 10 ---------- > configs/socfpga_socrates_defconfig | 10 ---------- > configs/socfpga_sr1500_defconfig | 10 ---------- > configs/socfpga_stratix10_defconfig | 4 ----
> configs/socfpga_vining_fpga_defconfig | 10 ---------- > 15 files changed, 24 insertions(+), 120 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> indexded7c11a4c..71bb14acce100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -839,12 +839,15 @@ configARCH_SOCFPGA
> implyDM_SPI
> implyDM_SPI_FLASH
> implyFAT_WRITE
> + imply SPL
> + implySPL_DM
> implySPL_LIBDISK_SUPPORT
> implySPL_MMC_SUPPORT
> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE> implySPL_SPI_FLASH_SUPPORT
> implySPL_SPI_SUPPORT
> + implyUSE_TINY_PRINTF
>
> configARCH_SUNXI
> bool "Support sunxi (Allwinner) SoCs"
> diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
> index5e87371f8c..da801eb660100644
> --- a/arch/arm/mach-socfpga/Kconfig
> +++ b/arch/arm/mach-socfpga/Kconfig
> @@ -1,8 +1,25 @@
> ifARCH_SOCFPGA
>
> +configNR_DRAM_BANKS
> + default 1
> +
> +configSPL_STACK_R_ADDR
> + default0x00800000ifTARGET_SOCFPGA_GEN5
> +
> +configSPL_SYS_MALLOC_F_LEN
> + default0x10000ifTARGET_SOCFPGA_ARRIA10
> +This is already defined in /Kconfig, won't you end up with duplicate/redefined symbols this way ?
Quoted 5 lines
Quoted 3 lines
I did not get errors. I copied the handling
from SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE in the same file. Plus it seems like it's done like this in otherKconfigfiles, too.I know it is done. I am not convinced it's right.
Would it be better acceptable if I moved the defaults to the Kconfig files where these settings are defined? I always thought it to be strange to clutter those with arch-specific settings, but I don't really have a strong preference...
Regards,
Simon
Quoted 8 lines
Quoted 5 lines
CCing Yamada-san, since he's the
Kconfigguru.Right, getting more insight here would be nice.
Yes please.
PATCH v2 4/5 arm: socfpga: imply/default common config options
Quoted 97 lines · Simon Goldschmidt
Am 04.03.2019 um 22:34 schrieb Marek Vasut:
Quoted 96 lines · Simon Goldschmidt
Quoted 94 lines
Marek Vasut <marex at denx.de <mailto:[email protected]>> schrieb am Mo., 4. März 2019, 22:19:
On 3/4/19 9:53 PM, Simon Goldschmidt wrote:
> This commit moves common config options used in all socfpga boards
> to select/imply inKconfig. This both cleans up the defconfig files
> as well as makes future changes easier.
>
> Options implied/defaulted for all sub-arches:
> - SPL,SPL_DM,USE_TINY_PRINTF,NR_DRAM_BANKS
>
> Options implied/defaulted for implied for A10 & gen5:
> -FPGA_SOCFPGA,SYS_MALLOC_F_LEN,SYS_TEXT_BASE
>
> Options implied/defaulted for A10:
> -SPL_SYS_MALLOC_F_LEN
>
> Options implied/defaulted for gen5:
> -SPL_STACK_R,SPL_SYS_MALLOC_SIMPLE,SPL_STACK_R_ADDR>
> Signed-off-by: Simon Goldschmidt <[email protected] <mailto:[email protected]>>
> ---
>
> Changes in v2:
> - added patch to imply/default common config options >
> arch/arm/Kconfig | 3 +++
> arch/arm/mach-socfpga/Kconfig | 21
+++++++++++++++++++++
> configs/socfpga_arria10_defconfig | 8 -------- > configs/socfpga_arria5_defconfig | 10 ---------- > configs/socfpga_cyclone5_defconfig | 10 ---------- > configs/socfpga_dbm_soc1_defconfig | 10 ---------- > configs/socfpga_de0_nano_soc_defconfig | 10 ---------- > configs/socfpga_de10_nano_defconfig | 10 ---------- > configs/socfpga_de1_soc_defconfig | 10 ---------- > configs/socfpga_is1_defconfig | 8 -------- > configs/socfpga_sockit_defconfig | 10 ---------- > configs/socfpga_socrates_defconfig | 10 ---------- > configs/socfpga_sr1500_defconfig | 10 ---------- > configs/socfpga_stratix10_defconfig | 4 ----
> configs/socfpga_vining_fpga_defconfig | 10 ---------- > 15 files changed, 24 insertions(+), 120 deletions(-) >
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> indexded7c11a4c..71bb14acce100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -839,12 +839,15 @@ configARCH_SOCFPGA
> implyDM_SPI
> implyDM_SPI_FLASH
> implyFAT_WRITE
> + imply SPL
> + implySPL_DM
> implySPL_LIBDISK_SUPPORT
> implySPL_MMC_SUPPORT
> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE> implySPL_SPI_FLASH_SUPPORT
> implySPL_SPI_SUPPORT
> + implyUSE_TINY_PRINTF
>
> configARCH_SUNXI
> bool "Support sunxi (Allwinner) SoCs"
> diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
> index5e87371f8c..da801eb660100644
> --- a/arch/arm/mach-socfpga/Kconfig
> +++ b/arch/arm/mach-socfpga/Kconfig
> @@ -1,8 +1,25 @@
> ifARCH_SOCFPGA
>
> +configNR_DRAM_BANKS
> + default 1
> +
> +configSPL_STACK_R_ADDR
> + default0x00800000ifTARGET_SOCFPGA_GEN5
> +
> +configSPL_SYS_MALLOC_F_LEN
> + default0x10000ifTARGET_SOCFPGA_ARRIA10
> +This is already defined in /Kconfig, won't you end up with duplicate/redefined symbols this way ?
I did not get errors. I copied the handling
from SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE in the same file. Plus it seems like it's done like this in otherKconfigfiles, too.
Quoted 6 lines
Quoted 1 line
I know it is done. I am not convinced it's right.
Would it be better acceptable if I moved the defaults to the
Kconfigfiles where these settings are defined? I always thought it to be strange to clutter those with arch-specific settings, but I don't really have a strong preference...
I agree with you on this. I'd really like some reply from Yamada-san.
Signature · 2 lines
Best regards, Marek Vasut
PATCH v2 4/5 arm: socfpga: imply/default common config options
Am 05.03.2019 um 21:58 schrieb Marek Vasut:
Quoted 98 lines · Simon Goldschmidt
Quoted 97 lines
Am 04.03.2019 um 22:34 schrieb Marek Vasut:
Quoted 96 lines · Simon Goldschmidt
Quoted 94 lines
Marek Vasut <marex at denx.de <mailto:[email protected]>> schrieb am Mo., 4. März 2019, 22:19:
On 3/4/19 9:53 PM, Simon Goldschmidt wrote:
> This commit moves common config options used in all socfpga
boards
> to select/imply inKconfig. This both cleans up the defconfig
files
> as well as makes future changes easier.
>
> Options implied/defaulted for all sub-arches:
> - SPL,SPL_DM,USE_TINY_PRINTF,NR_DRAM_BANKS
>
> Options implied/defaulted for implied for A10 & gen5:
> -FPGA_SOCFPGA,SYS_MALLOC_F_LEN,SYS_TEXT_BASE
>
> Options implied/defaulted for A10:
> -SPL_SYS_MALLOC_F_LEN
>
> Options implied/defaulted for gen5:
> -SPL_STACK_R,SPL_SYS_MALLOC_SIMPLE,SPL_STACK_R_ADDR>
> Signed-off-by: Simon Goldschmidt <[email protected] <mailto:[email protected]>>
> ---
>
> Changes in v2:
> - added patch to imply/default common config options >> arch/arm/Kconfig | 3 +++ > arch/arm/mach-socfpga/Kconfig | 21 +++++++++++++++++++++ > configs/socfpga_arria10_defconfig | 8 -------- > configs/socfpga_arria5_defconfig | 10 ---------- > configs/socfpga_cyclone5_defconfig | 10 ---------- > configs/socfpga_dbm_soc1_defconfig | 10 ---------- > configs/socfpga_de0_nano_soc_defconfig | 10 ---------- > configs/socfpga_de10_nano_defconfig | 10 ---------- > configs/socfpga_de1_soc_defconfig | 10 ---------- > configs/socfpga_is1_defconfig | 8 -------- > configs/socfpga_sockit_defconfig | 10 ---------- > configs/socfpga_socrates_defconfig | 10 ---------- > configs/socfpga_sr1500_defconfig | 10 ---------- > configs/socfpga_stratix10_defconfig | 4 ---- > configs/socfpga_vining_fpga_defconfig | 10 ----------> 15 files changed, 24 insertions(+), 120 deletions(-) >
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > indexded7c11a4c..71bb14acce100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -839,12 +839,15 @@ configARCH_SOCFPGA
> implyDM_SPI
> implyDM_SPI_FLASH
> implyFAT_WRITE
> + imply SPL
> + implySPL_DM
> implySPL_LIBDISK_SUPPORT
> implySPL_MMC_SUPPORT
> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE> implySPL_SPI_FLASH_SUPPORT
> implySPL_SPI_SUPPORT
> + implyUSE_TINY_PRINTF
>
> configARCH_SUNXI
> bool "Support sunxi (Allwinner) SoCs"
> diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
> index5e87371f8c..da801eb660100644
> --- a/arch/arm/mach-socfpga/Kconfig
> +++ b/arch/arm/mach-socfpga/Kconfig
> @@ -1,8 +1,25 @@
> ifARCH_SOCFPGA
>
> +configNR_DRAM_BANKS
> + default 1
> +
> +configSPL_STACK_R_ADDR
> + default0x00800000ifTARGET_SOCFPGA_GEN5> +
> +configSPL_SYS_MALLOC_F_LEN
> + default0x10000ifTARGET_SOCFPGA_ARRIA10> +This is already defined in /Kconfig, won't you end up with duplicate/redefined symbols this way ?
I did not get errors. I copied the handling
from SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE in the same file. Plus it seems like it's done like this in otherKconfigfiles, too.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
I know it is done. I am not convinced it's right.
Would it be better acceptable if I moved the defaults to the
Kconfigfiles where these settings are defined? I always thought it to be strange to clutter those with arch-specific settings, but I don't really have a strong preference...I agree with you on this. I'd really like some reply from Yamada-san.
So without a reply from Yamada-san for 10 days, how do we continue here?
In the next version (v3), Patch 2/5 should be fixed for a10. I'd also extend that next version with further cleanup patches from an earlier series [1] since I have I2C EEPROM finally running with DM (tested on the socfpga_socrates board by using the "Phy1" daughter board and a matching FPGA configuration).
[1] https://patchwork.ozlabs.org/project/uboot/list/?series=85229
Regards,
Simon
PATCH v2 4/5 arm: socfpga: imply/default common config options
Hi Mrek,
Am 15.03.2019 um 21:34 schrieb Simon Goldschmidt:
Quoted 101 lines
Am 05.03.2019 um 21:58 schrieb Marek Vasut:
Quoted 100 lines · Simon Goldschmidt
Quoted 99 lines
Am 04.03.2019 um 22:34 schrieb Marek Vasut:
Quoted 97 lines · Simon Goldschmidt
Quoted 87 lines
Marek Vasut <marex at denx.de <mailto:[email protected]>> schrieb am Mo., 4. März 2019, 22:19:
On 3/4/19 9:53 PM, Simon Goldschmidt wrote:
> This commit moves common config options used in all socfpga
boards
> to select/imply inKconfig. This both cleans up the defconfig
files
> as well as makes future changes easier.
>
> Options implied/defaulted for all sub-arches:
> - SPL,SPL_DM,USE_TINY_PRINTF,NR_DRAM_BANKS
>
> Options implied/defaulted for implied for A10 & gen5:
> -FPGA_SOCFPGA,SYS_MALLOC_F_LEN,SYS_TEXT_BASE
>
> Options implied/defaulted for A10:
> -SPL_SYS_MALLOC_F_LEN
>
> Options implied/defaulted for gen5:
> -SPL_STACK_R,SPL_SYS_MALLOC_SIMPLE,SPL_STACK_R_ADDR>
> Signed-off-by: Simon Goldschmidt <[email protected] <mailto:[email protected]>>
> ---
>
> Changes in v2:
> - added patch to imply/default common config options >> arch/arm/Kconfig | 3 +++ > arch/arm/mach-socfpga/Kconfig | 21 +++++++++++++++++++++ > configs/socfpga_arria10_defconfig | 8 -------- > configs/socfpga_arria5_defconfig | 10 ---------- > configs/socfpga_cyclone5_defconfig | 10 ---------- > configs/socfpga_dbm_soc1_defconfig | 10 ---------- > configs/socfpga_de0_nano_soc_defconfig | 10 ---------- > configs/socfpga_de10_nano_defconfig | 10 ---------- > configs/socfpga_de1_soc_defconfig | 10 ---------- > configs/socfpga_is1_defconfig | 8 -------- > configs/socfpga_sockit_defconfig | 10 ---------- > configs/socfpga_socrates_defconfig | 10 ---------- > configs/socfpga_sr1500_defconfig | 10 ---------- > configs/socfpga_stratix10_defconfig | 4 ---- > configs/socfpga_vining_fpga_defconfig | 10 ----------> 15 files changed, 24 insertions(+), 120 deletions(-) >
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > indexded7c11a4c..71bb14acce100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -839,12 +839,15 @@ configARCH_SOCFPGA
> implyDM_SPI
> implyDM_SPI_FLASH
> implyFAT_WRITE
> + imply SPL
> + implySPL_DM
> implySPL_LIBDISK_SUPPORT
> implySPL_MMC_SUPPORT
> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE> implySPL_SPI_FLASH_SUPPORT
> implySPL_SPI_SUPPORT
> + implyUSE_TINY_PRINTF
>
> configARCH_SUNXI
> bool "Support sunxi (Allwinner) SoCs"
> diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
> index5e87371f8c..da801eb660100644
> --- a/arch/arm/mach-socfpga/Kconfig
> +++ b/arch/arm/mach-socfpga/Kconfig
> @@ -1,8 +1,25 @@
> ifARCH_SOCFPGA
>
> +configNR_DRAM_BANKS
> + default 1
> +
> +configSPL_STACK_R_ADDR
> + default0x00800000ifTARGET_SOCFPGA_GEN5> +
> +configSPL_SYS_MALLOC_F_LEN
> + default0x10000ifTARGET_SOCFPGA_ARRIA10> +Quoted 7 lines
This is already defined in /Kconfig, won't you end up with duplicate/redefined symbols this way ?
I did not get errors. I copied the handling
from SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE in the same file. Plus it seems like it's done like this in otherKconfigfiles, too.I know it is done. I am not convinced it's right.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Would it be better acceptable if I moved the defaults to the
Kconfigfiles where these settings are defined? I always thought it to be strange to clutter those with arch-specific settings, but I don't really have a strong preference...I agree with you on this. I'd really like some reply from Yamada-san.
So without a reply from Yamada-san for 10 days, how do we continue here?
Gentle ping?
Quoted 2 lines
In the next version (v3), Patch 2/5 should be fixed for a10.
In v3, I'd remove patch 2/5 since it is already covered by a different series that properly cleans up using full malloc only in SPL [2] and I'll make this series depend on v3 of that:
[2] https://patchwork.ozlabs.org/project/uboot/list/?series=97430
Regards,
Simon
Quoted 10 lines
I'd also extend that next version with further cleanup patches from an earlier series [1] since I have I2C EEPROM finally running with DM (tested on the
socfpga_socratesboard by using the "Phy1" daughter board and a matching FPGA configuration).[1] https://patchwork.ozlabs.org/project/uboot/list/?series=85229
Regards,
Simon
PATCH v2 4/5 arm: socfpga: imply/default common config options
Hi Simon,
Sorry, I completely missed this thread.
Quoted 102 lines · Simon Goldschmidt
Hi Mrek,
Am 15.03.2019 um 21:34 schrieb Simon Goldschmidt:
Quoted 98 lines
Am 05.03.2019 um 21:58 schrieb Marek Vasut:
Quoted 97 lines · Simon Goldschmidt
Quoted 96 lines
Am 04.03.2019 um 22:34 schrieb Marek Vasut:
Quoted 95 lines · Simon Goldschmidt
Quoted 94 lines
Marek Vasut <marex at denx.de <mailto:[email protected]>> schrieb am Mo., 4. März 2019, 22:19:
On 3/4/19 9:53 PM, Simon Goldschmidt wrote:
> This commit moves common config options used in all socfpga
boards
> to select/imply inKconfig. This both cleans up the defconfig
files
> as well as makes future changes easier.
>
> Options implied/defaulted for all sub-arches:
> - SPL,SPL_DM,USE_TINY_PRINTF,NR_DRAM_BANKS
>
> Options implied/defaulted for implied for A10 & gen5:
> -FPGA_SOCFPGA,SYS_MALLOC_F_LEN,SYS_TEXT_BASE
>
> Options implied/defaulted for A10:
> -SPL_SYS_MALLOC_F_LEN
>
> Options implied/defaulted for gen5:
> -SPL_STACK_R,SPL_SYS_MALLOC_SIMPLE,SPL_STACK_R_ADDR>
> Signed-off-by: Simon Goldschmidt <[email protected] <mailto:[email protected]>>
> ---
>
> Changes in v2:
> - added patch to imply/default common config options >
>arch/arm/Kconfig| 3 +++
>arch/arm/mach-socfpga/Kconfig| 21
+++++++++++++++++++++> configs/socfpga_arria10_defconfig | 8 -------- > configs/socfpga_arria5_defconfig | 10 ---------- > configs/socfpga_cyclone5_defconfig | 10 ---------- > configs/socfpga_dbm_soc1_defconfig | 10 ---------- > configs/socfpga_de0_nano_soc_defconfig | 10 ---------- > configs/socfpga_de10_nano_defconfig | 10 ---------- > configs/socfpga_de1_soc_defconfig | 10 ---------- > configs/socfpga_is1_defconfig | 8 -------- > configs/socfpga_sockit_defconfig | 10 ---------- > configs/socfpga_socrates_defconfig | 10 ---------- > configs/socfpga_sr1500_defconfig | 10 ---------- > configs/socfpga_stratix10_defconfig | 4 ---- > configs/socfpga_vining_fpga_defconfig | 10 ----------> 15 files changed, 24 insertions(+), 120 deletions(-) >
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > indexded7c11a4c..71bb14acce100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -839,12 +839,15 @@ configARCH_SOCFPGA
> implyDM_SPI
> implyDM_SPI_FLASH
> implyFAT_WRITE
> + imply SPL
> + implySPL_DM
> implySPL_LIBDISK_SUPPORT
> implySPL_MMC_SUPPORT
> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
> implySPL_SPI_FLASH_SUPPORT
> implySPL_SPI_SUPPORT
> + implyUSE_TINY_PRINTF
>
> configARCH_SUNXI
> bool "Support sunxi (Allwinner) SoCs"
> diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
> index5e87371f8c..da801eb660100644
> --- a/arch/arm/mach-socfpga/Kconfig
> +++ b/arch/arm/mach-socfpga/Kconfig
> @@ -1,8 +1,25 @@
> ifARCH_SOCFPGA
>
> +configNR_DRAM_BANKS
> + default 1
> +
> +configSPL_STACK_R_ADDR
> + default0x00800000ifTARGET_SOCFPGA_GEN5
> +
> +configSPL_SYS_MALLOC_F_LEN
> + default0x10000ifTARGET_SOCFPGA_ARRIA10
> +This is already defined in /Kconfig, won't you end up with duplicate/redefined symbols this way ?
I did not get errors. I copied the handling
fromSYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPEin the same file. Plus it seems like it's done like this in otherKconfigfiles, too.
This is correct in terms of Kconfig grammar.
You can define the same symbol multiple times.
For example,
if ARCH_SOCFPGA
config FOO
default 100
endif
config FOO
int "foo"
default 10
... is equivalent to
config FOO
default 100 if ARCH_SOCFPGA
int "foo"
default 10
You can exploit this trick.
However, I see one problem
when we sync defconfig files globally
with tools/moveconfig.py
savedefconfig sorts CONFIG options in the order
they are parsed.
Every time people add/remove entry to/from their arch/arm/mach-*/Kconfig or board/*/Kconfig, the location where the symbol first appears changes.
That's is why symbols go up and down for every resync. For example, see commit fca0128da4803
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
I know it is done. I am not convinced it's right.
Would it be better acceptable if I moved the defaults to the
Kconfigfiles where these settings are defined? I always thought it to be strange to clutter those with arch-specific settings,
I agree. We are screwed up with:
config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
hex "Address on the MMC to load U-Boot from"
depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
default 0x50 if ARCH_SUNXI
default 0x75 if ARCH_DAVINCI
default 0x8a if ARCH_MX6 || ARCH_MX7
default 0x100 if ARCH_UNIPHIER
default 0x140 if ARCH_MVEBU
default 0x200 if ARCH_SOCFPGA || ARCH_AT91
default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \
OMAP54XX || AM33XX || AM43XX || ARCH_K3
default 0x4000 if ARCH_ROCKCHIPWhen I introduced Kconfig to U-Boot,
I did not mean to move CONFIG options verbatim
from include/config/<board>.h to Kconfig files.
I expected old clutter things would be replaced with something cool. But, it did not happen.
We are just moving CONFIG options to Kconfig as they are.
In old days, people added CONFIG_ prefix to anything, most of which are not configuration at all.
For example, CONFIG_BOOTARGS in configs/axm_defconfig is an extremely crazy case.
Probably, you want to see a solution instead of
my complaint.
Let's use barebox (Bummer!)
But, hold on.
Barebox had already solved problems U-Boot is suffering from.
If you are annoyed by duplicated defconfigs,
Barebox supports multiple boards mechanism.
So just a single 'socfpga_defconfig' generates multiple board images.
The image is still small by exploiting dead code elimination.
$ make ARCH=arm socfpga_defconfig $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
will produce
SHIPPED images/barebox-socfpga-de0_nano_soc.img
SHIPPED images/barebox-socfpga-sockit.img
SHIPPED images/barebox-socfpga-socrates.img
images built:
barebox-socfpga-de0_nano_soc.img
barebox-socfpga-sockit.img
barebox-socfpga-socrates.img
I do not think we should change U-Boot in the same way, though. Probably, it is too late for U-Boot, and people who like cleaner code base can switch to barebox.
Anyway.
Let's go back to U-Boot topic.
For the duplicated defconfig issue,
recently we discussed here:
http://patchwork.ozlabs.org/patch/1043986/
I do not know super-cool solution for U-Boot.
At the cost of increased memory footprint, some defconfig could be merged, if Marek likes it.
(U-Boot needs to link boot code for all boards into a single SPL. That's the difference from Barebox.)
Thanks.
Masahiro Yamada
Quoted 36 lines
but I don't really
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
have a strong preference...
I agree with you on this. I'd really like some reply from Yamada-san.
So without a reply from Yamada-san for 10 days, how do we continue here?
Gentle ping?
Quoted 2 lines
In the next version (v3), Patch 2/5 should be fixed for a10.
In v3, I'd remove patch 2/5 since it is already covered by a different series that properly cleans up using full malloc only in SPL [2] and I'll make this series depend on v3 of that:
[2] https://patchwork.ozlabs.org/project/uboot/list/?series=97430
Regards,
SimonQuoted 10 lines
I'd also extend that next version with further cleanup patches from an earlier series [1] since I have I2C EEPROM finally running with DM (tested on the
socfpga_socratesboard by using the "Phy1" daughter board and a matching FPGA configuration).[1] https://patchwork.ozlabs.org/project/uboot/list/?series=85229
Regards,
Simon_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH v2 4/5 arm: socfpga: imply/default common config options
Hi,
Quoted 4 lines · Masahiro Yamada
Hi Simon,
Sorry, I completely missed this thread.
No problem, this is not a too pressing issue, yet, since it's for the next merge window :-)
Quoted 245 lines
Quoted 102 lines · Simon Goldschmidt
Hi Mrek,
Am 15.03.2019 um 21:34 schrieb Simon Goldschmidt:
Quoted 98 lines
Am 05.03.2019 um 21:58 schrieb Marek Vasut:
Quoted 97 lines · Simon Goldschmidt
Quoted 96 lines
Am 04.03.2019 um 22:34 schrieb Marek Vasut:
Quoted 95 lines · Simon Goldschmidt
Quoted 94 lines
Marek Vasut <marex at denx.de <mailto:[email protected]>> schrieb am Mo., 4. März 2019, 22:19:
On 3/4/19 9:53 PM, Simon Goldschmidt wrote:
> This commit moves common config options used in all socfpga
boards
> to select/imply inKconfig. This both cleans up the defconfig
files
> as well as makes future changes easier.
>
> Options implied/defaulted for all sub-arches:
> - SPL,SPL_DM,USE_TINY_PRINTF,NR_DRAM_BANKS
>
> Options implied/defaulted for implied for A10 & gen5:
> -FPGA_SOCFPGA,SYS_MALLOC_F_LEN,SYS_TEXT_BASE
>
> Options implied/defaulted for A10:
> -SPL_SYS_MALLOC_F_LEN
>
> Options implied/defaulted for gen5:
> -SPL_STACK_R,SPL_SYS_MALLOC_SIMPLE,SPL_STACK_R_ADDR>
> Signed-off-by: Simon Goldschmidt <[email protected] <mailto:[email protected]>>
> ---
>
> Changes in v2:
> - added patch to imply/default common config options >
>arch/arm/Kconfig| 3 +++
>arch/arm/mach-socfpga/Kconfig| 21
+++++++++++++++++++++> configs/socfpga_arria10_defconfig | 8 -------- > configs/socfpga_arria5_defconfig | 10 ---------- > configs/socfpga_cyclone5_defconfig | 10 ---------- > configs/socfpga_dbm_soc1_defconfig | 10 ---------- > configs/socfpga_de0_nano_soc_defconfig | 10 ---------- > configs/socfpga_de10_nano_defconfig | 10 ---------- > configs/socfpga_de1_soc_defconfig | 10 ---------- > configs/socfpga_is1_defconfig | 8 -------- > configs/socfpga_sockit_defconfig | 10 ---------- > configs/socfpga_socrates_defconfig | 10 ---------- > configs/socfpga_sr1500_defconfig | 10 ---------- > configs/socfpga_stratix10_defconfig | 4 ---- > configs/socfpga_vining_fpga_defconfig | 10 ----------> 15 files changed, 24 insertions(+), 120 deletions(-) >
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > indexded7c11a4c..71bb14acce100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -839,12 +839,15 @@ configARCH_SOCFPGA
> implyDM_SPI
> implyDM_SPI_FLASH
> implyFAT_WRITE
> + imply SPL
> + implySPL_DM
> implySPL_LIBDISK_SUPPORT
> implySPL_MMC_SUPPORT
> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
> implySYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
> implySPL_SPI_FLASH_SUPPORT
> implySPL_SPI_SUPPORT
> + implyUSE_TINY_PRINTF
>
> configARCH_SUNXI
> bool "Support sunxi (Allwinner) SoCs"
> diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
> index5e87371f8c..da801eb660100644
> --- a/arch/arm/mach-socfpga/Kconfig
> +++ b/arch/arm/mach-socfpga/Kconfig
> @@ -1,8 +1,25 @@
> ifARCH_SOCFPGA
>
> +configNR_DRAM_BANKS
> + default 1
> +
> +configSPL_STACK_R_ADDR
> + default0x00800000ifTARGET_SOCFPGA_GEN5
> +
> +configSPL_SYS_MALLOC_F_LEN
> + default0x10000ifTARGET_SOCFPGA_ARRIA10
> +This is already defined in /Kconfig, won't you end up with duplicate/redefined symbols this way ?
I did not get errors. I copied the handling
fromSYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPEin the same file. Plus it seems like it's done like this in otherKconfigfiles, too.This is correct in terms of
Kconfiggrammar.
You can define the same symbol multiple times.For example,
if
ARCH_SOCFPGAconfig FOO
default 100endif
config FOO
int "foo"
default 10... is equivalent to
config FOO
default 100 ifARCH_SOCFPGA
int "foo"
default 10You can exploit this trick.
However, I see one problem
when we sync defconfig files globally
withtools/moveconfig.pysavedefconfig sorts CONFIG options in the order
they are parsed.Every time people add/remove entry to/from their
arch/arm/mach-*/Kconfigor board/*/Kconfig, the location where the symbol first appears changes.That's is why symbols go up and down for every resync. For example, see commit
fca0128da4803Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
I know it is done. I am not convinced it's right.
Would it be better acceptable if I moved the defaults to the
Kconfigfiles where these settings are defined? I always thought it to be strange to clutter those with arch-specific settings,I agree. We are screwed up with:
config
SYS_MMCSD_RAW_MODE_U_BOOT_SECTORhex "Address on the MMC to load U-Boot from" depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR default 0x50 if ARCH_SUNXI default 0x75 if ARCH_DAVINCI default 0x8a if ARCH_MX6 || ARCH_MX7 default 0x100 if ARCH_UNIPHIER default 0x140 if ARCH_MVEBU default 0x200 if ARCH_SOCFPGA || ARCH_AT91 default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \ OMAP54XX || AM33XX || AM43XX || ARCH_K3 default 0x4000 if ARCH_ROCKCHIPWhen I introduced
Kconfigto U-Boot,
I did not mean to move CONFIG options verbatim
from include/config/<board>.h toKconfigfiles.I expected old clutter things would be replaced with something cool. But, it did not happen.
We are just moving CONFIG options toKconfigas they are.In old days, people added
CONFIG_prefix to anything, most of which are not configuration at all.For example,
CONFIG_BOOTARGSin configs/axm_defconfig is an extremely crazy case.Probably, you want to see a solution instead of
my complaint.Let's use barebox (Bummer!)
But, hold on.
Barebox had already solved problems U-Boot is suffering from.
If you are annoyed by duplicated defconfigs,
Barebox supports multiple boards mechanism.
So just a single 'socfpga_defconfig' generates multiple board images.The image is still small by exploiting dead code elimination.
$ make ARCH=arm socfpga_defconfig $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-will produce
SHIPPED images/barebox-socfpga-de0_nano_soc.img
SHIPPED images/barebox-socfpga-sockit.img
SHIPPED images/barebox-socfpga-socrates.img
images built:
barebox-socfpga-de0_nano_soc.img
barebox-socfpga-sockit.img
barebox-socfpga-socrates.imgI do not think we should change U-Boot in the same way, though. Probably, it is too late for U-Boot, and people who like cleaner code base can switch to barebox.
Anyway.
Let's go back to U-Boot topic.For the duplicated defconfig issue,
recently we discussed here:
Quoted 7 lines
I do not know super-cool solution for U-Boot.
At the cost of increased memory footprint, some defconfig could be merged, if Marek likes it.
(U-Boot needs to link boot code for all boards into a single SPL. That's the difference from Barebox.)
Ok, thanks for this information! I do think things could be imrpoved. I monitored the thread you references at the start but somehow got lost in between... However, I do not have any input right now as to how to improve the things mentioned in that thread.
Marek, being like that, I'll continue with v3 in the same way as v2, meaning the config items are duplicated in our mach's Kconfig. I think this is better than cluttering central Kconfig files with our defaults. I guess I'll append a patch that re-syncs the defconfigs if they change at all...
Regards,
Simon
Quoted 50 lines
Thanks.
Masahiro YamadaQuoted 28 lines
but I don't really
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
have a strong preference...
I agree with you on this. I'd really like some reply from Yamada-san.
So without a reply from Yamada-san for 10 days, how do we continue here?
Gentle ping?
Quoted 2 lines
In the next version (v3), Patch 2/5 should be fixed for a10.
In v3, I'd remove patch 2/5 since it is already covered by a different series that properly cleans up using full malloc only in SPL [2] and I'll make this series depend on v3 of that:
[2] https://patchwork.ozlabs.org/project/uboot/list/?series=97430
Regards,
SimonQuoted 7 lines
I'd also extend that next version with further cleanup patches from an earlier series [1] since I have I2C EEPROM finally running with DM (tested on the
socfpga_socratesboard by using the "Phy1" daughter board and a matching FPGA configuration).[1] https://patchwork.ozlabs.org/project/uboot/list/?series=85229
Quoted 8 lines
Quoted 3 lines
Regards,
Simon_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot--
Best Regards
Masahiro Yamada
PATCH v2 5/5 arm: socfpga: gen5: reduce SPL pre-reloc malloc
In reply to Simon GoldschmidtBy enabling debug prints in malloc_simple, we can see that SPL for socfpga gen5 does by far not need the 8 KiB malloc pool currently allocated for SPL in pre-reloc phase.
On socfpga_socrates, 1304 bytes are currently used (and this increases by ~200 bytes only for the sdram/reset fixes in socfpga-next).
To prevent wasting precious SRAM space, let's reduce the initial heap used for SPL to 2 KiB. This is still some hundred bytes more than currently used. Also, the gen5 SPL enables stack and heap in DDR memory pretty early. Only the initial uclass/dm parsing, serial console and DDR initialization is done in the initial heap, so these 2 KiB should be enough for all boards.
---
Changes in v2:
- added patch to reduce gen5 SPL initial malloc pool to 2 KiB
arch/arm/mach-socfpga/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-socfpga/Kconfig +1 -0
@@ -8,6 +8,7 @@ config SPL_STACK_R_ADDR config SPL_SYS_MALLOC_F_LEN default 0x10000 if TARGET_SOCFPGA_ARRIA10 + default 0x800 if TARGET_SOCFPGA_GEN5 config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE default 0xa2
Signature · 1 line
2.17.1