Skip to content
Snippets Groups Projects
  1. Jul 15, 2021
  2. Jul 14, 2021
    • Tom Rini's avatar
      scripts/get_default_envs.sh: Update for thin archive support · 963fde31
      Tom Rini authored
      
      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: default avatarJan Kiszka <jan.kiszka@web.de>
      Fixes: 958f2e57 ("build: use thin archives instead of incremental linking")
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      963fde31
    • Joel Stanley's avatar
      Makefile: Conditionally add defaultenv_h to envtools target · 2a2896b1
      Joel Stanley authored and Tom Rini's avatar Tom Rini committed
      
      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: default avatarJoel Stanley <joel@jms.id.au>
      2a2896b1
    • Tom Rini's avatar
      kconfig / kbuild: Re-sync with Linux 4.20 · 473fc279
      Tom Rini authored
      
      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: default avatarTom Rini <trini@konsulko.com>
      473fc279
    • Trevor Woerner's avatar
      get_maintainer.pl: update from Linux kernel v5.13-rc6 · e57c7c5c
      Trevor Woerner authored and Tom Rini's avatar Tom Rini committed
      
      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: default avatarTrevor Woerner <twoerner@gmail.com>
      e57c7c5c
    • Heinrich Schuchardt's avatar
      lib: move rtc-lib.c to lib · e94ef579
      Heinrich Schuchardt authored and Tom Rini's avatar Tom Rini committed
      
      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: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      e94ef579
    • Ming Liu's avatar
      tools: image-host: fix wrong return value · 7c39799d
      Ming Liu authored and Tom Rini's avatar Tom Rini committed
      
      The return value '-ENOSPC' of fit_set_timestamp function does not match
      the caller fit_image_write_sig's expection which is '-FDT_ERR_NOSPACE'.
      
      Fix it by not calling fit_set_timestamp, but call fdt_setprop instead.
      
      This fixes a following mkimage error:
      | Can't write signature for 'signature@1' signature node in
      | 'conf@imx6ull-colibri-wifi-eval-v3.dtb' conf node: <unknown error>
      | mkimage Can't add hashes to FIT blob: -1
      
      Signed-off-by: default avatarMing Liu <liu.ming50@gmail.com>
      Tested-by: default avatarIgor Opaniuk <igor.opaniuk@foundries.io>
      7c39799d
    • Sven Roederer's avatar
      tools/fitimage: add missing linebreak for some messages · 9c70237f
      Sven Roederer authored and Tom Rini's avatar Tom Rini committed
      
      Add a linebreak to two messages and fix punctuation.
      
      Signed-off-by: default avatarSven Roederer <devel-sven@geroedel.de>
      9c70237f
    • Rasmus Villemoes's avatar
      fixdep: remove leftover handling of IS_BUILTIN/IS_MODULE · 33b9027c
      Rasmus Villemoes authored and Tom Rini's avatar Tom Rini committed
      
      I removed CONFIG_IS_BUILTIN and CONFIG_IS_MODULE in commit
      7d78a454 ("linux/kconfig.h: remove unused helper macros"), but
      fixdep.c still looks for those. It's harmless, but also pointless and
      possibly confusing to a future reader.
      
      Fixes: 7d78a454 ("linux/kconfig.h: remove unused helper macros")
      Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
      33b9027c
    • Yann Dirson's avatar
      mkimage: allow -l to work on block devices on Linux · 331f0800
      Yann Dirson authored and Tom Rini's avatar Tom Rini committed
      When "mkimage -l" was run on a block device it would fail with
      erroneous message, because fstat reports a size of zero for those:
      
       mkimage: Bad size: "/dev/sdb4" is not valid image
      
      This patch identifies the "is a block device" case and reports it as
      such, and if it knows how to determine the size of a block device on
      the current OS, proceeds.
      
      As shown in
      http://www.mit.edu/afs.new/sipb/user/tytso/e2fsprogs/lib/blkid/getsize.c
      
      
      this is no portable task, and I only handled the case of a modern
      Linux kernel, which is what I can test.
      
      Signed-off-by: default avatarYann Dirson <yann@blade-group.com>
      331f0800
    • Tom Rini's avatar
      Merge branch '2021-07-14-platform-updates' · eae8c7c3
      Tom Rini authored
      - Assorted platform updates
      eae8c7c3
    • Stephan Gerhold's avatar
      usb: musb-new: Add glue driver for ST-Ericsson Ux500 · 845d9cf6
      Stephan Gerhold authored and Tom Rini's avatar Tom Rini committed
      
      The ST-Ericsson DB8500 SoC contains a MUSB OTG controller which
      supports both host and gadget mode. For some reason there is
      nothing special about it - add a simple glue driver for Ux500
      that literally just sets up MUSB together with a generic PHY.
      There are no SoC-specific registers etc needed to make USB work.
      
      The new Ux500 glue driver is only tested to work with DM_USB
      and DM_USB_GADGET. Both host and gadget mode work fine on
      the u8500 "stemmy" board that is already present in U-Boot.
      
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
      845d9cf6
    • Stephan Gerhold's avatar
      phy: Add driver for ST-Ericsson AB8500 USB PHY · 4559df9e
      Stephan Gerhold authored and Tom Rini's avatar Tom Rini committed
      
      The AB8500 PMIC contains an USB PHY that needs to be set up in
      device or host mode to make USB work properly. Add a simple driver
      for the generic PHY uclass that allows enabling it.
      
      The if (CONFIG_IS_ENABLED(USB_MUSB_HOST)) might be a bit strange.
      The USB PHY must be configured in either host or device mode and
      somehow the USB PHY driver must be made aware of the mode.
      
      Actually, the MUSB driver used together with this PHY does not
      support dynamic selection of host/device mode in U-Boot at the moment.
      Therefore, one very simple approach that works fine is to select
      the mode to configure at compile time. When the MUSB driver is
      configured in host mode the PHY is configured in host mode, and
      similarly when the MUSB driver is configured in device/gadget mode.
      
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
      Reviewed-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
      4559df9e
    • Stephan Gerhold's avatar
      power: pmic: Add driver for ST-Ericsson AB8500 via PRCMU · 3f6e4ec7
      Stephan Gerhold authored and Tom Rini's avatar Tom Rini committed
      
      All devices based on ST-Ericsson Ux500 use a PMIC similar to AB8500
      (Analog Baseband). There is AB8500, AB8505, AB9540 and AB8540
      although in practice only AB8500 and AB8505 are relevant since the
      platforms with AB9540 and AB8540 were cancelled and never used in
      production.
      
      In general, the AB8500 PMIC uses I2C as control interface, where the
      different register banks are represented as separate I2C devices.
      However, in practice AB8500 is always connected to a special I2C bus
      on the DB8500 SoC that is controlled by the power/reset/clock
      management unit (PRCMU) firmware.
      
      Add a simple driver that allows reading/writing registers of the
      AB8500 PMIC. The driver directly accesses registers from the PRCMU
      parent device (represented by syscon in U-Boot). Abstracting it
      further (e.g. with the i2c uclass) would not provide any advantage
      because the PRCMU I2C bus is always just connected to AB8500 and
      vice-versa.
      
      The ab8500.h header is mostly taken as-is from Linux (with some
      minor adjustments) to allow using similar code in both Linux and
      U-Boot.
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
      Acked-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
      3f6e4ec7
    • Stephan Gerhold's avatar
      board: stemmy: Copy atags for booting downstream/vendor kernel · e2f82f93
      Stephan Gerhold authored and Tom Rini's avatar Tom Rini committed
      
      The U-Boot "stemmy" board is mainly intended to simplify booting
      mainline Linux on various smartphones from Samsung based on ST-Ericsson
      Ux500. While the mainline kernel is working great, there are still some
      features missing there. In particular, it is currently not possible to
      charge the battery when using the mainline kernel.
      
      This means that it is still necessary to boot the downstream/vendor
      kernel from Samsung sometimes to charge the device. That kernel is
      ancient, still uses board files + ATAGS instead of device trees and
      relies on a strange very long kernel command line hardcoded in the
      Samsung bootloader.
      
      Actually, since mainline is booted with device trees there is a very
      simple way to make the old downstream kernel work as well: We can
      simply take most of the ATAGS passed to U-Boot from the Samsung
      bootloader and copy them as-is when booting a kernel without device
      tree. That way the long command line and other needed ATAGS are copied
      as-is without having to bother with them.
      
      The only exception is the ATAG_INITRD - since the initrd is loaded
      by U-Boot, the atag for that should be generated in U-Boot so it points
      to the correct address. All other ATAGS are copied as-is and not
      generated in U-Boot.
      
      Also use the chance and provide a serial# for U-Boot by parsing the
      ATAG_SERIAL that is also passed by the Samsung bootloader.
      
      Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      e2f82f93
    • Stephan Gerhold's avatar
      board: stemmy: Parse atags to get available memory · 03585d52
      Stephan Gerhold authored and Tom Rini's avatar Tom Rini committed
      
      At the moment the "stemmy" board attempts to detect the RAM size with
      a simple memory test (get_ram_size()). Unfortunately, this does not work
      correctly for devices with 768 MiB RAM (e.g. Samsung Galaxy Ace 2
      (GT-I8160), "codina"). Reading/writing memory after the 768 MiB RAM
      succeeds but actually overwrites some earlier parts of the memory.
      
      For U-Boot this does not result in any major problems, but on Linux
      this will eventually lead to strange crashes because of the memory
      corruption.
      
      Since the "stemmy" U-Boot port is designed to be chainloaded from
      the original Samsung bootloader, the most reliable way to get the
      available amount of RAM is to look at the ATAGS passed by the Samsung
      bootloader. Fortunately, the header used to generate ATAGS in U-Boot
      (asm/setup.h) can also be easily used to parse them.
      
      Also clarify and simplify stemmy.h a bit to make it more clear where
      some of the magic values in there are actually coming from.
      
      Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      03585d52
    • Kunihiko Hayashi's avatar
      ARM: dts: uniphier: Add support for Akebi96 · 9e9074bc
      Kunihiko Hayashi authored and Tom Rini's avatar Tom Rini committed
      Add the device tree for Akebi96. Akebi96 is a 96boards certified
      development board based on UniPhier LD20.
      ( https://www.96boards.org/product/akebi96/
      
       )
      
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu@linaro.org>
      Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      9e9074bc
    • Kunihiko Hayashi's avatar
      configs: uniphier: Enable CONFIG_SYS_PCI_64BIT · bc9255a5
      Kunihiko Hayashi authored and Tom Rini's avatar Tom Rini committed
      
      Enable CONFIG_SYS_PCI_64BIT to allow 64bit access to PCI space.
      
      Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      bc9255a5
    • Kunihiko Hayashi's avatar
      pci: uniphier: Add UniPhier PCIe controller driver · e22c2560
      Kunihiko Hayashi authored and Tom Rini's avatar Tom Rini committed
      
      Add PCIe driver for UniPhier SoCs. This PCIe controller is based on
      Synopsys DesignWare Core IP.
      
      This version doesn't apply common DW functions because supported
      controller doesn't have unroll version of iATU.
      
      Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      e22c2560
    • Kunihiko Hayashi's avatar
      phy: socionext: Add UniPhier PCIe PHY driver · b0415d82
      Kunihiko Hayashi authored and Tom Rini's avatar Tom Rini committed
      
      Add PCIe PHY driver support for Pro5, LD20 and PXs3 SoCs.
      
      Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      b0415d82
    • Kunihiko Hayashi's avatar
      reset: uniphier: Add PCIe reset entry · 34707b32
      Kunihiko Hayashi authored and Tom Rini's avatar Tom Rini committed
      
      Add reset control for PCIe controller on each SoC.
      
      Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      34707b32
    • Kunihiko Hayashi's avatar
      clk: uniphier: Add PCIe clock entry · a1b4810a
      Kunihiko Hayashi authored and Tom Rini's avatar Tom Rini committed
      
      Add clock control for PCIe controller on each SoC.
      
      Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      a1b4810a
    • Ley Foon Tan's avatar
      MAINTAINERS, git-mailrc: socfpga: Change co-maintainer to Tien Fong Chee · d3cffc83
      Ley Foon Tan authored and Tom Rini's avatar Tom Rini committed
      
      I'm no longer work in Intel, change Intel SoCFPGA co-maintainer to
      Tien Fong Chee.
      
      Signed-off-by: default avatarLey Foon Tan <lftan.linux@gmail.com>
      Acked-by: default avatarMarek Vasut <marex@denx.de>
      d3cffc83
    • Stephan Gerhold's avatar
      arm: mach-snapdragon: pinctrl: Place pin_name in .data section · 548b89f8
      Stephan Gerhold authored and Tom Rini's avatar Tom Rini committed
      
      According to arch/arm/lib/crt0_64.S, the BSS section is "UNAVAILABLE"
      and uninitialized before relocation. Also, it overlaps with the
      appended DTB before relocation, so writing data into a variable
      in the BSS section might corrupt the appended DTB.
      
      Unfortunately, pinctrl-apq8016.c and pinctrl-apq8096.c do place the
      "pin_name" variable in the BSS section (since it's uninitialized).
      It's also used before relocation, when setting up the pinctrl for
      the serial driver.
      
      On DB410c this causes "GPIO_5" to be written into some part of an
      appended DTB, e.g.:
      
      80111820: edfe0dd0 9f100000 38000000 c00e0000    ...........8....
      80111830: 28000000 11000000 10000000 00000000    ...(............
      80111840: 4f495047 8800355f 00000000 00000000    GPIO_5..........
      80111850: 00000000 00000000 01000000 00000000    ................
      80111860: 03000000 04000000 00000000 02000000    ................
      80111870: 03000000 04000000 0f000000 02000000    ................
      80111880: 03000000 2d000000 1b000000 6c617551    .......-....Qual
      80111890: 6d6d6f63 63655420 6c6f6e68 6569676f    comm Technologie
      
      Depending on the part of the DTB that is corrupted this might not
      cause any problems, but it can also result in strange reboots
      without any serial output.
      
      Fortunately, in practice this does not cause issues on DB410c yet
      because board_fdt_blob_setup() in dragonboard410c.c currently
      overrides the appended DTB with the one passed by the previous
      bootloader (LK) (which does not get corrupted).
      
      DB820c does not have board_fdt_blob_setup() so I would expect it to
      be affected by this problem. Perhaps everyone was just fortunate to
      not compile an U-Boot configuration where the pin_name corrupts an
      important part of the DTB.
      
      Make sure "pin_name" is explicitly placed in the .data section
      instead of .bss to fix this.
      
      Cc: Ramon Fried <rfried.dev@gmail.com>
      Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
      Reviewed-by: default avatarRamon Fried <rfried.dev@gmail.com>
      548b89f8
    • Marek Vasut's avatar
      board-info: Call sysinfo_detect() before sysinfo_get_str() · 93e310c3
      Marek Vasut authored and Tom Rini's avatar Tom Rini committed
      
      The sysinfo_get_str() implementation checks whether the sysinfo was even
      detected. In U-Boot proper, sysinfo_detect() is not called anywhere but
      on one specific board. Call sysinfo_detect() before sysinfo_get_str() to
      make sure the sysinfo is detected and sysinfo_get_str() returns valid
      value instead of -EPERM.
      
      Signed-off-by: default avatarMarek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      93e310c3
    • Marek Vasut's avatar
      board-info: Use sysinfo_get() · 10f3e157
      Marek Vasut authored and Tom Rini's avatar Tom Rini committed
      
      Replace uclass_first_device_err(UCLASS_SYSINFO, &dev) with sysinfo_get(&dev).
      The board_info code may use sysinfo to print board information, so use the
      sysinfo functions consistently. The sysinfo_get() is internally implemented
      as return uclass_first_device_err(UCLASS_SYSINFO, &dev) anyway, so there is
      no functional change.
      
      Signed-off-by: default avatarMarek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      10f3e157
Loading