From 7f2d57a29710d4bbef3e4c9febd3dbbfa21cca3e Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 7 Jan 2021 14:05:23 +0100 Subject: [PATCH 1/6] arm64: zynqmp: Enable seps and related video configs Enable this driver to get build and probe for our platform. Signed-off-by: Michal Simek Acked-by: Ashok Reddy Soma --- configs/xilinx_zynqmp_virt_defconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/xilinx_zynqmp_virt_defconfig index e400cd4702..0bf4b7d692 100644 --- a/configs/xilinx_zynqmp_virt_defconfig +++ b/configs/xilinx_zynqmp_virt_defconfig @@ -54,6 +54,7 @@ CONFIG_CMD_SPI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_CMD_TFTPPUT=y +CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_TIMER=y @@ -155,6 +156,15 @@ CONFIG_USB_ETHER=y CONFIG_USB_ETH_CDC=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y +CONFIG_DM_VIDEO=y +CONFIG_VIDEO_COPY=y +CONFIG_DISPLAY=y +CONFIG_VIDEO_SEPS525=y +CONFIG_LCD=y +CONFIG_SPLASH_SCREEN=y +CONFIG_BMP_16BPP=y +CONFIG_BMP_24BPP=y +CONFIG_BMP_32BPP=y CONFIG_WDT=y CONFIG_WDT_CDNS=y CONFIG_PANIC_HANG=y From b2e35a6f1205bcb9087b0db4e2d815d78fac619e Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Tue, 5 Jan 2021 14:27:45 +0100 Subject: [PATCH 2/6] mmc: xenon_sdhci: Remove duplicated macros There is no need to define the same macros in drivers. All macros have been added by commit 17a42abb40dd ("mmc: Define timing macro's"). Signed-off-by: Michal Simek Reviewed-by: Jaehoon Chung --- drivers/mmc/xenon_sdhci.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c index b8e833e6a3..14fec4b8e7 100644 --- a/drivers/mmc/xenon_sdhci.c +++ b/drivers/mmc/xenon_sdhci.c @@ -104,18 +104,6 @@ DECLARE_GLOBAL_DATA_PTR; /* Hyperion only have one slot 0 */ #define XENON_MMC_SLOT_ID_HYPERION 0 -#define MMC_TIMING_LEGACY 0 -#define MMC_TIMING_MMC_HS 1 -#define MMC_TIMING_SD_HS 2 -#define MMC_TIMING_UHS_SDR12 3 -#define MMC_TIMING_UHS_SDR25 4 -#define MMC_TIMING_UHS_SDR50 5 -#define MMC_TIMING_UHS_SDR104 6 -#define MMC_TIMING_UHS_DDR50 7 -#define MMC_TIMING_MMC_DDR52 8 -#define MMC_TIMING_MMC_HS200 9 -#define MMC_TIMING_MMC_HS400 10 - #define XENON_MMC_MAX_CLK 400000000 #define XENON_MMC_3V3_UV 3300000 #define XENON_MMC_1V8_UV 1800000 From 2784befbd7ef21b77ad246ce258f06e4aa711d81 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 11 Jan 2021 13:46:58 +0100 Subject: [PATCH 3/6] xilinx: zynqmp: Save bootseq number for SD/EMMC boot modes For systems which has both sdhci controllers enable it is worth to export bootseq number for variables. Then the variable can be used in custom scripts to tune logic for OS. Signed-off-by: Michal Simek --- board/xilinx/zynqmp/zynqmp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 047b070485..459d9b1e47 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -648,6 +648,7 @@ int board_late_init(void) if (bootseq >= 0) { bootseq_len = snprintf(NULL, 0, "%i", bootseq); debug("Bootseq len: %x\n", bootseq_len); + env_set_hex("bootseq", bootseq); } /* From 506009fc1022d5b883e95502e1c5dc38ac1da127 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 4 Jan 2021 11:03:36 +0100 Subject: [PATCH 4/6] xilinx: common: Change macro handling in board_fdt_blob_setup() Remove ifdef logic which is handled by preprocessor and move it link time optimization to get full compile code coverage. Signed-off-by: Michal Simek --- board/xilinx/common/board.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index cdc06a39ce..9f651db734 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -324,25 +324,29 @@ void *board_fdt_blob_setup(void) { void *fdt_blob; -#if !defined(CONFIG_VERSAL_NO_DDR) && !defined(CONFIG_ZYNQMP_NO_DDR) - fdt_blob = (void *)CONFIG_XILINX_OF_BOARD_DTB_ADDR; + if (!IS_ENABLED(CONFIG_VERSAL_NO_DDR) && + !IS_ENABLED(CONFIG_VERSAL_NO_DDR)) { + fdt_blob = (void *)CONFIG_XILINX_OF_BOARD_DTB_ADDR; - if (fdt_magic(fdt_blob) == FDT_MAGIC) - return fdt_blob; + if (fdt_magic(fdt_blob) == FDT_MAGIC) + return fdt_blob; - debug("DTB is not passed via %p\n", fdt_blob); -#endif + debug("DTB is not passed via %p\n", fdt_blob); + } -#ifdef CONFIG_SPL_BUILD - /* FDT is at end of BSS unless it is in a different memory region */ - if (IS_ENABLED(CONFIG_SPL_SEPARATE_BSS)) - fdt_blob = (ulong *)&_image_binary_end; - else - fdt_blob = (ulong *)&__bss_end; -#else - /* FDT is at end of image */ - fdt_blob = (ulong *)&_end; -#endif + if (IS_ENABLED(CONFIG_SPL_BUILD)) { + /* + * FDT is at end of BSS unless it is in a different memory + * region + */ + if (IS_ENABLED(CONFIG_SPL_SEPARATE_BSS)) + fdt_blob = (ulong *)&_image_binary_end; + else + fdt_blob = (ulong *)&__bss_end; + } else { + /* FDT is at end of image */ + fdt_blob = (ulong *)&_end; + } if (fdt_magic(fdt_blob) == FDT_MAGIC) return fdt_blob; From a672b9871b57fa1f1e86faa33360a49e218b9c57 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 4 Jan 2021 11:07:28 +0100 Subject: [PATCH 5/6] xilinx: common: Do not touch CONFIG_XILINX_OF_BOARD_DTB_ADDR in SPL This hook is used in full U-Boot that's why there is no reason to touch this location from SPL. The hook was introduced for QEMU usage but none is really running SPL on QEMU that's why it shouldn't break any usecase. Signed-off-by: Michal Simek --- board/xilinx/common/board.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 9f651db734..df19aeadd0 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -324,7 +324,8 @@ void *board_fdt_blob_setup(void) { void *fdt_blob; - if (!IS_ENABLED(CONFIG_VERSAL_NO_DDR) && + if (!IS_ENABLED(CONFIG_SPL_BUILD) && + !IS_ENABLED(CONFIG_VERSAL_NO_DDR) && !IS_ENABLED(CONFIG_VERSAL_NO_DDR)) { fdt_blob = (void *)CONFIG_XILINX_OF_BOARD_DTB_ADDR; From 4e3fc5efeb70857ef2f9a2afd0a587c032c9a07b Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 13 Jan 2021 10:25:50 +0100 Subject: [PATCH 6/6] env: Remove all dependencies for SYS_REDUNDAND_ENVIRONMENT CONFIG_SYS_REDUNDAND_ENVIRONMENT is changing in env_internal.h how u-boot works with variables. struct environment_s has one byte flags property which also affects ENV_SIZE macro. I have reached the case where CONFIG_ENV_IS_NOWHERE is default setup but custom scripts can be designed in a way that u-boot is asked to import/export variables from/to file which can be in certain format. That's why also for this configuration make sense to enable CONFIG_SYS_REDUNDAND_ENVIRONMENT because it depends on environment file format. The patch is removing dependency on this configuration to support selecting environment file format without any specific dependency where variables are stored. Signed-off-by: Michal Simek Reviewed-by: Tom Rini --- env/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/env/Kconfig b/env/Kconfig index 67ce93061b..b473d7cfe1 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -411,13 +411,14 @@ config ENV_IS_IN_UBI config SYS_REDUNDAND_ENVIRONMENT bool "Enable redundant environment support" - depends on ENV_IS_IN_EEPROM || ENV_IS_IN_FLASH || ENV_IS_IN_MMC || \ - ENV_IS_IN_NAND || ENV_IS_IN_SPI_FLASH || ENV_IS_IN_UBI help Normally, the environemt is stored in a single location. By selecting this option, you can then define where to hold a redundant copy of the environment data, so that there is a valid backup copy in case there is a power failure during a "saveenv" operation. + Also this config changes the binary environment structure handling + which is used by env import/export commands which are independent of + storing variables to redundant location on a non volatile device. config ENV_FAT_INTERFACE string "Name of the block device for the environment"