diff options
author | Tom Rini <trini@konsulko.com> | 2020-08-28 08:51:37 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-28 08:51:37 -0400 |
commit | 9f04a634ef331b4fc6b3e677f276156192a413c7 (patch) | |
tree | a6b8663e5d156f85846d187248597888043e0d3e | |
parent | f87c80ade3911f3d518036a28370fe44c85a95c7 (diff) | |
parent | 2ed1b242ab2f9ee7541ae0a655de67832a3eebc1 (diff) |
Merge branch '2020-08-27-misc-fixes'
- Fix for gd->ram_top and bootm_size calculations
- Assorted Kconfig entry cleanups / fixes.
- Make checkpatch.pl error on fdt_high/initrd_high=0xffffffff
- Resync scripts/setlocalversion
- Other minor bugfixes
-rw-r--r-- | arch/Kconfig | 1 | ||||
-rw-r--r-- | cmd/Kconfig | 2 | ||||
-rw-r--r-- | cmd/mem.c | 4 | ||||
-rw-r--r-- | common/image.c | 3 | ||||
-rw-r--r-- | configs/khadas-vim2_defconfig | 1 | ||||
-rw-r--r-- | configs/khadas-vim_defconfig | 1 | ||||
-rw-r--r-- | configs/libretech-ac_defconfig | 1 | ||||
-rw-r--r-- | configs/libretech-cc_defconfig | 1 | ||||
-rw-r--r-- | configs/libretech-s905d-pc_defconfig | 1 | ||||
-rw-r--r-- | configs/libretech-s912-pc_defconfig | 1 | ||||
-rw-r--r-- | configs/odroid-c2_defconfig | 1 | ||||
-rw-r--r-- | configs/stm32mp15_basic_defconfig | 1 | ||||
-rw-r--r-- | configs/stm32mp15_dhcom_basic_defconfig | 1 | ||||
-rw-r--r-- | configs/stm32mp15_dhcor_basic_defconfig | 1 | ||||
-rw-r--r-- | configs/stm32mp15_trusted_defconfig | 1 | ||||
-rw-r--r-- | drivers/pci/Kconfig | 1 | ||||
-rw-r--r-- | drivers/usb/Kconfig | 12 | ||||
-rw-r--r-- | env/Kconfig | 1 | ||||
-rw-r--r-- | lib/rsa/rsa-sign.c | 2 | ||||
-rwxr-xr-x | scripts/checkpatch.pl | 6 | ||||
-rwxr-xr-x | scripts/setlocalversion | 43 | ||||
-rw-r--r-- | test/lib/Makefile | 2 |
22 files changed, 58 insertions, 30 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index e4a0a0230c..683e384319 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -12,6 +12,7 @@ config ARC bool "ARC architecture" select ARC_TIMER select CLK + select DM select HAVE_PRIVATE_LIBGCC select SUPPORT_OF_CONTROL select TIMER diff --git a/cmd/Kconfig b/cmd/Kconfig index 30c26b5d2b..0761dbb746 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -860,7 +860,7 @@ config CMD_ARMFLASH config CMD_ADC bool "adc - Access Analog to Digital Converters info and data" select ADC - select DM_REGULATOR + depends on DM_REGULATOR help Shows ADC device info and permit printing one-shot analog converted data from a named Analog to Digital Converter. @@ -30,10 +30,6 @@ DECLARE_GLOBAL_DATA_PTR; -#ifndef CONFIG_SYS_MEMTEST_SCRATCH -#define CONFIG_SYS_MEMTEST_SCRATCH 0 -#endif - /* Create a compile-time value */ #ifdef MEM_SUPPORT_64BIT_DATA #define SUPPORT_64BIT_DATA 1 diff --git a/common/image.c b/common/image.c index 9d7d5c17d1..da8bccd400 100644 --- a/common/image.c +++ b/common/image.c @@ -694,6 +694,9 @@ phys_size_t env_get_bootm_size(void) size = gd->bd->bi_memsize; #endif + if (start + size > gd->ram_top) + size = gd->ram_top - start; + s = env_get("bootm_low"); if (s) tmp = (phys_size_t)simple_strtoull(s, NULL, 16); diff --git a/configs/khadas-vim2_defconfig b/configs/khadas-vim2_defconfig index b6d5dbdd2e..1435781f59 100644 --- a/configs/khadas-vim2_defconfig +++ b/configs/khadas-vim2_defconfig @@ -43,6 +43,7 @@ CONFIG_PHY=y CONFIG_MESON_GXL_USB_PHY=y CONFIG_PINCTRL=y CONFIG_PINCTRL_MESON_GXL=y +CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_RESET=y CONFIG_DEBUG_UART_ANNOUNCE=y diff --git a/configs/khadas-vim_defconfig b/configs/khadas-vim_defconfig index 2a57cfb400..d075dd134c 100644 --- a/configs/khadas-vim_defconfig +++ b/configs/khadas-vim_defconfig @@ -39,6 +39,7 @@ CONFIG_PHY=y CONFIG_MESON_GXL_USB_PHY=y CONFIG_PINCTRL=y CONFIG_PINCTRL_MESON_GXL=y +CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_RESET=y CONFIG_DEBUG_UART_ANNOUNCE=y diff --git a/configs/libretech-ac_defconfig b/configs/libretech-ac_defconfig index d5a812c3d8..e898fb147f 100644 --- a/configs/libretech-ac_defconfig +++ b/configs/libretech-ac_defconfig @@ -53,6 +53,7 @@ CONFIG_PINCTRL=y CONFIG_PINCTRL_MESON_GXL=y CONFIG_POWER_DOMAIN=y CONFIG_MESON_GX_VPU_POWER_DOMAIN=y +CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_RESET=y CONFIG_DEBUG_UART_ANNOUNCE=y diff --git a/configs/libretech-cc_defconfig b/configs/libretech-cc_defconfig index dce861b8aa..65ad7f5de4 100644 --- a/configs/libretech-cc_defconfig +++ b/configs/libretech-cc_defconfig @@ -40,6 +40,7 @@ CONFIG_PINCTRL=y CONFIG_PINCTRL_MESON_GXL=y CONFIG_POWER_DOMAIN=y CONFIG_MESON_GX_VPU_POWER_DOMAIN=y +CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_RESET=y CONFIG_DEBUG_UART_ANNOUNCE=y diff --git a/configs/libretech-s905d-pc_defconfig b/configs/libretech-s905d-pc_defconfig index 225a21f0ff..c99a6c5971 100644 --- a/configs/libretech-s905d-pc_defconfig +++ b/configs/libretech-s905d-pc_defconfig @@ -48,6 +48,7 @@ CONFIG_PINCTRL=y CONFIG_PINCTRL_MESON_GXL=y CONFIG_POWER_DOMAIN=y CONFIG_MESON_GX_VPU_POWER_DOMAIN=y +CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_RESET=y CONFIG_DEBUG_UART_ANNOUNCE=y diff --git a/configs/libretech-s912-pc_defconfig b/configs/libretech-s912-pc_defconfig index 005dc0b25e..7975c590b6 100644 --- a/configs/libretech-s912-pc_defconfig +++ b/configs/libretech-s912-pc_defconfig @@ -47,6 +47,7 @@ CONFIG_PINCTRL=y CONFIG_PINCTRL_MESON_GXL=y CONFIG_POWER_DOMAIN=y CONFIG_MESON_GX_VPU_POWER_DOMAIN=y +CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_RESET=y CONFIG_DEBUG_UART_ANNOUNCE=y diff --git a/configs/odroid-c2_defconfig b/configs/odroid-c2_defconfig index 3c53233dcc..82bae79d3d 100644 --- a/configs/odroid-c2_defconfig +++ b/configs/odroid-c2_defconfig @@ -40,6 +40,7 @@ CONFIG_PINCTRL=y CONFIG_PINCTRL_MESON_GXBB=y CONFIG_POWER_DOMAIN=y CONFIG_MESON_GX_VPU_POWER_DOMAIN=y +CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_RESET=y diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig index 2094183295..a8c4112dbe 100644 --- a/configs/stm32mp15_basic_defconfig +++ b/configs/stm32mp15_basic_defconfig @@ -116,6 +116,7 @@ CONFIG_PINCTRL_STMFX=y CONFIG_DM_PMIC=y # CONFIG_SPL_PMIC_CHILDREN is not set CONFIG_PMIC_STPMIC1=y +CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_REGULATOR_STM32_VREFBUF=y diff --git a/configs/stm32mp15_dhcom_basic_defconfig b/configs/stm32mp15_dhcom_basic_defconfig index c70414e23b..7668fd01cd 100644 --- a/configs/stm32mp15_dhcom_basic_defconfig +++ b/configs/stm32mp15_dhcom_basic_defconfig @@ -114,6 +114,7 @@ CONFIG_PINCTRL_STMFX=y CONFIG_DM_PMIC=y # CONFIG_SPL_PMIC_CHILDREN is not set CONFIG_PMIC_STPMIC1=y +CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_REGULATOR_STM32_VREFBUF=y diff --git a/configs/stm32mp15_dhcor_basic_defconfig b/configs/stm32mp15_dhcor_basic_defconfig index 1e1aa86426..aa384517c3 100644 --- a/configs/stm32mp15_dhcor_basic_defconfig +++ b/configs/stm32mp15_dhcor_basic_defconfig @@ -108,6 +108,7 @@ CONFIG_PINCTRL_STMFX=y CONFIG_DM_PMIC=y # CONFIG_SPL_PMIC_CHILDREN is not set CONFIG_PMIC_STPMIC1=y +CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_REGULATOR_STM32_VREFBUF=y diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig index 8d59d84184..0792884a9d 100644 --- a/configs/stm32mp15_trusted_defconfig +++ b/configs/stm32mp15_trusted_defconfig @@ -94,6 +94,7 @@ CONFIG_PINCONF=y CONFIG_PINCTRL_STMFX=y CONFIG_DM_PMIC=y CONFIG_PMIC_STPMIC1=y +CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_REGULATOR_STM32_VREFBUF=y diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 06d39df1d3..c19d09bc41 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -260,6 +260,7 @@ config PCIE_MEDIATEK config PCIE_ROCKCHIP bool "Enable Rockchip PCIe driver" + depends on ARCH_ROCKCHIP select DM_PCI select PHY_ROCKCHIP_PCIE default y if ROCKCHIP_RK3399 diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 756a4ec402..34881a12b8 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -113,14 +113,14 @@ choice ---help--- Enable a polling mechanism for USB keyboard. - config SYS_USB_EVENT_POLL - bool "Interrupt polling" +config SYS_USB_EVENT_POLL + bool "Interrupt polling" - config SYS_USB_EVENT_POLL_VIA_INT_QUEUE - bool "Poll via interrupt queue" +config SYS_USB_EVENT_POLL_VIA_INT_QUEUE + bool "Poll via interrupt queue" - config SYS_USB_EVENT_POLL_VIA_CONTROL_EP - bool "Poll via control EP" +config SYS_USB_EVENT_POLL_VIA_CONTROL_EP + bool "Poll via control EP" endchoice diff --git a/env/Kconfig b/env/Kconfig index af4d9cbaa4..b59ba310ec 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -72,6 +72,7 @@ config ENV_IS_IN_FAT config ENV_IS_IN_EXT4 bool "Environment is in a EXT4 filesystem" depends on !CHAIN_OF_TRUST + select FS_EXT4 select EXT4_WRITE help Define this if you want to use the EXT4 file system for the environment. diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index 40ca1e1f57..1f0d81bd7a 100644 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -708,7 +708,7 @@ static int fdt_add_bignum(void *blob, int noffset, const char *prop_name, return -ENOMEM; } ctx = BN_CTX_new(); - if (!tmp) { + if (!ctx) { fprintf(stderr, "Out of memory (bignum context)\n"); return -ENOMEM; } diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3932362dba..4bed2b0cdc 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2359,6 +2359,12 @@ sub u_boot_line { ERROR("BARRED_INCLUDE_IN_HDR", "Avoid including common.h and dm.h in header files\n" . $herecurr); } + + # Do not disable fdt / initrd relocation + if ($rawline =~ /.*(fdt|initrd)_high=0xffffffff/) { + ERROR("DISABLE_FDT_OR_INITRD_RELOC", + "fdt or initrd relocation disabled at boot time\n" . $herecurr); + } } sub process { diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 8564bedd1a..c1c0435267 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0 # # This scripts adds local version information from the version # control systems git, mercurial (hg) and subversion (svn). @@ -44,11 +45,11 @@ scm_version() # Check for git and a git repo. if test -z "$(git rev-parse --show-cdup 2>/dev/null)" && - head=`git rev-parse --verify --short HEAD 2>/dev/null`; then + head=$(git rev-parse --verify --short HEAD 2>/dev/null); then # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore # it, because this version is defined in the top level Makefile. - if [ -z "`git describe --exact-match 2>/dev/null`" ]; then + if [ -z "$(git describe --exact-match 2>/dev/null)" ]; then # If only the short version is requested, don't bother # running further git commands @@ -58,7 +59,7 @@ scm_version() fi # If we are past a tagged commit (like # "v2.6.30-rc5-302-g72357d5"), we pretty print it. - if atag="`git describe 2>/dev/null`"; then + if atag="$(git describe 2>/dev/null)"; then echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' # If we don't have a tag at all we print -g{commitish}. @@ -69,11 +70,19 @@ scm_version() # Is this git on svn? if git config --get svn-remote.svn.url >/dev/null; then - printf -- '-svn%s' "`git svn find-rev $head`" + printf -- '-svn%s' "$(git svn find-rev $head)" fi - # Check for uncommitted changes - if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then + # Check for uncommitted changes. + # First, with git-status, but --no-optional-locks is only + # supported in git >= 2.14, so fall back to git-diff-index if + # it fails. Note that git-diff-index does not refresh the + # index, so it may give misleading results. See + # git-update-index(1), git-diff-index(1), and git-status(1). + if { + git --no-optional-locks status -uno --porcelain 2>/dev/null || + git diff-index --name-only HEAD + } | grep -qvE '^(.. )?scripts/package'; then printf '%s' -dirty fi @@ -82,15 +91,15 @@ scm_version() fi # Check for mercurial and a mercurial repo. - if test -d .hg && hgid=`hg id 2>/dev/null`; then + if test -d .hg && hgid=$(hg id 2>/dev/null); then # Do we have an tagged version? If so, latesttagdistance == 1 - if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then - id=`hg log -r . --template '{latesttag}'` + if [ "$(hg log -r . --template '{latesttagdistance}')" = "1" ]; then + id=$(hg log -r . --template '{latesttag}') printf '%s%s' -hg "$id" else - tag=`printf '%s' "$hgid" | cut -d' ' -f2` + tag=$(printf '%s' "$hgid" | cut -d' ' -f2) if [ -z "$tag" -o "$tag" = tip ]; then - id=`printf '%s' "$hgid" | sed 's/[+ ].*//'` + id=$(printf '%s' "$hgid" | sed 's/[+ ].*//') printf '%s%s' -hg "$id" fi fi @@ -106,8 +115,8 @@ scm_version() fi # Check for svn and a svn repo. - if rev=`LANG= LC_ALL= LC_MESSAGES=C svn info 2>/dev/null | grep '^Last Changed Rev'`; then - rev=`echo $rev | awk '{print $NF}'` + if rev=$(LANG= LC_ALL= LC_MESSAGES=C svn info 2>/dev/null | grep '^Last Changed Rev'); then + rev=$(echo $rev | awk '{print $NF}') printf -- '-svn%s' "$rev" # All done with svn @@ -117,7 +126,7 @@ scm_version() collect_files() { - local file res + local file res= for file; do case "$file" in @@ -142,12 +151,12 @@ fi if test -e include/config/auto.conf; then # We are interested only in CONFIG_LOCALVERSION and - # CONFIG_LOCALVERSION_AUTO, so extract these in a safe - # way (i.e. w/o sourcing auto.conf) + # CONFIG_LOCALVERSION_AUTO, so extract these in a safe + # way (i.e. w/o sourcing auto.conf) CONFIG_LOCALVERSION=`cat include/config/auto.conf | awk -F '=' '/^CONFIG_LOCALVERSION=/ {print $2}'` CONFIG_LOCALVERSION_AUTO=`cat include/config/auto.conf | awk -F '=' '/^CONFIG_LOCALVERSION_AUTO=/ {print $2}'` else - echo "Error: kernelrelease not valid - run 'make prepare' to update it" + echo "Error: kernelrelease not valid - run 'make prepare' to update it" >&2 exit 1 fi diff --git a/test/lib/Makefile b/test/lib/Makefile index ada62fe46b..22236f8587 100644 --- a/test/lib/Makefile +++ b/test/lib/Makefile @@ -7,7 +7,7 @@ obj-$(CONFIG_EFI_LOADER) += efi_device_path.o obj-$(CONFIG_EFI_SECURE_BOOT) += efi_image_region.o obj-y += hexdump.o obj-y += lmb.o -obj-y += sscanf.o +obj-$(CONFIG_SSCANF) += sscanf.o obj-y += string.o obj-$(CONFIG_ERRNO_STR) += test_errno_str.o obj-$(CONFIG_UT_LIB_ASN1) += asn1.o |