1. 16 7月, 2021 7 次提交
  2. 15 7月, 2021 33 次提交
    • T
      Merge https://source.denx.de/u-boot/custodians/u-boot-x86 · d3fc3da9
      Tom Rini 提交于
      - x86: various improvements made in getting Chromium OS verified boot
        running on top of coreboot, booting into U-Boot.
      d3fc3da9
    • S
      x86: Ensure the e820 map is installed in all cases · 2f91fc40
      Simon Glass 提交于
      This is a revert of a recent logic change in setup_zimage(). We do
      actually need to install this information always. Change it to install
      from the Coreboot tables if available, else the normal source.
      
      Fixes: e7bae828 ("x86: Allow installing an e820 when booting from coreboot")
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      2f91fc40
    • S
      doc: Update documentation for cros-2021.04 release · 4db474ae
      Simon Glass 提交于
      With the new 2021.04 we have a new version of Chromium OS boot, which
      supports sandbox, coral and coral-on-coreboot. Add documentation for
      this.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      4db474ae
    • S
      dtoc: Check that a parent is not missing · 1c56469c
      Simon Glass 提交于
      With of-platdata-inst we want to set up a reference to each devices'
      parent device, if there is one. If we find that the device has a parent
      (i.e. is not a root node) but it is not in the list of devices being
      written, then we cannot create the reference.
      
      Report an error in this case, since it indicates that the parent node
      is either missing a compatible string, is disabled, or perhaps does not
      have any properties because it was not tagged for SPL.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      1c56469c
    • S
      x86: cros: Check ROM exists before building vboot · 54e0bd17
      Simon Glass 提交于
      All the x86 devicetree files are built at once, whichever board is
      actually being built. If coreboot is the target build, CONFIG_ROM_SIZE
      is not defined and samus cannot build Chromium OS verified boot. Add
      this condition to avoid errors about CONFIG_ROM_SIZE being missing.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      Reviewed-by: NJaehoon Chung <jh80.chung@samsung.com>
      54e0bd17
    • S
      x86: coreboot: Document the memory map · e74d0ec8
      Simon Glass 提交于
      Add information about memory usage when U-Boot is started from coreboot.
      This is useful when debugging. Also, since coreboot takes a chunk of
      memory in the middle of SDRAM for use by PCI devices, it can help avoid
      overwriting this with a loaded kernel by accident.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      e74d0ec8
    • S
      x86: coreboot: Use vendor in the Kconfig · 4dfe4b44
      Simon Glass 提交于
      Use VENDOR_COREBOOT instead of TARGET_COREBOOT so we can have multiple
      coreboot boards, sharing options. Only SYS_CONFIG_NAME needs to be
      defined TARGET_COREBOOT.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      4dfe4b44
    • S
      x86: Add function comments to cb_sysinfo.h · c5c62155
      Simon Glass 提交于
      Add a function comment for get_coreboot_info() and a declaration for
      cb_get_sysinfo(), since this may be called from elsewhere.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      c5c62155
    • S
      x86: coral: Allow booting from coreboot · 50cf68c7
      Simon Glass 提交于
      Set up coral so that it can boot from coreboot, even though it is a
      bare-metal build. This helps with testing since the same image can be used
      in both cases.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      50cf68c7
    • S
      x86: coreboot: Show the BIOS date · e5bfcab9
      Simon Glass 提交于
      The BIOS version may not be present, e.g. on a Chrome OS build. Add the
      BIOS date as well, so we get some sort of indication of coreboot's
      vintage.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      e5bfcab9
    • S
      x86: Do cache set-up by default when booting from coreboot · 70529687
      Simon Glass 提交于
      A recent change to disable cache setup when booting from coreboot
      assumed that this has been done by SPL. The result is that for the
      coreboot board, the cache is disabled (in start.S) and never
      re-enabled.
      
      If the cache was turned off, as it is on boards without SPL, we should
      turn it back on. Add this new condition.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      70529687
    • S
      x86: Update the MP constants to avoid conflicts · 0f5ca1d1
      Simon Glass 提交于
      These constants conflict with error codes returned by the MP
      implementation when something is wrong. In particular, mp_first_cpu()
      returns MP_SELECT_BSP when running without multiprocessing enabled.
      Since this is -2, it is interpreted as an error by callers, which
      expect a positive CPU number for the first CPU.
      
      Correct this by using a different range for the pre-defined CPU
      numbers, above zero and out of the range of possible CPU values. For
      now it is safe to assume there are no more than 64K CPUs.
      
      This fixes the 'mtrr' command when CONFIG_SMP is not enabled.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      0f5ca1d1
    • S
      x86: Don't set up MTRRs if previously done · 92873f83
      Simon Glass 提交于
      When starting U-Boot from a previous-stage bootloader we presumably don't
      need to set up the variable MTRRs. In fact this could be harmful if the
      existing settings are not what U-Boot uses.
      
      Skip that step in this case.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      92873f83
    • S
      tpm: cr50: Drop unnecessary coral headers · bca2d579
      Simon Glass 提交于
      These headers are not actually used. Drop them so that this driver can
      be used by other boards, e.g. coreboot.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      bca2d579
    • S
      spi: ich: Don't require the PCH · f784361b
      Simon Glass 提交于
      When booting from coreboot we may not have a PCH driver available. The
      SPI driver can operate without the PCH but currently complains in this
      case. Update it to continue to work normally. The only missing feature
      is memory-mapping of SPI-flash contents, which is not essential.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      Reviewed-by: NJagan Teki <jagan@amarulasolutions.com>
      f784361b
    • S
      x86: pci: Allow binding of some devices before relocation · f5cbb5c7
      Simon Glass 提交于
      At present only bridge devices are bound before relocation, to save space
      in pre-relocation memory. In some cases we do actually want to bind a
      device, e.g. because it provides the console UART. Add a devicetree
      binding to support this.
      
      Use the PCI_VENDEV() macro to encode the cell value. This is present in
      U-Boot but not used, so move it to the binding header-file.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      f5cbb5c7
    • S
      pci: Use const for pci_find_device_id() etc. · e58f3a7d
      Simon Glass 提交于
      These functions don't modify the device-ID struct that is passed in, so
      mark the argument as const, so the data structure can be declared that
      way. This allows it to be placed in the rodata section.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      e58f3a7d
    • T
      Merge https://source.denx.de/u-boot/custodians/u-boot-marvell · 18e7ebf7
      Tom Rini 提交于
      - Turris_omnia/mox: SPI NOR and MTD related changes / fixes (Marek)
      - a37xx: pci: Misc fixes / optimizations (Pali)
      - Espressobin: Fix setting $fdtfile env & changes in MMC detection
        (Pali)
      - MMC: mmc_get_op_cond: Allow quiet detection of eMMC (Pali)
      18e7ebf7
    • P
      mmc: mmc_get_op_cond: Allow quiet detection of eMMC · a4c577f9
      Pali Rohár 提交于
      Add a new 'quiet' argument to mmc_get_op_cond() function which avoids
      printing error message when SD/eMMC card is not detected.
      
      Espressobin and mx6cuboxi boards use this function for detecting presence
      of eMMC and therefore it is expected and normal that eMMC does not have to
      be connected. So error message "Card did not respond to voltage select!"
      should be skipped in this case as it is not an error.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NStefan Roese <sr@denx.de>
      Acked-by: NJaehoon Chung <jh80.chung@samsung.com>
      a4c577f9
    • P
      arm: mvebu: Espressobin: Use function mmc_get_op_cond() for detecting eMMC · 42ba5669
      Pali Rohár 提交于
      Use function mmc_get_op_cond() instead of mmc_init() for detecting presence
      of eMMC. Documentation for this function says that it could be used to
      detect the presence of SD/eMMC when no card detect logic is available.
      
      This function is also used by mx6cuboxi board for detecting presence of eMMC.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NStefan Roese <sr@denx.de>
      42ba5669
    • P
      arm: mvebu: Espressobin: Fix setting $fdtfile env · aeff1740
      Pali Rohár 提交于
      Ensure that 'env default -a' always set correct value to $fdtfile, even
      when custom user variable is already stored in non-volatile env storage
      (means that env_get("fdtfile") call returns non-NULL value).
      
      As default value is now correctly set like if specified at compile time in
      CONFIG_EXTRA_ENV_SETTINGS, there is no need to set $fdtfile explicitly via
      env_set("fdtfile", ...) call.
      
      So remove wrong skip based on env_get("fdtfile") and then also unneeded
      env_set("fdtfile", ...) call.
      
      Fixes: c4df0f6f ("arm: mvebu: Espressobin: Set default value for $fdtfile env variable")
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NStefan Roese <sr@denx.de>
      aeff1740
    • M
      arm: mvebu: armada-3720: remove unused config option · 4a8ad584
      Marek Behún 提交于
      The config option CONFIG_DEBUG_UART_CLOCK is not used by Armada 3720's
      serial driver (it wasn't even before the recent update of that driver).
      
      Even if it was used, the value was incorrect (the frequency of the clock
      is 25 MHz, not 25.8048 MHz).
      
      Remove it from config files and set the default value to 0.
      Signed-off-by: NMarek Behún <marek.behun@nic.cz>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Pali Rohár <pali@kernel.org>
      Reviewed-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NStefan Roese <sr@denx.de>
      4a8ad584
    • M
      arm: mvebu: turris_{omnia, mox}: enable MTD command · 4d4cbd9d
      Marek Behún 提交于
      Now that the MTD subsystem properly supports OF partitions of a SPI NOR,
      we can enable the MTD command and start using it instead of the
      deprecated sf command.
      Signed-off-by: NMarek Behún <marek.behun@nic.cz>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Pali Rohár <pali@kernel.org>
      Reviewed-by: NStefan Roese <sr@denx.de>
      4d4cbd9d
    • M
      arm: mvebu: turris_omnia: force 40 MHz speed on SPI NOR · 4494ca84
      Marek Behún 提交于
      Commit e2e95e5e ("spi: Update speed/mode on change") changed the
      boot time on Turris Omnia from ~2.3s to over 8s, due to SPL loading main
      U-Boot from SPI NOR at 1 MHz instead of 40 MHz.
      
      This is because the SPL code passes the CONFIG_SF_DEFAULT_SPEED option
      to spi_flash_probe(), and with the above commit spi_flash_probe() starts
      prefering this parameter instead of the one specified in device-tree.
      
      The proper solution here would probably be to fix the SF subsystem to
      prefer the frequency specified in the device-tree, if it is present, but
      I am not sure what else will be affected on other boards with such a
      change. So until then we need a more simple fix.
      
      Since the CONFIG_SF_DEFAULT_SPEED option is used by the code, put the
      correct value there for Turris Omnia. Also put the correct value to
      CONFIG_SF_DEFAULT_MODE and use 40 MHz when reading environment.
      Signed-off-by: NMarek Behún <marek.behun@nic.cz>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Jagan Teki <jagan@amarulasolutions.com>
      Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
      Cc: Pali Rohár <pali@kernel.org>
      Reviewed-by: NStefan Roese <sr@denx.de>
      4494ca84
    • P
      arm: a37xx: pci: Fix typo in comment · 960d4597
      Pali Rohár 提交于
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NKonstantin Porotchkin <kostap@marvell.com>
      Reviewed-by: NStefan Roese <sr@denx.de>
      960d4597
    • P
      arm: a37xx: pci: Optimize a3700_fdt_fix_pcie_regions() when fixup offset is zero · cbd7ef70
      Pali Rohár 提交于
      If fixup offset is zero then there is nothing to fix. All calculation in
      this case just increase addresses by value zero which results in identity.
      So in this case skip whole fixup re-calculation as it is not needed.
      
      This is just an optimization for special case when fix_offset is zero which
      skips code path which does only identity operations (meaning nothing). No
      functional changes.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NKonstantin Porotchkin <kostap@marvell.com>
      Reviewed-by: NStefan Roese <sr@denx.de>
      cbd7ef70
    • P
      arm: a37xx: pci: Extend validation for PCIe resources and oubound windows · a8314950
      Pali Rohár 提交于
      Remapped address of PCIe outbound window may have set only bits from the
      mask. Add additional check that remapped address which is calculated from
      PCIe bus address specified in DTS file is valid.
      
      Remove also useless clearing of low 16 bits in win_mask. As win_size is
      power of two and is at least 0x10000 it means that it always has zero low
      16 bits.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NKonstantin Porotchkin <kostap@marvell.com>
      Reviewed-by: NStefan Roese <sr@denx.de>
      a8314950
    • T
      Merge branch '2021-07-14-build-and-host-updates' · c11f5abc
      Tom Rini 提交于
      - Resync Kbuild with the v4.20 Linux Kernel release
      - Update checkpatch.pl
      - Assorted other tooling updates
      c11f5abc
    • T
      scripts/get_default_envs.sh: Update for thin archive support · 963fde31
      Tom Rini 提交于
      This script was broken by the change to default archives for linking.
      This is due to objcopy specifically disallowing copying of thin
      archives.  To fix this and re-support external users of this script,
      switch to using the same logic the u-boot-initial-env make target uses
      to dump the section from the object file.
      Reported-by: NJan Kiszka <jan.kiszka@web.de>
      Fixes: 958f2e57 ("build: use thin archives instead of incremental linking")
      Signed-off-by: NTom Rini <trini@konsulko.com>
      963fde31
    • J
      Makefile: Conditionally add defaultenv_h to envtools target · 2a2896b1
      Joel Stanley 提交于
      When building the envtools target with CONFIG_USE_DEFAULT_ENV_FILE=y,
      the tools require generated/defaultenv_autogenerated.h.
      
       In file included from tools/env/fw_env.c:126:
       include/env_default.h:115:10: fatal error: generated/defaultenv_autogenerated.h: No such file or directory
         115 | #include "generated/defaultenv_autogenerated.h"
             |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Signed-off-by: NJoel Stanley <joel@jms.id.au>
      2a2896b1
    • T
      kconfig / kbuild: Re-sync with Linux 4.20 · 473fc279
      Tom Rini 提交于
      Align Kconfig and Kbuild logic to Linux 4.20 release with minimal impact
      on files outside of this scope.
      
      Our previous Kconfig sync was done by commit 587e4a42 ("kconfig /
      kbuild: Re-sync with Linux 4.19").
      
      As part of this re-sync, a few related changes from previous Linux
      releases were found to have been missed and merged in, and are not in
      the following list.
      
      The imported Linux commits are:
      
      [From prior to v4.19]
      b1e0d8b70fa3 kbuild: Fix gcc -x syntax
      a4353898980c kconfig: add CC_IS_GCC and GCC_VERSION
      469cb7376c06 kconfig: add CC_IS_CLANG and CLANG_VERSION
      
      [From v4.19 to v4.20]
      487c7c7702ab kbuild: prefix Makefile.dtbinst path with $(srctree) unconditionally
      0d91bf584fe5 kbuild: remove old check for CFLAGS use
      25815cf5ffec kbuild: hide most of targets when running config or mixed targets
      00d78ab2ba75 kbuild: remove dead code in cmd_files calculation in top Makefile
      23066c3f4e21 Compiler Attributes: enable -Wstringop-truncation on W=1 (gcc >= 8)
      37c8a5fafa3b kbuild: consolidate Devicetree dtb build rules
      80463f1b7bf9 kbuild: add --include-dir flag only for out-of-tree build
      77ec0c20c7e0 kbuild: remove VERSION and PATCHLEVEL from $(objtree)/Makefile
      74bc0c09b2da kbuild: remove user ID check in scripts/mkmakefile
      4fd61277f662 kbuild: do not pass $(objtree) to scripts/mkmakefile
      80d0dda3a4e5 kbuild: simplify command line creation in scripts/mkmakefile
      fb073a4b473e kbuild: add -Wno-pointer-sign flag unconditionally
      9df3e7a7d7d6 kbuild: add -Wno-unused-but-set-variable flag unconditionally
      69ea912fda74 kbuild: remove unneeded link_multi_deps
      7d0ea2524202 kbuild: use 'else ifeq' for checksrc to improve readability
      04c459d20448 kconfig: remove oldnoconfig target
      0085b4191f3e kconfig: remove silentoldconfig target
      3f80babd9ca4 kbuild: remove unused cc-fullversion variable
      2cd3faf87d2d merge_config.sh: Allow to define config prefix
      076f421da5d4 kbuild: replace cc-name test with CONFIG_CC_IS_CLANG
      6bbe4385d035 kconfig: merge_config: avoid false positive matches from comment lines
      
      [From post v4.20]
      885480b08469 Makefile: Move -Wno-unused-but-set-variable out of GCC only block
      
      There are a number of changes related to additional warnings as well as
      being able to drop cc-name entirely that have been omitted for now as
      additional work is required first.
      
      Cc: Masahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: NTom Rini <trini@konsulko.com>
      473fc279
    • T
      get_maintainer.pl: update from Linux kernel v5.13-rc6 · e57c7c5c
      Trevor Woerner 提交于
      Update U-Boot's version of scripts/get_maintainer.pl to sync it up with the
      latest changes to the Linux kernel's version of the same script.
      
      The last sync was with Linux kernel version v4.16. The commits to the kernel's
      get_maintainer.pl since then (starting with the most recent) are:
      
      	6343f6b71f83 get_maintainer: exclude MAINTAINERS file(s) from --git-fallback
      	cdfe2d220476 get_maintainer: add test for file in VCS
      	e33c9fe8b80c get_maintainer: fix unexpected behavior for path/to//file (double slashes)
      	0c78c0137621 get_maintainer: add email addresses from .yaml files
      	0ef82fcefb99 scripts/get_maintainer.pl: deprioritize old Fixes: addresses
      	ef0c08192ac0 get_maintainer: remove uses of P: for maintainer name
      	2f5bd343694e scripts/get_maintainer.pl: add signatures from Fixes: <badcommit> lines in commit message
      	49662503e8e4 get_maintainer: add ability to skip moderated mailing lists
      	0fbd75fd7fee get_maintainer: allow option --mpath <directory> to read all files in <directory>
      	5f0baf95b1ed get_maintainer.pl: add -mpath=<path or file> for MAINTAINERS file location
      	31bb82c9caa9 get_maintainer: allow usage outside of kernel tree
      	0455c74788fd get_maintainer: improve patch recognition
      	882ea1d64eb3 scripts: use SPDX tag in get_maintainer and checkpatch
      Signed-off-by: NTrevor Woerner <twoerner@gmail.com>
      e57c7c5c
    • H
      lib: move rtc-lib.c to lib · e94ef579
      Heinrich Schuchardt 提交于
      Function rtc_to_tm() is needed for FAT file system support even if we don't
      have a real time clock. So move it from drivers/ to lib/.
      Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      e94ef579