[PATCH] xilinx: Introduce MINI configuration

Heinrich Schuchardt xypron.glpk at gmx.de
Sat Nov 16 08:15:33 CET 2024


Am 15. November 2024 14:36:32 MEZ schrieb Michal Simek <michal.simek at amd.com>:
>There is no common symbol which mini configurations are using and recent
>get_mem_top() changes adding 1.3kB without having a way to remove it.
>That's why introduce new symbol which can be used for removing features
>which are not requested by these configurations.
>
>Signed-off-by: Michal Simek <michal.simek at amd.com>
>---
>
>Based on:
>https://lore.kernel.org/r/20241025172724.195093-3-sughosh.ganu@linaro.org
>---
> board/xilinx/Kconfig                             | 9 +++++++++
> board/xilinx/common/board.c                      | 4 ++++
> configs/amd_versal2_mini_defconfig               | 1 +
> configs/amd_versal2_mini_emmc_defconfig          | 1 +
> configs/amd_versal2_mini_ospi_defconfig          | 1 +
> configs/amd_versal2_mini_qspi_defconfig          | 1 +
> configs/xilinx_versal_mini_defconfig             | 1 +
> configs/xilinx_versal_mini_emmc0_defconfig       | 1 +
> configs/xilinx_versal_mini_emmc1_defconfig       | 1 +
> configs/xilinx_versal_mini_ospi_defconfig        | 1 +
> configs/xilinx_versal_mini_qspi_defconfig        | 1 +
> configs/xilinx_versal_net_mini_defconfig         | 1 +
> configs/xilinx_versal_net_mini_emmc_defconfig    | 1 +
> configs/xilinx_versal_net_mini_ospi_defconfig    | 1 +
> configs/xilinx_versal_net_mini_qspi_defconfig    | 1 +
> configs/xilinx_zynqmp_mini_defconfig             | 1 +
> configs/xilinx_zynqmp_mini_emmc0_defconfig       | 1 +
> configs/xilinx_zynqmp_mini_emmc1_defconfig       | 1 +
> configs/xilinx_zynqmp_mini_nand_defconfig        | 1 +
> configs/xilinx_zynqmp_mini_nand_single_defconfig | 1 +
> configs/xilinx_zynqmp_mini_qspi_defconfig        | 1 +
> 21 files changed, 32 insertions(+)
>
>diff --git a/board/xilinx/Kconfig b/board/xilinx/Kconfig
>index 0ff8440e6e06..a7da97dbae8c 100644
>--- a/board/xilinx/Kconfig
>+++ b/board/xilinx/Kconfig
>@@ -40,6 +40,15 @@ config XILINX_PS_INIT_FILE
> 
> endif
> 
>+config MINI

Should this be called XILINX_MINI, as it is Xilinx specific?

Best regards

Heinrich


