turris_1x: Normalize Kconfig usage
PATCH 1/1 turris_1x: Normalize Kconfig usage
We don't set many options in the board Kconfig entry file but instead use defconfigs, select in some cases on the target itself, or update the "default" options of the main entries when needed. In this case we can remove most of the board Kconfig entries and just add them to the defconfig like other platforms.
---
I'd be open to someone else taking this patch and doing a v2 that has one of the defconfig's #include the other and then make the required changes (see other defconfigs which use #include for the constraints however) as an alternative.
--- arch/powerpc/cpu/mpc85xx/Kconfig | 4 + board/CZ.NIC/turris_1x/Kconfig | 139 ----------------------------- configs/turris_1x_nor_defconfig | 35 ++++++++ configs/turris_1x_sdcard_defconfig | 47 ++++++++++ 4 files changed, 86 insertions(+), 139 deletions(-)
arch/powerpc/cpu/mpc85xx/Kconfig +4 -0
@@ -177,6 +177,10 @@ config TARGET_TURRIS_1X bool "Support Turris 1.x" select SUPPORT_SPL select ARCH_P2020 + select BOARD_EARLY_INIT_F + select BOARD_EARLY_INIT_R + select LAST_STAGE_INIT + select OF_BOARD_SETUP select SYS_L2_SIZE_512KB config TARGET_P2041RDB
board/CZ.NIC/turris_1x/Kconfig +0 -139
143 lines not on this page · raw message
configs/turris_1x_nor_defconfig +35 -0
@@ -1,7 +1,12 @@ CONFIG_PPC=y CONFIG_TEXT_BASE=0xeff40000 CONFIG_SYS_MALLOC_F_LEN=0x1000 +CONFIG_NR_DRAM_BANKS=5 +CONFIG_ENV_SIZE=0x2000 +CONFIG_ENV_SECT_SIZE=0x20000 CONFIG_SYS_MONITOR_LEN=786432 +CONFIG_SYS_LOAD_ADDR=0x1000000 +CONFIG_ENV_ADDR=0xeff20000 CONFIG_MPC85xx=y CONFIG_SYS_INIT_RAM_LOCK=y # CONFIG_CMD_ERRATA is not set
@@ -10,6 +15,7 @@ CONFIG_MPC85XX_HAVE_RESET_VECTOR=y CONFIG_L2_CACHE=y CONFIG_ENABLE_36BIT_PHYS=y CONFIG_AHCI=y +CONFIG_OF_BOARD_FIXUP=y CONFIG_PCIE1=y CONFIG_PCIE2=y CONFIG_PCIE3=y
@@ -25,6 +31,7 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="run distro_bootcmd" CONFIG_USE_PREBOOT=y +CONFIG_PCI_INIT_R=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y # CONFIG_CMD_EEPROM is not set
@@ -50,6 +57,9 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_FS_UUID=y CONFIG_OF_CONTROL=y CONFIG_OF_INITIAL_DTB_READONLY=y +CONFIG_ENV_OVERWRITE=y +CONFIG_ENV_IS_IN_FLASH=y +CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_ETHPRIME=y CONFIG_ETHPRIME="eth2" # CONFIG_DM_DEVICE_REMOVE is not set
@@ -57,6 +67,7 @@ CONFIG_SCSI_AHCI=y CONFIG_AHCI_PCI=y CONFIG_LBA48=y CONFIG_SYS_64BIT_LBA=y +CONFIG_DDR_CLK_FREQ=66666666 CONFIG_CHIP_SELECTS_PER_CTRL=2 CONFIG_SYS_BR0_PRELIM_BOOL=y CONFIG_SYS_BR0_PRELIM=0xef001001
@@ -67,21 +78,45 @@ CONFIG_SYS_OR1_PRELIM=0xfffc0796 CONFIG_SYS_BR3_PRELIM_BOOL=y CONFIG_SYS_BR3_PRELIM=0xffa00801 CONFIG_SYS_OR3_PRELIM=0xfffe09f7 +CONFIG_MPC8XXX_GPIO=y CONFIG_DM_I2C=y +CONFIG_I2C_SET_DEFAULT_BUS_NUM=y +CONFIG_SYS_I2C_FSL=y +CONFIG_MISC=y +CONFIG_ATSHA204A=y # CONFIG_MMC_HW_PARTITIONING is not set # CONFIG_MMC_VERBOSE is not set +CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_MTD=y +CONFIG_MTD_NOR_FLASH=y +CONFIG_CFI_FLASH=y +CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y CONFIG_SYS_FLASH_EMPTY_INFO=y +CONFIG_FLASH_CFI_MTD=y +CONFIG_SYS_FLASH_CFI=y CONFIG_SYS_FLASH_QUIET_TEST=y CONFIG_SYS_MAX_FLASH_SECT=128 +CONFIG_MTD_RAW_NAND=y +CONFIG_NAND_FSL_ELBC=y +CONFIG_NAND_FSL_ELBC_DT=y CONFIG_MTD_UBI=y +CONFIG_PHY_FIXED=y CONFIG_DM_MDIO=y +CONFIG_MII=y +CONFIG_TSEC_ENET=y CONFIG_NVME_PCI=y +CONFIG_PCIE_FSL=y CONFIG_SCSI=y CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_DM_SERIAL=y +CONFIG_SYS_NS16550=y CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PCI=y +CONFIG_USB_EHCI_FSL=y CONFIG_USB_STORAGE=y CONFIG_WDT=y +CONFIG_WDT_MAX6370=y +CONFIG_BCH=y # CONFIG_BINMAN_FDT is not set
configs/turris_1x_sdcard_defconfig +47 -0
107 lines not on this page · raw message
Signature · 1 line
2.34.1
Quoted 8 lines · Tom Rini
We don't set many options in the board
Kconfigentry file but instead use defconfigs, select in some cases on the target itself, or update the "default" options of the main entries when needed. In this case we can remove most of the boardKconfigentries and just add them to the defconfig like other platforms.[...]
Applied to u-boot/master, thanks!
Signature · 1 line
Tom