From: Tom Rini Date: Thu, 16 Sep 2021 14:29:40 +0000 (-0400) Subject: Merge tag 'v2021.10-rc4' into next X-Git-Tag: v2025.01-rc5-pxa1908~1694^2~20 X-Git-Url: http://git.dujemihanovic.xyz/img/static/html/index.html?a=commitdiff_plain;h=6674edaabfd271471608146806f5b6540bc76a1b;p=u-boot.git Merge tag 'v2021.10-rc4' into next Prepare v2021.10-rc4 Signed-off-by: Tom Rini # gpg: Signature made Tue 14 Sep 2021 06:58:32 PM EDT # gpg: using RSA key 1A3C7F70E08FAB1707809BBF147C39FF9634B72C # gpg: Good signature from "Thomas Rini " [ultimate] # Conflicts: # board/Arcturus/ucp1020/spl.c # cmd/mvebu/Kconfig # common/Kconfig.boot # common/image-fit.c # configs/UCP1020_defconfig # configs/sifive_unmatched_defconfig # drivers/pci/Kconfig # include/configs/UCP1020.h # include/configs/sifive-unmatched.h # lib/Makefile # scripts/config_whitelist.txt --- 6674edaabfd271471608146806f5b6540bc76a1b diff --cc cmd/mvebu/Kconfig index 4afe0bf32d,340fb3aff6..ac8b0afd20 --- a/cmd/mvebu/Kconfig +++ b/cmd/mvebu/Kconfig @@@ -3,6 -3,8 +3,7 @@@ depends on ARCH_MVEB config CMD_MVEBU_BUBT bool "bubt" - default n + select SHA256 if ARMADA_3700 help bubt - Burn a u-boot image to flash For details about bubt command please see the documentation diff --cc common/Makefile index f7852607a5,ae0430c35f..fb8173a5b8 --- a/common/Makefile +++ b/common/Makefile @@@ -66,10 -65,8 +65,8 @@@ ifdef CONFIG_SPL_BUIL ifdef CONFIG_SPL_DFU obj-$(CONFIG_DFU_OVER_USB) += dfu.o endif - obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o - obj-$(CONFIG_TPL_HASH_SUPPORT) += hash.o obj-$(CONFIG_SPL_LOAD_FIT) += common_fit.o -obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o +obj-$(CONFIG_SPL_NET) += miiphyutil.o obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o ifdef CONFIG_SPL_USB_HOST diff --cc common/image-fit.c index aa9c781462,f02d437539..5a0a0cc200 --- a/common/image-fit.c +++ b/common/image-fit.c @@@ -1215,63 -1211,21 +1215,47 @@@ int fit_set_timestamp(void *fit, int no * 0, on success * -1, when algo is unsupported */ - int calculate_hash(const void *data, int data_len, const char *algo, + int calculate_hash(const void *data, int data_len, const char *name, uint8_t *value, int *value_len) { +#if !defined(USE_HOSTCC) && defined(CONFIG_DM_HASH) + int rc; + enum HASH_ALGO hash_algo; + struct udevice *dev; + + rc = uclass_get_device(UCLASS_HASH, 0, &dev); + if (rc) { + debug("failed to get hash device, rc=%d\n", rc); + return -1; + } + + hash_algo = hash_algo_lookup_by_name(algo); + if (hash_algo == HASH_ALGO_INVALID) { + debug("Unsupported hash algorithm\n"); + return -1; + }; + + rc = hash_digest_wd(dev, hash_algo, data, data_len, value, CHUNKSZ); + if (rc) { + debug("failed to get hash value, rc=%d\n", rc); + return -1; + } + + *value_len = hash_algo_digest_size(hash_algo); +#else - if (IMAGE_ENABLE_CRC32 && strcmp(algo, "crc32") == 0) { - *((uint32_t *)value) = crc32_wd(0, data, data_len, - CHUNKSZ_CRC32); - *((uint32_t *)value) = cpu_to_uimage(*((uint32_t *)value)); - *value_len = 4; - } else if (CONFIG_IS_ENABLED(SHA1) && strcmp(algo, "sha1") == 0) { - sha1_csum_wd((unsigned char *)data, data_len, - (unsigned char *)value, CHUNKSZ_SHA1); - *value_len = 20; - } else if (CONFIG_IS_ENABLED(SHA256) && strcmp(algo, "sha256") == 0) { - sha256_csum_wd((unsigned char *)data, data_len, - (unsigned char *)value, CHUNKSZ_SHA256); - *value_len = SHA256_SUM_LEN; - } else if (CONFIG_IS_ENABLED(SHA384) && strcmp(algo, "sha384") == 0) { - sha384_csum_wd((unsigned char *)data, data_len, - (unsigned char *)value, CHUNKSZ_SHA384); - *value_len = SHA384_SUM_LEN; - } else if (CONFIG_IS_ENABLED(SHA512) && strcmp(algo, "sha512") == 0) { - sha512_csum_wd((unsigned char *)data, data_len, - (unsigned char *)value, CHUNKSZ_SHA512); - *value_len = SHA512_SUM_LEN; - } else if (IMAGE_ENABLE_MD5 && strcmp(algo, "md5") == 0) { - md5_wd((unsigned char *)data, data_len, value, CHUNKSZ_MD5); - *value_len = 16; - } else { + struct hash_algo *algo; + int ret; + + ret = hash_lookup_algo(name, &algo); + if (ret < 0) { debug("Unsupported hash alogrithm\n"); return -1; } + + algo->hash_func_ws(data, data_len, value, algo->chunk_size); + *value_len = algo->digest_size; +#endif + return 0; } diff --cc configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig index e63fd634fb,106f8ecad5..561a39044a --- a/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig +++ b/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig @@@ -41,11 -30,9 +41,9 @@@ CONFIG_ID_EEPROM= CONFIG_SPL_FSL_PBL=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xe8 - CONFIG_SPL_CRYPTO=y - CONFIG_SPL_HASH_SUPPORT=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_I2C=y -CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y +CONFIG_SPL_MPC8XXX_INIT_DDR=y CONFIG_SPL_WATCHDOG=y CONFIG_CMD_IMLS=y CONFIG_CMD_GREPENV=y diff --cc configs/ls1043ardb_nand_SECURE_BOOT_defconfig index 6a11a7c4ad,2d3fe4fb6d..8e47f81277 --- a/configs/ls1043ardb_nand_SECURE_BOOT_defconfig +++ b/configs/ls1043ardb_nand_SECURE_BOOT_defconfig @@@ -30,10 -26,8 +30,8 @@@ CONFIG_MISC_INIT_R= CONFIG_SPL_FSL_PBL=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xf0 - CONFIG_SPL_CRYPTO=y - CONFIG_SPL_HASH_SUPPORT=y CONFIG_SPL_ENV_SUPPORT=y -CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y +CONFIG_SPL_MPC8XXX_INIT_DDR=y CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_WATCHDOG=y CONFIG_CMD_IMLS=y diff --cc configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig index 8934add4c8,d5864180b2..fef8121da7 --- a/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig +++ b/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig @@@ -30,10 -26,8 +30,8 @@@ CONFIG_MISC_INIT_R= CONFIG_SPL_FSL_PBL=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x110 - CONFIG_SPL_CRYPTO=y - CONFIG_SPL_HASH_SUPPORT=y CONFIG_SPL_ENV_SUPPORT=y -CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y +CONFIG_SPL_MPC8XXX_INIT_DDR=y CONFIG_SPL_WATCHDOG=y CONFIG_CMD_IMLS=y CONFIG_CMD_SPL=y diff --cc configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig index 36b91a05fb,9481e0a6ab..c4a9315890 --- a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig +++ b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig @@@ -33,13 -26,10 +33,11 @@@ CONFIG_MISC_INIT_R= CONFIG_SPL_FSL_PBL=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x110 - CONFIG_SPL_CRYPTO=y - CONFIG_SPL_HASH_SUPPORT=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_I2C=y -CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y +CONFIG_SPL_MPC8XXX_INIT_DDR=y CONFIG_SPL_WATCHDOG=y +CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=5 CONFIG_CMD_DM=y CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y diff --cc configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig index 3efea9e3ae,b7c72cb3ba..7301a09b4d --- a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig +++ b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig @@@ -33,13 -32,10 +33,11 @@@ CONFIG_DISPLAY_BOARDINFO_LATE= CONFIG_MISC_INIT_R=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x8b0 - CONFIG_SPL_CRYPTO=y - CONFIG_SPL_HASH_SUPPORT=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_I2C=y -CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y +CONFIG_SPL_MPC8XXX_INIT_DDR=y CONFIG_CMD_GREPENV=y +CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=5 CONFIG_CMD_MEMINFO=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_DM=y diff --cc configs/mt8516_pumpkin_defconfig index 693ce9a5c4,63da1eac9f..c0786bd98e --- a/configs/mt8516_pumpkin_defconfig +++ b/configs/mt8516_pumpkin_defconfig @@@ -12,9 -12,7 +12,8 @@@ CONFIG_DEBUG_UART_BASE=0x1100500 CONFIG_DEBUG_UART_CLOCK=26000000 # CONFIG_PSCI_RESET is not set CONFIG_DEBUG_UART=y +CONFIG_SYS_LOAD_ADDR=0x4c000000 CONFIG_FIT=y - # CONFIG_FIT_SHA256 is not set # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_DEFAULT_FDT_FILE="mt8516-pumpkin" # CONFIG_DISPLAY_BOARDINFO is not set diff --cc configs/novena_defconfig index 81f1534926,54180362bc..66aa34281e --- a/configs/novena_defconfig +++ b/configs/novena_defconfig @@@ -67,11 -59,8 +67,10 @@@ CONFIG_PHY_MICREL_KSZ90X1= CONFIG_FEC_MXC=y CONFIG_RGMII=y CONFIG_MII=y - CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_DM_THERMAL=y CONFIG_IMX_THERMAL=y diff --cc configs/sifive_unmatched_defconfig index 7d45fbffc7,1dde98e0ae..55646550d3 --- a/configs/sifive_unmatched_defconfig +++ b/configs/sifive_unmatched_defconfig @@@ -2,12 -2,12 +2,13 @@@ CONFIG_RISCV= CONFIG_SPL_GPIO=y CONFIG_SYS_MALLOC_F_LEN=0x3000 CONFIG_NR_DRAM_BANKS=1 +CONFIG_SYS_MALLOC_LEN=0x800000 CONFIG_SPL_DM_SPI=y CONFIG_DEFAULT_DEVICE_TREE="hifive-unmatched-a00" -CONFIG_SPL_MMC_SUPPORT=y +CONFIG_SPL_MMC=y CONFIG_SPL=y -CONFIG_SPL_SPI_SUPPORT=y +CONFIG_SPL_SPI=y + CONFIG_AHCI=y CONFIG_TARGET_SIFIVE_UNMATCHED=y CONFIG_ARCH_RV64I=y CONFIG_RISCV_SMODE=y @@@ -30,8 -29,9 +31,10 @@@ CONFIG_CMD_GPT_RENAME= CONFIG_CMD_PCI=y CONFIG_CMD_USB=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_SCSI_AHCI=y + CONFIG_AHCI_PCI=y CONFIG_SPL_CLK=y +CONFIG_SYS_I2C_EEPROM_ADDR=0x54 CONFIG_E1000=y CONFIG_NVME=y CONFIG_PCI=y diff --cc drivers/pci/Kconfig index 97d0de5b11,e4123ba820..e93518ebc1 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@@ -55,8 -46,8 +46,7 @@@ config PCI_REGION_MULTI_ENTR config PCI_MAP_SYSTEM_MEMORY bool "Map local system memory from a virtual base address" - depends on PCI || DM_PCI depends on MIPS - default n help Say Y if base address of system memory is being used as a virtual address instead of a physical address (e.g. on MIPS). The PCI core will then remap diff --cc include/configs/MPC8560ADS.h index 2243143664,5254936a4b..e1e0717991 --- a/include/configs/MPC8560ADS.h +++ b/include/configs/MPC8560ADS.h @@@ -27,8 -27,8 +27,7 @@@ * assume U-Boot is less than 0.5MB */ - #define CONFIG_PCI_INDIRECT_BRIDGE #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ -#undef CONFIG_ETHER_ON_FCC /* cpm FCC ethernet support */ #define CONFIG_RESET_PHY_R 1 /* Call reset_phy() */ /* diff --cc include/configs/mv-common.h index 65d7dd1430,6036bf4fa5..e460f69a08 --- a/include/configs/mv-common.h +++ b/include/configs/mv-common.h @@@ -39,10 -39,33 +39,19 @@@ #define CONFIG_SYS_NS16550_COM1 MV_UART_CONSOLE_BASE #endif + #if defined(CONFIG_ARMADA_38X) && !defined(CONFIG_SYS_BAUDRATE_TABLE) + #define CONFIG_SYS_BAUDRATE_TABLE { 300, 600, 1200, 1800, 2400, 4800, \ + 9600, 19200, 38400, 57600, 115200, \ + 230400, 460800, 500000, 576000, \ + 921600, 1000000, 1152000, 1500000, \ + 2000000, 2500000, 3125000, 4000000, \ + 5200000 } + #endif + /* auto boot */ -/* - * For booting Linux, the board info and command line data - * have to be in the first 8 MB of memory, since this is - * the maximum mapped by the Linux kernel during initialization. - */ -#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ -#define CONFIG_INITRD_TAG 1 /* enable INITRD tag */ -#define CONFIG_SETUP_MEMORY_TAGS 1 /* enable memory tag */ - #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buff Size */ -/* - * Size of malloc() pool - */ -#define CONFIG_SYS_MALLOC_LEN (1024 * 1024 * 4) /* 4MiB for malloc() */ - /* * Other required minimal configurations */ diff --cc include/configs/sifive-unmatched.h index 538cce414c,bea0eebe23..f68d7d7676 --- a/include/configs/sifive-unmatched.h +++ b/include/configs/sifive-unmatched.h @@@ -34,6 -38,10 +34,8 @@@ #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit resources */ -#define CONFIG_SYS_CACHELINE_SIZE 64 - + #define CONFIG_SYS_SCSI_MAX_SCSI_ID 4 + /* Environment options */ #ifndef CONFIG_SPL_BUILD diff --cc lib/Makefile index 2d29cdad1e,93be86c34a..dfe772aaff --- a/lib/Makefile +++ b/lib/Makefile @@@ -87,8 -87,7 +87,8 @@@ endi ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o - obj-$(CONFIG_$(SPL_TPL_)HASH_SUPPORT) += crc16.o + obj-$(CONFIG_$(SPL_TPL_)HASH) += crc16.o +obj-$(CONFIG_MMC_SPI_CRC_ON) += crc16.o obj-y += net_utils.o endif obj-$(CONFIG_ADDR_MAP) += addr_map.o diff --cc lib/rsa/rsa-sign.c index 64db1429c1,0e0a890fd1..c27a784c42 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@@ -251,10 -269,10 +251,10 @@@ static int rsa_engine_get_priv_key(cons snprintf(key_id, sizeof(key_id), "%s%s", keydir, name); - else if (keydir) + else if (name) snprintf(key_id, sizeof(key_id), "%s", - name); + name ? name : ""); else if (keyfile) snprintf(key_id, sizeof(key_id), "%s", keyfile); else diff --cc scripts/config_whitelist.txt index 6abb18b7ae,ff24ab1873..c98decb6f9 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@@ -138,7 -166,7 +138,6 @@@ CONFIG_CLOCK CONFIG_CLOCK_SYNTHESIZER CONFIG_CM922T_XA10 CONFIG_CMDLINE_PS_SUPPORT --CONFIG_CMDLINE_TAG CONFIG_CM_INIT CONFIG_CM_MULTIPLE_SSRAM CONFIG_CM_REMAP @@@ -635,9 -723,10 +634,8 @@@ CONFIG_IM CONFIG_IMX CONFIG_IMX6_PWM_PER_CLK CONFIG_IMX_HDMI -CONFIG_IMX_NAND CONFIG_IMX_VIDEO_SKIP CONFIG_INETSPACE_V2 --CONFIG_INITRD_TAG CONFIG_INIT_IGNORE_ERROR CONFIG_INI_ALLOW_MULTILINE CONFIG_INI_CASE_INSENSITIVE @@@ -805,8 -896,8 +803,6 @@@ CONFIG_M520 CONFIG_M5301x CONFIG_MACB_SEARCH_PHY CONFIG_MACH_OMAPL138_LCDK --CONFIG_MACH_TYPE --CONFIG_MACH_TYPE_COMPAT_REV CONFIG_MACRESET_TIMEOUT CONFIG_MALLOC_F_ADDR CONFIG_MALTA @@@ -1094,7 -1196,7 +1090,6 @@@ CONFIG_RESET_TO_RETR CONFIG_RESET_VECTOR_ADDRESS CONFIG_RESTORE_FLASH CONFIG_RES_BLOCK_SIZE --CONFIG_REVISION_TAG CONFIG_RMII CONFIG_RMSTP0_ENA CONFIG_RMSTP10_ENA @@@ -1167,14 -1270,15 +1162,11 @@@ CONFIG_SERIAL_FLAS CONFIG_SERIAL_HW_FLOW_CONTROL CONFIG_SERIAL_MULTI CONFIG_SERIAL_SOFTWARE_FIFO --CONFIG_SERIAL_TAG CONFIG_SERIRQ_CONTINUOUS_MODE CONFIG_SERVERIP CONFIG_SETUP_INITRD_TAG --CONFIG_SETUP_MEMORY_TAGS -CONFIG_SET_BIST CONFIG_SET_BOOTARGS CONFIG_SET_DFU_ALT_BUF_LEN --CONFIG_SFIO CONFIG_SGI_IP28 CONFIG_SH73A0 CONFIG_SH7751_PCI @@@ -1197,8 -1305,10 +1189,7 @@@ CONFIG_SH_QSPI_BAS CONFIG_SH_SCIF_CLK_FREQ CONFIG_SH_SDHI_FREQ CONFIG_SH_SDRAM_OFFSET --CONFIG_SIEMENS_MACH_TYPE CONFIG_SKIP_LOCAL_MAC_RANDOMIZATION -CONFIG_SKIP_LOWLEVEL_INIT -CONFIG_SKIP_LOWLEVEL_INIT_ONLY CONFIG_SKIP_TRUNOFF_WATCHDOG CONFIG_SLIC CONFIG_SLTTMR