>+	bool "Mini configuration"
>+	depends on ARCH_ZYNQMP || ARCH_VERSAL || ARCH_VERSAL_NET || ARCH_VERSAL2
>+	help
>+	  This option disables features which are not needed for Mini U-Boot
>+	  configurations. Mini U-Boot is running in EL3 mostly on size contrained
>+	  systems. It's purpose is to program non volatile memories or running
>+	  initial memory tests.
>+
> config XILINX_OF_BOARD_DTB_ADDR
> 	hex "Default DTB pickup address"
> 	default 0x1000 if ARCH_VERSAL || ARCH_VERSAL_NET || ARCH_VERSAL2
>diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
>index e14ed2cff00a..9b90ce5998b9 100644
>--- a/board/xilinx/common/board.c
>+++ b/board/xilinx/common/board.c
>@@ -678,6 +678,8 @@ int ft_board_setup(void *blob, struct bd_info *bd)
> }
> #endif
> 
>+#ifndef CONFIG_MINI
>+
> #ifndef MMU_SECTION_SIZE
> #define MMU_SECTION_SIZE        (1 * 1024 * 1024)
> #endif
>@@ -701,3 +703,5 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
> 
> 	return reg + size;
> }
>+
>+#endif
>diff --git a/configs/amd_versal2_mini_defconfig b/configs/amd_versal2_mini_defconfig
>index ea22541bfbaf..3bcdc53771b2 100644
>--- a/configs/amd_versal2_mini_defconfig
>+++ b/configs/amd_versal2_mini_defconfig
>@@ -15,6 +15,7 @@ CONFIG_DEFAULT_DEVICE_TREE="amd-versal2-mini"
> CONFIG_SYS_LOAD_ADDR=0xBBF80000
> CONFIG_DEBUG_UART_BASE=0xf1920000
> CONFIG_DEBUG_UART_CLOCK=100000000
>+CONFIG_MINI=y
> CONFIG_SYS_MEM_RSVD_FOR_MMU=y
> # CONFIG_PSCI_RESET is not set
> CONFIG_DEBUG_UART=y
>diff --git a/configs/amd_versal2_mini_emmc_defconfig b/configs/amd_versal2_mini_emmc_defconfig
>index 6d4b261606f1..17b26080ebf5 100644
>--- a/configs/amd_versal2_mini_emmc_defconfig
>+++ b/configs/amd_versal2_mini_emmc_defconfig
>@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="amd-versal2-mini"
> CONFIG_SYS_LOAD_ADDR=0x8000000
> CONFIG_DEBUG_UART_BASE=0xf1920000
> CONFIG_DEBUG_UART_CLOCK=100000000
>+CONFIG_MINI=y
> # CONFIG_PSCI_RESET is not set
> CONFIG_DEBUG_UART=y
> # CONFIG_EXPERT is not set
>diff --git a/configs/amd_versal2_mini_ospi_defconfig b/configs/amd_versal2_mini_ospi_defconfig
>index 71bd66778380..a3aab8519407 100644
>--- a/configs/amd_versal2_mini_ospi_defconfig
>+++ b/configs/amd_versal2_mini_ospi_defconfig
>@@ -15,6 +15,7 @@ CONFIG_DEFAULT_DEVICE_TREE="amd-versal2-mini"
> CONFIG_SYS_LOAD_ADDR=0xBBF80000
> CONFIG_DEBUG_UART_BASE=0xf1920000
> CONFIG_DEBUG_UART_CLOCK=100000000
>+CONFIG_MINI=y
> CONFIG_SYS_MEM_RSVD_FOR_MMU=y
> # CONFIG_PSCI_RESET is not set
> CONFIG_DEBUG_UART=y
>diff --git a/configs/amd_versal2_mini_qspi_defconfig b/configs/amd_versal2_mini_qspi_defconfig
>index ee87d452e428..972290d95a2a 100644
>--- a/configs/amd_versal2_mini_qspi_defconfig
>+++ b/configs/amd_versal2_mini_qspi_defconfig
>@@ -15,6 +15,7 @@ CONFIG_DEFAULT_DEVICE_TREE="amd-versal2-mini"
> CONFIG_SYS_LOAD_ADDR=0xBBF80000
> CONFIG_DEBUG_UART_BASE=0xf1920000
> CONFIG_DEBUG_UART_CLOCK=100000000
>+CONFIG_MINI=y
> CONFIG_SYS_MEM_RSVD_FOR_MMU=y
> # CONFIG_PSCI_RESET is not set
> CONFIG_DEBUG_UART=y
>diff --git a/configs/xilinx_versal_mini_defconfig b/configs/xilinx_versal_mini_defconfig
>index 7388a7873861..0c85eb8c3e4e 100644
>--- a/configs/xilinx_versal_mini_defconfig
>+++ b/configs/xilinx_versal_mini_defconfig
>@@ -12,6 +12,7 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xfffe0000
> CONFIG_ENV_SIZE=0x80
> CONFIG_DEFAULT_DEVICE_TREE="versal-mini"
> CONFIG_SYS_LOAD_ADDR=0x8000000
>+CONFIG_MINI=y
> CONFIG_SYS_MEM_RSVD_FOR_MMU=y
> # CONFIG_PSCI_RESET is not set
> CONFIG_SYS_MEMTEST_START=0x00000000
>diff --git a/configs/xilinx_versal_mini_emmc0_defconfig b/configs/xilinx_versal_mini_emmc0_defconfig
>index a36e40dfbb31..20cccbcb4db1 100644
>--- a/configs/xilinx_versal_mini_emmc0_defconfig
>+++ b/configs/xilinx_versal_mini_emmc0_defconfig
>@@ -12,6 +12,7 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x10000
> CONFIG_ENV_SIZE=0x80
> CONFIG_DEFAULT_DEVICE_TREE="versal-mini-emmc0"
> CONFIG_SYS_LOAD_ADDR=0x8000000
>+CONFIG_MINI=y
> # CONFIG_PSCI_RESET is not set
> # CONFIG_EXPERT is not set
> CONFIG_REMAKE_ELF=y
>diff --git a/configs/xilinx_versal_mini_emmc1_defconfig b/configs/xilinx_versal_mini_emmc1_defconfig
>index 3ae2115212aa..af26aab92e30 100644
>--- a/configs/xilinx_versal_mini_emmc1_defconfig
>+++ b/configs/xilinx_versal_mini_emmc1_defconfig
>@@ -12,6 +12,7 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x10000
> CONFIG_ENV_SIZE=0x80
> CONFIG_DEFAULT_DEVICE_TREE="versal-mini-emmc1"
> CONFIG_SYS_LOAD_ADDR=0x8000000
>+CONFIG_MINI=y
> # CONFIG_PSCI_RESET is not set
> # CONFIG_EXPERT is not set
> CONFIG_REMAKE_ELF=y
>diff --git a/configs/xilinx_versal_mini_ospi_defconfig b/configs/xilinx_versal_mini_ospi_defconfig
>index d0ea2b6aebd9..a4c884e0e3d5 100644
>--- a/configs/xilinx_versal_mini_ospi_defconfig
>+++ b/configs/xilinx_versal_mini_ospi_defconfig
>@@ -13,6 +13,7 @@ CONFIG_ENV_SIZE=0x80
> # CONFIG_DM_GPIO is not set
> CONFIG_DEFAULT_DEVICE_TREE="versal-mini-ospi-single"
> CONFIG_SYS_LOAD_ADDR=0x8000000
>+CONFIG_MINI=y
> CONFIG_SYS_MEM_RSVD_FOR_MMU=y
> CONFIG_VERSAL_NO_DDR=y
> # CONFIG_PSCI_RESET is not set
>diff --git a/configs/xilinx_versal_mini_qspi_defconfig b/configs/xilinx_versal_mini_qspi_defconfig
>index ef6eec075d06..a5a992ded99a 100644
>--- a/configs/xilinx_versal_mini_qspi_defconfig
>+++ b/configs/xilinx_versal_mini_qspi_defconfig
>@@ -11,6 +11,7 @@ CONFIG_SF_DEFAULT_SPEED=30000000
> CONFIG_ENV_SIZE=0x80
> CONFIG_DEFAULT_DEVICE_TREE="versal-mini-qspi-single"
> CONFIG_SYS_LOAD_ADDR=0x8000000
>+CONFIG_MINI=y
> CONFIG_SYS_MEM_RSVD_FOR_MMU=y
> CONFIG_VERSAL_NO_DDR=y
> # CONFIG_PSCI_RESET is not set
>diff --git a/configs/xilinx_versal_net_mini_defconfig b/configs/xilinx_versal_net_mini_defconfig
>index 1640dfaff9ed..6251420aa1d5 100644
>--- a/configs/xilinx_versal_net_mini_defconfig
>+++ b/configs/xilinx_versal_net_mini_defconfig
>@@ -14,6 +14,7 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xBBF10000
> CONFIG_ENV_SIZE=0x80
> CONFIG_DEFAULT_DEVICE_TREE="versal-net-mini"
> CONFIG_SYS_LOAD_ADDR=0xBBF00000
>+CONFIG_MINI=y
> CONFIG_SYS_MEM_RSVD_FOR_MMU=y
> # CONFIG_PSCI_RESET is not set
> CONFIG_SYS_MEMTEST_START=0x00000000
>diff --git a/configs/xilinx_versal_net_mini_emmc_defconfig b/configs/xilinx_versal_net_mini_emmc_defconfig
>index 4c6159a4df17..869ac9723293 100644
>--- a/configs/xilinx_versal_net_mini_emmc_defconfig
>+++ b/configs/xilinx_versal_net_mini_emmc_defconfig
>@@ -10,6 +10,7 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x10000
> CONFIG_ENV_SIZE=0x80
> CONFIG_DEFAULT_DEVICE_TREE="versal-net-mini-emmc"
> CONFIG_SYS_LOAD_ADDR=0x8000000
>+CONFIG_MINI=y
> # CONFIG_PSCI_RESET is not set
> # CONFIG_EXPERT is not set
> CONFIG_REMAKE_ELF=y
>diff --git a/configs/xilinx_versal_net_mini_ospi_defconfig b/configs/xilinx_versal_net_mini_ospi_defconfig
>index 071eeb8197b8..9f1509f5e3d5 100644
>--- a/configs/xilinx_versal_net_mini_ospi_defconfig
>+++ b/configs/xilinx_versal_net_mini_ospi_defconfig
>@@ -13,6 +13,7 @@ CONFIG_ENV_SIZE=0x80
> # CONFIG_DM_GPIO is not set
> CONFIG_DEFAULT_DEVICE_TREE="versal-net-mini-ospi-single"
> CONFIG_SYS_LOAD_ADDR=0xBBF80000
>+CONFIG_MINI=y
> CONFIG_SYS_MEM_RSVD_FOR_MMU=y
> # CONFIG_PSCI_RESET is not set
> CONFIG_LTO=y
>diff --git a/configs/xilinx_versal_net_mini_qspi_defconfig b/configs/xilinx_versal_net_mini_qspi_defconfig
>index 227c45df28c3..c0e5423a22fd 100644
>--- a/configs/xilinx_versal_net_mini_qspi_defconfig
>+++ b/configs/xilinx_versal_net_mini_qspi_defconfig
>@@ -11,6 +11,7 @@ CONFIG_SF_DEFAULT_SPEED=30000000
> CONFIG_ENV_SIZE=0x80
> CONFIG_DEFAULT_DEVICE_TREE="versal-net-mini-qspi-single"
> CONFIG_SYS_LOAD_ADDR=0xBBF80000
>+CONFIG_MINI=y
> CONFIG_SYS_MEM_RSVD_FOR_MMU=y
> # CONFIG_PSCI_RESET is not set
> CONFIG_LTO=y
>diff --git a/configs/xilinx_zynqmp_mini_defconfig b/configs/xilinx_zynqmp_mini_defconfig
>index 7aab69c9e46b..6942a145125c 100644
>--- a/configs/xilinx_zynqmp_mini_defconfig
>+++ b/configs/xilinx_zynqmp_mini_defconfig
>@@ -9,6 +9,7 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xfffe0000
> CONFIG_ENV_SIZE=0x80
> CONFIG_DEFAULT_DEVICE_TREE="zynqmp-mini"
> CONFIG_SYS_LOAD_ADDR=0x8000000
>+CONFIG_MINI=y
> CONFIG_SYS_MEM_RSVD_FOR_MMU=y
> CONFIG_SYS_MEMTEST_START=0x00000000
> CONFIG_SYS_MEMTEST_END=0x00001000
>diff --git a/configs/xilinx_zynqmp_mini_emmc0_defconfig b/configs/xilinx_zynqmp_mini_emmc0_defconfig
>index c56b1e830d67..eb44bde29088 100644
>--- a/configs/xilinx_zynqmp_mini_emmc0_defconfig
>+++ b/configs/xilinx_zynqmp_mini_emmc0_defconfig
>@@ -15,6 +15,7 @@ CONFIG_SPL_SYS_MALLOC_F_LEN=0x600
> CONFIG_SPL_BSS_MAX_SIZE=0x80000
> CONFIG_SYS_LOAD_ADDR=0x8000000
> CONFIG_SPL=y
>+CONFIG_MINI=y
> CONFIG_REMAKE_ELF=y
> # CONFIG_MP is not set
> # CONFIG_EFI_LOADER is not set
>diff --git a/configs/xilinx_zynqmp_mini_emmc1_defconfig b/configs/xilinx_zynqmp_mini_emmc1_defconfig
>index a8dbf0056da3..4ebc3a4e1361 100644
>--- a/configs/xilinx_zynqmp_mini_emmc1_defconfig
>+++ b/configs/xilinx_zynqmp_mini_emmc1_defconfig
>@@ -15,6 +15,7 @@ CONFIG_SPL_SYS_MALLOC_F_LEN=0x600
> CONFIG_SPL_BSS_MAX_SIZE=0x80000
> CONFIG_SYS_LOAD_ADDR=0x8000000
> CONFIG_SPL=y
>+CONFIG_MINI=y
> CONFIG_REMAKE_ELF=y
> # CONFIG_MP is not set
> # CONFIG_EFI_LOADER is not set
>diff --git a/configs/xilinx_zynqmp_mini_nand_defconfig b/configs/xilinx_zynqmp_mini_nand_defconfig
>index ba8f02c5b11d..ab446a201105 100644
>--- a/configs/xilinx_zynqmp_mini_nand_defconfig
>+++ b/configs/xilinx_zynqmp_mini_nand_defconfig
>@@ -10,6 +10,7 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x40000
> CONFIG_ENV_SIZE=0x80
> CONFIG_DEFAULT_DEVICE_TREE="zynqmp-mini-nand"
> CONFIG_SYS_LOAD_ADDR=0x8000000
>+CONFIG_MINI=y
> CONFIG_REMAKE_ELF=y
> # CONFIG_MP is not set
> # CONFIG_EFI_LOADER is not set
>diff --git a/configs/xilinx_zynqmp_mini_nand_single_defconfig b/configs/xilinx_zynqmp_mini_nand_single_defconfig
>index a8a0055f2e5b..c1919c577895 100644
>--- a/configs/xilinx_zynqmp_mini_nand_single_defconfig
>+++ b/configs/xilinx_zynqmp_mini_nand_single_defconfig
>@@ -10,6 +10,7 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x40000
> CONFIG_ENV_SIZE=0x80
> CONFIG_DEFAULT_DEVICE_TREE="zynqmp-mini-nand"
> CONFIG_SYS_LOAD_ADDR=0x8000000
>+CONFIG_MINI=y
> CONFIG_REMAKE_ELF=y
> # CONFIG_MP is not set
> # CONFIG_EFI_LOADER is not set
>diff --git a/configs/xilinx_zynqmp_mini_qspi_defconfig b/configs/xilinx_zynqmp_mini_qspi_defconfig
>index c08b10c6944f..17b527b0189e 100644
>--- a/configs/xilinx_zynqmp_mini_qspi_defconfig
>+++ b/configs/xilinx_zynqmp_mini_qspi_defconfig
>@@ -15,6 +15,7 @@ CONFIG_SYS_LOAD_ADDR=0x8000000
> CONFIG_SPL=y
> # CONFIG_SPL_FS_FAT is not set
> # CONFIG_SPL_LIBDISK_SUPPORT is not set
>+CONFIG_MINI=y
> CONFIG_SYS_MEM_RSVD_FOR_MMU=y
> CONFIG_ZYNQMP_NO_DDR=y
> # CONFIG_PSCI_RESET is not set



More information about the U-Boot mailing list