]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Tue, 25 Aug 2020 14:24:40 +0000 (10:24 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- Add basic Marvell/Cavium OcteonTX/TX2 support (Suneel)
- Infrastructure changes to PCI uclass to support these SoC's (Suneel)
- Add PCI, MMC & watchdog driver drivers for OcteonTX/TX2 (Suneel)
- Increase CONFIG_SYS_MALLOC_F_LEN for qemu-x86 (Stefan)

4 years agoMerge tag 'i2c-bugfixes-for-v2020.10' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Tue, 25 Aug 2020 12:19:41 +0000 (08:19 -0400)]
Merge tag 'i2c-bugfixes-for-v2020.10' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c

i2c bugfixes for v2020.10
- fix some issues with octeon_i2c driver on ARM Octeon TX2
- fix link failure with CONFIG_SPL and CONFIG_I2C_MUX_PCA954x

4 years agoMerge tag 'u-boot-rockchip-20200820' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Tue, 25 Aug 2020 12:19:14 +0000 (08:19 -0400)]
Merge tag 'u-boot-rockchip-20200820' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip

- Fix rk3399 evb sdcard support
- Fix for SPL_LED support

4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Tue, 25 Aug 2020 12:18:50 +0000 (08:18 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-riscv

- Sipeed Maix support S-mode.
- Provide command sbi.
- Use fdtdec_get_addr_size_auto_parent to get fu540 cache base address.
- Fix a compiler error with CONFIG_SPL_SMP=n.
- Fix sifive ram driver 32 compiler warnings.
- Fix kendryte/pll.h redefine nop() warning.

4 years agoMerge branch '2020-08-24-misc-improvements'
Tom Rini [Tue, 25 Aug 2020 00:24:21 +0000 (20:24 -0400)]
Merge branch '2020-08-24-misc-improvements'

- Squashfs compression support
- Coverity fixes
- XEN guest updates
- Finish previous MediaTek updates
- Arm Total Compute platform support

4 years agox86: qemu-x86_defconfig: Increase CONFIG_SYS_MALLOC_F_LEN
Stefan Roese [Tue, 25 Aug 2020 06:53:30 +0000 (08:53 +0200)]
x86: qemu-x86_defconfig: Increase CONFIG_SYS_MALLOC_F_LEN

With the upcoming increase of the malloc area in U-Boot
("pci: pci-uclass: Dynamically allocate the PCI regions"), the CI QEMU
x86 test fails:

U-Boot 2020.10-rc2-g0a668f6d38 (Aug 25 2020 - 06:12:51 +0000)

alloc space exhausted
Error binding driver 'cpu_qemu': -12
Some drivers failed to bind
alloc space exhausted
initcall sequence fff6a760 failed at call fff13b3d (err=-19)

This patch now increases CONFIG_SYS_MALLOC_F_LEN to 0x1000, which is
already used on qemu-x86_64_defconfig.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
4 years agoarm: octeontx2: Add support for OcteonTX2 SoC platforms
Suneel Garapati [Sun, 20 Oct 2019 01:47:37 +0000 (18:47 -0700)]
arm: octeontx2: Add support for OcteonTX2 SoC platforms

This patch adds support for all OcteonTX2 96xx/95xx
boards from Marvell.
For 96xx boards, use octeontx_96xx_defconfig and
for 95xx boards, use octeontx_95xx_defconfig.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
4 years agoarm: octeontx: Add support for OcteonTX SoC platforms
Suneel Garapati [Sun, 20 Oct 2019 01:37:55 +0000 (18:37 -0700)]
arm: octeontx: Add support for OcteonTX SoC platforms

This patch adds support for all OcteonTX 81xx/83xx
boards from Marvell.
For 81xx boards, use octeontx_81xx_defconfig and
for 83xx boards, use octeontx_83xx_defconfig.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
4 years agowatchdog: Add reset support for OcteonTX / TX2
Suneel Garapati [Mon, 21 Oct 2019 23:09:36 +0000 (16:09 -0700)]
watchdog: Add reset support for OcteonTX / TX2

Adds support for Core 0 watchdog poke on OcteonTX and OcteonTX2
platforms.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agommc: Add MMC controller driver for OcteonTX / TX2
Suneel Garapati [Sun, 20 Oct 2019 01:03:01 +0000 (18:03 -0700)]
mmc: Add MMC controller driver for OcteonTX / TX2

Adds support for MMC controllers found on OcteonTX or
OcteonTX2 SoC platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Cc: Peng Fan <peng.fan@nxp.com>
4 years agopci: Add PCI controller driver for OcteonTX / TX2
Suneel Garapati [Sun, 20 Oct 2019 00:28:01 +0000 (17:28 -0700)]
pci: Add PCI controller driver for OcteonTX / TX2

Adds support for PCI ECAM/PEM controllers found on OcteonTX
or OcteonTX2 SoC platforms.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
4 years agoata: ahci: Add BAR index quirk for Cavium PCI SATA device
Suneel Garapati [Sun, 20 Oct 2019 00:48:25 +0000 (17:48 -0700)]
ata: ahci: Add BAR index quirk for Cavium PCI SATA device

For SATA controller found on OcteonTX SoC's, use non-standard PCI BAR0
instead of BAR5.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoarm: octeontx2: Add headers for OcteonTX2
Suneel Garapati [Sun, 20 Oct 2019 01:35:54 +0000 (18:35 -0700)]
arm: octeontx2: Add headers for OcteonTX2

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
4 years agoarm: octeontx: Add headers for OcteonTX
Suneel Garapati [Sun, 20 Oct 2019 01:32:33 +0000 (18:32 -0700)]
arm: octeontx: Add headers for OcteonTX

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoarm: include/asm/io.h: Add 64bit clrbits and setbits helpers
Suneel Garapati [Sun, 20 Oct 2019 00:20:27 +0000 (17:20 -0700)]
arm: include/asm/io.h: Add 64bit clrbits and setbits helpers

Add 64bit API for clrbits and setbits.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agopci: pci-uclass: Check validity of ofnode
Suneel Garapati [Tue, 5 May 2020 04:25:25 +0000 (21:25 -0700)]
pci: pci-uclass: Check validity of ofnode

Add check if the referenced ofnode is valid.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
4 years agopci: pci-uclass: Add support for Alternate-RoutingID capability
Suneel Garapati [Thu, 24 Oct 2019 01:40:36 +0000 (18:40 -0700)]
pci: pci-uclass: Add support for Alternate-RoutingID capability

If ARI capability is found on device, use it to update next function
number in bus scan and also helps to skip unnecessary bdf scans.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
4 years agopci: pci-uclass: Add VF BAR map support for Enhanced Allocation
Suneel Garapati [Sat, 19 Oct 2019 23:34:16 +0000 (16:34 -0700)]
pci: pci-uclass: Add VF BAR map support for Enhanced Allocation

Makes dm_pci_map_bar API available to map BAR for Virtual function
PCI devices which support Enhanced Allocation.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
4 years agopci: pci-uclass: Add support for Single-Root I/O Virtualization
Suneel Garapati [Sat, 19 Oct 2019 23:07:20 +0000 (16:07 -0700)]
pci: pci-uclass: Add support for Single-Root I/O Virtualization

SR-IOV - Single Root I/O Virtualization
PF - Physical Function VF - Virtual Function

If SR-IOV capability is present, use it to initialize Virtual Function
PCI device instances. pci_sriov_init function will read SR-IOV
registers to create VF devices under the PF PCI device and also bind
driver if available. This function needs to be invoked from Physical
function device driver which expects VF device support, creating
minimal impact on existing framework.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
4 years agopci: pci-uclass: Add support for Enhanced Allocation in Bridges
Suneel Garapati [Sat, 19 Oct 2019 22:52:32 +0000 (15:52 -0700)]
pci: pci-uclass: Add support for Enhanced Allocation in Bridges

If Enhanced Allocation capability is present in bridges, use it
to read the fixed sub-ordinate bus number.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
4 years agopci: pci-uclass: Add multi entry support for memory regions
Suneel Garapati [Sun, 20 Oct 2019 00:10:20 +0000 (17:10 -0700)]
pci: pci-uclass: Add multi entry support for memory regions

Enable PCI memory regions in ranges property to be of multiple entry.
This helps to add support for SoC's like OcteonTX/TX2 where every
peripheral is on PCI bus.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
4 years agoLink failure with CONFIG_SPL and CONFIG_I2C_MUX_PCA954x
Trommel, Kees (Contractor) [Mon, 3 Aug 2020 14:49:47 +0000 (14:49 +0000)]
Link failure with CONFIG_SPL and CONFIG_I2C_MUX_PCA954x

Fix for the case of a U-Boot configuration with CONFIG_SPL,
CONFIG_I2C_MUX, CONFIG_I2C_MUX_PCA954x, no CONFIG_SPL_DM and no
CONFIG_SPL_I2C_MUX. Without this fix linking of pca954x fails because
dm_write_i2c does not exist because CONFIG_SPL_DM is not defined.

Signed-off-by: Kees Trommel <kees.trommel.contractor@draeger.com>
Cc: Heiko Schocher <hs@denx.de>
4 years agoi2c: octeon_i2c: Misc fixes for ARM Octeon TX2 support
Stefan Roese [Thu, 23 Jul 2020 12:09:36 +0000 (14:09 +0200)]
i2c: octeon_i2c: Misc fixes for ARM Octeon TX2 support

This patch fixes a few issues noticed, when testing this new driver on
ARM Octeon TX2 again. Here the details:

- Remove "common.h" header inclusion
- Use correct THP define on Octeon TX2
- Octeon TX2 uses the same compatible as Octeon TX. We can't distinguish
  both platforms this way. Remove the unused "cavium,thunder2-99xx-twsi"
  compatible and add a check to the Octeon TX2 specific
  "cavium,thunderx-i2c" so that the correct driver data is selected.
- Removed "struct pci_device_id" definition and U_BOOT_PCI_DEVICE()
  as its not needed for the PCI based probing on Octeon TX2

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Suneel Garapati <sgarapati@marvell.com>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agopci: pci-uclass: Make DT subnode parse optional
Suneel Garapati [Sat, 19 Oct 2019 23:02:48 +0000 (16:02 -0700)]
pci: pci-uclass: Make DT subnode parse optional

Parse subnode DT properties only if parent node is valid.
Otherwise, assert is triggered on ofnode_valid in ofnode_first_subnode
from dev_for_each_subnode.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
4 years agopci: pci-uclass: Fix incorrect argument in map_physmem
Suneel Garapati [Sat, 19 Oct 2019 23:44:35 +0000 (16:44 -0700)]
pci: pci-uclass: Fix incorrect argument in map_physmem

Fix argument ordering for map_physmem() called in dm_pci_map_ea_bar().
Additinally minor spelling correction.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
4 years agopci: pci-uclass: Dynamically allocate the PCI regions
Stefan Roese [Thu, 23 Jul 2020 14:34:10 +0000 (16:34 +0200)]
pci: pci-uclass: Dynamically allocate the PCI regions

Instead of using a fixed length pre-allocated array of regions, this
patch moves to dynamically allocating the regions based on the number
of available regions plus the necessary regions for DRAM banks.

Since MAX_PCI_REGIONS is not needed any more, its removed completely
with this patch.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
4 years agoARM: renesas: Drop unnecessary function ft_board_setup()
Stefan Roese [Thu, 6 Aug 2020 15:49:49 +0000 (17:49 +0200)]
ARM: renesas: Drop unnecessary function ft_board_setup()

Marek explained on IRC, that ft_board_setup() is not used / necessary
at all. So its best to just drop it completely, as it interferes with
the cleanup of CONFIG_MAX_PCI_REGIONS (completely removed).

Signed-off-by: Stefan Roese <sr@denx.de>
Suggested-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agopci: pci-uclass: Remove #ifdef CONFIG_NR_DRAM_BANKS as its always set
Stefan Roese [Thu, 23 Jul 2020 14:26:07 +0000 (16:26 +0200)]
pci: pci-uclass: Remove #ifdef CONFIG_NR_DRAM_BANKS as its always set

Since the migration to Kconfig, CONFIG_NR_DRAM_BANKS is configured for
all boards. Hence we can remove the conditional compilation and the code
path that will never get compiled.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
4 years agodm: core: Add API to read PCI bus-range property
Stefan Roese [Wed, 5 Aug 2020 11:56:11 +0000 (13:56 +0200)]
dm: core: Add API to read PCI bus-range property

Add dev_read_pci_bus_range() to read bus-range property values

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agofdtdec: Add API to read pci bus-range property
Suneel Garapati [Sat, 19 Oct 2019 22:19:35 +0000 (15:19 -0700)]
fdtdec: Add API to read pci bus-range property

Add fdtdec_get_pci_bus_range to read bus-range property
values.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agocmd: provide command sbi
Heinrich Schuchardt [Thu, 20 Aug 2020 17:43:39 +0000 (19:43 +0200)]
cmd: provide command sbi

Provide a command to display information about the SBI implementation.

The output might look like:

=> sbi
SBI 0.2
OpenSBI
Extensions:
  sbi_set_timer
  sbi_console_putchar
  sbi_console_getchar
  sbi_clear_ipi
  sbi_send_ipi
  sbi_remote_fence_i
  sbi_remote_sfence_vma
  sbi_remote_sfence_vma_asid
  sbi_shutdown
  SBI Base Functionality
  Timer Extension
  IPI Extension
  RFENCE Extension
  Hart State Management Extension

The command can be used to construct a unit test checking that the
communication with the SEE is working.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Tested-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@openfive.com>
Tested-by: Pragnesh Patel <pragnesh.patel@openfive.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Tested-by: Rick Chen <rick@andestech.com>
4 years agoconfigs: defconfig for Sipeed Maix in S-mode
Heinrich Schuchardt [Mon, 17 Aug 2020 10:35:39 +0000 (12:35 +0200)]
configs: defconfig for Sipeed Maix in S-mode

Provide a defconfig that can be used to build U-Boot for the Maix boards
running upon OpenSBI.

Update the documentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
4 years agoriscv: fix building with CONFIG_SPL_SMP=n
Heinrich Schuchardt [Sat, 15 Aug 2020 07:49:26 +0000 (09:49 +0200)]
riscv: fix building with CONFIG_SPL_SMP=n

Building with CONFIG_SPL_SMP=n results in:

arch/riscv/lib/spl.c: In function ‘jump_to_image_no_args’:
arch/riscv/lib/spl.c:33:6:
error: unused variable ‘ret’ [-Werror=unused-variable]
   33 |  int ret;
      |      ^~~

Define the variable ret as __maybe_unused.

Fixes: 191636e44898 ("riscv: Introduce SPL_SMP Kconfig option for U-Boot SPL")
Fixes: 8c59f2023cc8 ("riscv: add SPL support")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@openfive.com>
4 years agoclk: kendryte/pll.h: do not redefine nop()
Heinrich Schuchardt [Tue, 28 Jul 2020 15:52:23 +0000 (17:52 +0200)]
clk: kendryte/pll.h: do not redefine nop()

The kendryte PLL code uses nop as barrier. The macro is not defined for
the sandbox on x86 but is defined on RISC-V.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
4 years agoram: sifive: Fix compiler warnings for 32-bit
Bin Meng [Tue, 18 Aug 2020 08:09:21 +0000 (01:09 -0700)]
ram: sifive: Fix compiler warnings for 32-bit

priv->info.size is of type 'size_t' but the length modifier is l.
Fix this by casting priv->info.size. Note 'z' cannot be used as
the modifier as SPL does not support that.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@openfive.com>
4 years agoriscv: fu540: Use correct API to get L2 cache controller base address
Bin Meng [Tue, 18 Aug 2020 08:09:20 +0000 (01:09 -0700)]
riscv: fu540: Use correct API to get L2 cache controller base address

At present fdtdec_get_addr() is used to get L2 cache controller base
address. This only works for a fixed #address-cells and #size-cells.
Change to use fdtdec_get_addr_size_auto_parent() instead.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@openfive.com>
4 years agoMerge tag 'efi-2020-10-rc3-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Mon, 24 Aug 2020 21:28:18 +0000 (17:28 -0400)]
Merge tag 'efi-2020-10-rc3-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-10-rc3 (3)

The following bug fixes are contained in this pull-request:

* ResetSystem() should no hang if not implemented.
* Device paths in Bootxxxx variables should be verified.
* Use ':' as separator for command setenv -e -i instead of ','.
* Correct comments for functions.
* Update UEFI documentation.

4 years agoxen: Code style conformity
Anastasiia Lukianenko [Fri, 21 Aug 2020 09:10:04 +0000 (12:10 +0300)]
xen: Code style conformity

Cleaning up the following:

ERROR: do not use assignment in if condition
#281: FILE: drivers/xen/pvblock.c:260:
+       if ((err = xenbus_switch_state(XBT_NIL, nodename,
CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "err"
#52: FILE: drivers/xen/pvblock.c:298:
+       if (err != NULL) {
ERROR: do not use assignment in if condition
#176: FILE: drivers/xen/gnttab.c:103:
+               if ((flags = nflags) & (GTF_reading | GTF_writing)) {
WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
#329: FILE: include/xen/gnttab.h:1:
+/*
WARNING: Misplaced SPDX-License-Identifier tag - use line 1 instead
#330: FILE: include/xen/gnttab.h:2:
+ * SPDX-License-Identifier: GPL-2.0
ERROR: do not use assignment in if condition
#630: FILE: lib/sscanf.c:558:
+                               if ((n = inr) < width) {

Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoboard: xen: Remove unnecessary CONFIG_INITRD_TAG and CONFIG_CMDLINE_TAG
Anastasiia Lukianenko [Fri, 21 Aug 2020 09:10:03 +0000 (12:10 +0300)]
board: xen: Remove unnecessary CONFIG_INITRD_TAG and CONFIG_CMDLINE_TAG

Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoboard: xen: Remove CONFIG_CMD_RUN define and clean xenguest_arm64_defconfig
Anastasiia Lukianenko [Fri, 21 Aug 2020 09:10:02 +0000 (12:10 +0300)]
board: xen: Remove CONFIG_CMD_RUN define and clean xenguest_arm64_defconfig

CONFIG_CMD_RUN is set on by default in Kconfig.
Create xenguest_arm64_defconfig by using savedefconfig to avoid unnecessary
options.

Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoMAINTAINERS: Add maintainers to XEN section
Anastasiia Lukianenko [Fri, 21 Aug 2020 09:10:01 +0000 (12:10 +0300)]
MAINTAINERS: Add maintainers to XEN section

Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoboard: xen: Remove unnecessary CONFIG_BOARD_EARLY_INIT_F define and board_early_init_...
Anastasiia Lukianenko [Fri, 21 Aug 2020 09:10:00 +0000 (12:10 +0300)]
board: xen: Remove unnecessary CONFIG_BOARD_EARLY_INIT_F define and board_early_init_f function

Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agoarm: dts: mt7623: add USB nodes
Frank Wunderlich [Thu, 20 Aug 2020 14:37:58 +0000 (16:37 +0200)]
arm: dts: mt7623: add USB nodes

This adds USB nodes for MT7623/BPI-R2

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
4 years agoarm: dts: mt7622: add USB nodes
Frank Wunderlich [Thu, 20 Aug 2020 14:37:57 +0000 (16:37 +0200)]
arm: dts: mt7622: add USB nodes

Add DTS nodes for MT7622/BPI-R64

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
4 years agoarm: dts: rename mt7622-bpi-r64.dts
Frank Wunderlich [Thu, 20 Aug 2020 14:37:56 +0000 (16:37 +0200)]
arm: dts: rename mt7622-bpi-r64.dts

rename mt7622-bpi-r64.dts to mt7622-bananapi-bpi-r64.dts
to follow naming convensions

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
4 years agoclk: mt7622: add needed clocks for ssusb-node
Frank Wunderlich [Thu, 20 Aug 2020 14:37:55 +0000 (16:37 +0200)]
clk: mt7622: add needed clocks for ssusb-node

MT7622 needs additional clock definitions to work properly

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
4 years agoahci: mediatek: fix copyright and author-lines
Frank Wunderlich [Thu, 20 Aug 2020 14:37:54 +0000 (16:37 +0200)]
ahci: mediatek: fix copyright and author-lines

after review of sam copyright should be on one line and link should
not between author lines

just remove the link and put ryder first as he is author of linux-driver

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
4 years agoreset: drop unnecessary comment for pciesys
Frank Wunderlich [Thu, 20 Aug 2020 14:37:53 +0000 (16:37 +0200)]
reset: drop unnecessary comment for pciesys

after review from sam this comment should be removed

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
4 years agophy: mtk-tphy: make shared reg optional for v1
Frank Wunderlich [Thu, 20 Aug 2020 14:37:52 +0000 (16:37 +0200)]
phy: mtk-tphy: make shared reg optional for v1

make the shared reg optional when version is v1 for sata

Suggested-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
4 years agofs/squashfs: Fix Coverity Scan defects
Joao Marcos Costa [Wed, 19 Aug 2020 16:28:41 +0000 (18:28 +0200)]
fs/squashfs: Fix Coverity Scan defects

Fix defects such as uninitialized variables and untrusted pointer
operations. Most part of the tainted variables and the related defects
actually comes from Linux's macro get_unaligned_le**, extensively used
in SquashFS code. Add sanity checks for those variables.

Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
4 years agovirtio_blk: set log2blksz correctly
AKASHI Takahiro [Wed, 19 Aug 2020 09:07:32 +0000 (18:07 +0900)]
virtio_blk: set log2blksz correctly

'log2blksz' in blk_desc structure must always be initialized, otherwise
it will cause a lot of weird failures in file operations.

For example, fs_set_blk_dev[_with_part]() examines a block device against
every file system with its probe function. In particular, ext4 file
system's ext4_probe() will calls fs_devread() to fetch a super block.
If log2blksz is 0, the actual 'read' size, i.e. block_len >> log2blksz, is
much bigger than a buffer's size, and it can end up with memory corruption.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Fixes: f4802209e59d ("virtio: Add block driver support")
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agotest/py: Add tests for LZO and ZSTD
Joao Marcos Costa [Tue, 18 Aug 2020 15:17:25 +0000 (17:17 +0200)]
test/py: Add tests for LZO and ZSTD

Improve SquashFS tests architecture. Add 'Compression' class. LZO
algorithm may crash if the file is fragmented, so the fragments are
disabled when testing LZO.

Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
4 years agofs/squashfs: add support for LZO decompression
Joao Marcos Costa [Tue, 18 Aug 2020 15:17:24 +0000 (17:17 +0200)]
fs/squashfs: add support for LZO decompression

Add call to lzo's lzo1x_decompress_safe() into sqfs_decompress().

U-Boot's LZO sources may still have some unsolved issues that could make the
decompression crash when dealing with fragmented files, so those should be
avoided. The "-no-fragments" option can be passed to mksquashfs.

Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
4 years agofs/squashfs: add support for ZSTD decompression
Joao Marcos Costa [Tue, 18 Aug 2020 15:17:23 +0000 (17:17 +0200)]
fs/squashfs: add support for ZSTD decompression

Add call to ZSTD's ZSTD_decompressDCtx(). In this use case, the caller
can upper bound the decompressed size, which will be the SquashFS data
block (or metadata block) size, so there is no need to use streaming
API. Add ZSTD's worskpace to squashfs_ctxt structure.

Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
4 years agofs/squashfs: replace sqfs_decompress() parameter
Joao Marcos Costa [Tue, 18 Aug 2020 15:17:22 +0000 (17:17 +0200)]
fs/squashfs: replace sqfs_decompress() parameter

Replace 'u16 comp_type' by a reference to squashfs_ctxt structure.

Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
4 years agofs/squashfs: Add init and clean-up functions to decompression
Joao Marcos Costa [Tue, 18 Aug 2020 15:17:21 +0000 (17:17 +0200)]
fs/squashfs: Add init and clean-up functions to decompression

Add sqfs_decompressor_init() and sqfs_decompressor_cleanup(). These
functions are called respectively in sqfs_probe() and sqfs_close(). For
now, only ZSTD requires an initialization logic. ZSTD support will be
added in a follow-up commit.

Move squashfs_ctxt definition to sqfs_filesystem.h. This structure is
passed to sqfs_decompressor_init() and sqfs_decompressor_cleanup(), so
it can no longer be local to sqfs.c.

Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
4 years agocmd: fix clone coverity scan
John Chau [Mon, 17 Aug 2020 07:53:01 +0000 (15:53 +0800)]
cmd: fix clone coverity scan

This patch fixes coverity scan MISSING_BREAK issues, and also an error
on block size check.

Signed-off-by: John Chau <john@harmon.hk>
4 years agofirmware: psci: Do not bind driver if U-Boot runs in EL3
Michal Simek [Thu, 13 Aug 2020 10:43:22 +0000 (12:43 +0200)]
firmware: psci: Do not bind driver if U-Boot runs in EL3

There is no reason to bind psci driver if U-Boot runs in EL3 because
SMC/HVC instructions can't be called. That's why detect this state and
don't let user to crash from prompt by performing reset or poweroff
commands (if enabled).

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoboard: armltd: Add support for Total Compute platform
Usama Arif [Wed, 12 Aug 2020 15:12:53 +0000 (16:12 +0100)]
board: armltd: Add support for Total Compute platform

Total Compute is based on ARM architecture and has
the following features enabled in u-boot:
- PL011 UART
- PL180 MMC
- NOR Flash
- FIT image with Signature
- AVB

Signed-off-by: Usama Arif <usama.arif@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agoavb: Make AVB independent of fastboot
Usama Arif [Tue, 11 Aug 2020 14:46:03 +0000 (15:46 +0100)]
avb: Make AVB independent of fastboot

AVB only uses CONFIG_FASTBOOT_BUF_ADDR from fastboot for memory.
This memory is used for assigning temporary buffers.
This can be assigned a new variable and used as CONFIG_AVB_BUF_ADDR.
This is to support future boards that support AVB but dont support
USB and therefore dont support FASTBOOT.

Signed-off-by: Usama Arif <usama.arif@arm.com>
Cc: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Igor Opaniuk <igor.opaniuk@gmail.com>
[trini: Change defaults]
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoefi_loader: use ':' as separator for setenv -i
Heinrich Schuchardt [Mon, 24 Aug 2020 06:27:49 +0000 (08:27 +0200)]
efi_loader: use ':' as separator for setenv -i

setenv -e -i <address>,<filesize> can be used to set a UEFI variable
from memory.

For separating an address and a size we use ':' in most commands.
Let's do the same for setenv -e -i.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: validate device path length in boot manager
Heinrich Schuchardt [Sun, 23 Aug 2020 08:59:17 +0000 (10:59 +0200)]
efi_loader: validate device path length in boot manager

Bootxxxx variables are provided by the user and therefore cannot be
trusted. We have to validate them before usage.

A device path provided by a Bootxxxx variable must have an end node within
the indicated device path length.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agotest: unit test for efi_dp_check_length()
Heinrich Schuchardt [Sun, 23 Aug 2020 08:53:50 +0000 (10:53 +0200)]
test: unit test for efi_dp_check_length()

Provide a unit test for function efi_dp_check_length().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: efi_dp_check_length()
Heinrich Schuchardt [Sun, 23 Aug 2020 08:49:46 +0000 (10:49 +0200)]
efi_loader: efi_dp_check_length()

We need to check that device paths provided via UEFI variables are not
malformed.

Provide function efi_dp_check_length() to check if a device path has an
end node within a given number of bytes.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoinclude: kernel.h: define SSIZE_MAX
Heinrich Schuchardt [Sun, 23 Aug 2020 07:54:44 +0000 (09:54 +0200)]
include: kernel.h: define SSIZE_MAX

Define SSIZE_MAX, the largest value fitting into a variable of type
ssize_t.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_selftest: substitute ResetSystem() by do_reset()
Heinrich Schuchardt [Sat, 22 Aug 2020 07:14:56 +0000 (09:14 +0200)]
efi_selftest: substitute ResetSystem() by do_reset()

If ResetSystem() is not implemented at runtime, call do_reset() after
test completion.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_selftest: add a test for ResetSystem()
Heinrich Schuchardt [Thu, 20 Aug 2020 10:16:54 +0000 (12:16 +0200)]
efi_selftest: add a test for ResetSystem()

The unit test will reset the system by calling the ResetSystem() runtime
service before or after ExitBootServices() according to the users choice
by setting environment variable efi_selftest to:

* 'reset system' or
* 'reset system runtime'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: ResetSystem() should not hang
Heinrich Schuchardt [Sat, 22 Aug 2020 06:29:53 +0000 (08:29 +0200)]
efi_loader: ResetSystem() should not hang

If ResetSystem() is not implemented at runtime, it should return instead
of hanging in an endless loop. This allows the operating system to reset
the system by other means as Linux does. It also matches what EDK II
suggests in comments for functions ResetShutdown() and ResetWarm() in
OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agodoc: update UEFI documentation
Heinrich Schuchardt [Sun, 16 Aug 2020 10:27:19 +0000 (12:27 +0200)]
doc: update UEFI documentation

* UEFI variables can be persisted
* describe that the sequence of files loaded before bootefi matters

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: remove empty comment line
Heinrich Schuchardt [Sat, 15 Aug 2020 21:09:35 +0000 (23:09 +0200)]
efi_loader: remove empty comment line

Remove a line leading to a warning in make htmldocs.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: document parameters of do_bootefi_exec()
Heinrich Schuchardt [Sat, 15 Aug 2020 21:10:22 +0000 (23:10 +0200)]
efi_loader: document parameters of do_bootefi_exec()

Add the missing description of the load_options parameter.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMerge tag 'u-boot-clk-24Aug2020' of https://gitlab.denx.de/u-boot/custodians/u-boot-clk
Tom Rini [Mon, 24 Aug 2020 13:06:02 +0000 (09:06 -0400)]
Merge tag 'u-boot-clk-24Aug2020' of https://gitlab.denx.de/u-boot/custodians/u-boot-clk

- Add CCF clocks definitions for iMX6Q enet (ETH)
- Several fixes for CCF framework - the most notable is the one, which
  adds get_rate helper to clk-mux.c
- Improvements for clk command - better visibility and alignment.

4 years agoclk: ccf: Add missing #include <dm/uclass.h> to clk-mux.c
Lukasz Majewski [Mon, 24 Aug 2020 09:12:18 +0000 (11:12 +0200)]
clk: ccf: Add missing #include <dm/uclass.h> to clk-mux.c

After adding custom get_rate helper function it was necessary to include
<dm/uclass.h> to avoid warnings about missing uclass_get_device_by_name.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Series-to: u-boot
4 years agocmd: clk: correctly handle depth for clk dump
Patrick Delaunay [Thu, 30 Jul 2020 12:04:10 +0000 (14:04 +0200)]
cmd: clk: correctly handle depth for clk dump

Update depth only when clock uclass is found to have correct display
of command "clk dump".

Without this patch, the displayed depth is the binding depth for
all the uclass and that can be strange as only clock uclass nodes
are displayed.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agocmd: clk: cosmetic: correct code alignment in show_clks
Patrick Delaunay [Thu, 30 Jul 2020 12:04:09 +0000 (14:04 +0200)]
cmd: clk: cosmetic: correct code alignment in show_clks

Correct code alignment in show_clks() function.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoclk: ccf: mux: change the get_rate helper
Dario Binacchi [Wed, 3 Jun 2020 13:36:25 +0000 (15:36 +0200)]
clk: ccf: mux: change the get_rate helper

The previous version of the get_rate helper does not work if the mux
clock parent is changed after the probe. This error has not been
detected because this condition has not been tested. The error occurs
because the set_parent helper does not change the parent of the clock
device but only the clock selection register. Since changing the parent
of a probed device can be tricky, the new version of the get_rate helper
provides the rate of the selected clock and not that of the parent.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
4 years agoclk: ccf: mux: fix access to the sandbox register
Dario Binacchi [Sat, 2 May 2020 15:58:33 +0000 (17:58 +0200)]
clk: ccf: mux: fix access to the sandbox register

The tests developed for the mux clock are run on the sandbox. They don't
call the clk_mux_set_parent routine and therefore they do not detect
this error.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
4 years agoclk: ccf: mux: fix typo
Dario Binacchi [Sat, 2 May 2020 15:58:32 +0000 (17:58 +0200)]
clk: ccf: mux: fix typo

Close the opening bracket.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
4 years agoclk: ccf: mux: change include order
Dario Binacchi [Sat, 2 May 2020 15:58:31 +0000 (17:58 +0200)]
clk: ccf: mux: change include order

Apply u-boot coding style on include files order.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
4 years agoclk: fix the console output of clk_register
Dario Binacchi [Sat, 2 May 2020 15:38:11 +0000 (17:38 +0200)]
clk: fix the console output of clk_register

The parent->name variable can be used only in case the
uclass_get_device_by_name routine returns successfully.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
4 years agoclk: set flags in the ccf registration routines
Dario Binacchi [Mon, 13 Apr 2020 12:36:27 +0000 (14:36 +0200)]
clk: set flags in the ccf registration routines

The top-level framework flags are passed as parameter to the common
clock framework (ccf) registration routines without being used.
Checks of the flags setting added by the patch have been added in the
ccf test.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
4 years agodm: test: clk: add the test for the ccf gated clock
Dario Binacchi [Mon, 13 Apr 2020 12:36:26 +0000 (14:36 +0200)]
dm: test: clk: add the test for the ccf gated clock

Unlike the other clock types, in the case of the gated clock, a new
driver has been developed which does not use the registering routine
provided by the common clock framework.
The addition of the ecspi0 clock to sandbox therefore allows testing
the ccf gate clock.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoclk: imx6: Add definition for IMX6QDL_CLK_ENET_REF clock
Lukasz Majewski [Mon, 24 Feb 2020 13:55:26 +0000 (14:55 +0100)]
clk: imx6: Add definition for IMX6QDL_CLK_ENET_REF clock

After commit 673f6597321d ("net: fec_mxc: support i.MX8M with CLK_CCF") all
NXP boards, which are not IMX8 and in the same time are supporting CCF need
to provide PTP clock.

On the i.MX6Q this clock is provided with IMX6QDL_CLK_ENET_REF in the Linux
kernel's CCF.

Code in this change models the simplest case when enet reference clock is
generated from 'osc' clock.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agoclk: imx: Add support for pllv3 enet clock
Lukasz Majewski [Mon, 24 Feb 2020 13:55:25 +0000 (14:55 +0100)]
clk: imx: Add support for pllv3 enet clock

This code has been ported from Linux kernel v5.5.5 (tag) and has been
adjusted to U-Boot's DM.

It adds support for correct recognition of IMX_PLLV3_ENET flag in the
clk-pllv3.c driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agoclk: imx6: Add definition for IMX6QDL_CLK_ENET clock
Lukasz Majewski [Mon, 24 Feb 2020 13:55:24 +0000 (14:55 +0100)]
clk: imx6: Add definition for IMX6QDL_CLK_ENET clock

After commit 673f6597321d ("net: fec_mxc: support i.MX8M with CLK_CCF") all
NXP boards, which are not IMX8 and in the same time are supporting CCF
need to provide IMX6QDL_CLK_ENET.

This change defines the missing clock in i.MX6Q's CCF.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agoclk: ICS8N3QV01 remove superfluous code
Heinrich Schuchardt [Sat, 15 Feb 2020 20:27:38 +0000 (21:27 +0100)]
clk: ICS8N3QV01 remove superfluous code

Do not calculate a unused value of n which is overwritten in both branches
of the subsequent if statement.

Identified by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
4 years agoMerge tag 'dm-pull-22aug20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Sun, 23 Aug 2020 20:06:38 +0000 (16:06 -0400)]
Merge tag 'dm-pull-22aug20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

replace devfdt_get_addr_ptr() with dev_read_addr_ptr()
binman fixes for portage
various minor fixes
'bind' command improvements

4 years agoMerge branch '2020-08-21-stdio-cleanup'
Tom Rini [Sun, 23 Aug 2020 19:53:10 +0000 (15:53 -0400)]
Merge branch '2020-08-21-stdio-cleanup'

- Clean up common/stdio.c and migrate some related options to Kconfig

4 years agostdio: Tidy up the coding style
Simon Glass [Tue, 11 Aug 2020 17:23:41 +0000 (11:23 -0600)]
stdio: Tidy up the coding style

Bring the coding style in this file up to the current level.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agostdio: Drop brackets around &devs.list
Simon Glass [Tue, 11 Aug 2020 17:23:40 +0000 (11:23 -0600)]
stdio: Drop brackets around &devs.list

These brackets are not needed. Drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agostdio: Update to use compiler for Kconfig checks
Simon Glass [Tue, 11 Aug 2020 17:23:39 +0000 (11:23 -0600)]
stdio: Update to use compiler for Kconfig checks

Drop use of the preprocessor where possible.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agostdio: Drop #ifdefs in the header file
Simon Glass [Tue, 11 Aug 2020 17:23:38 +0000 (11:23 -0600)]
stdio: Drop #ifdefs in the header file

These prevent the use of IS_ENABLED() and are unnecessary. Drop them and
fix a few code-style nits nearby.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agostdio: Tidy up use of CONFIG_SYS_DEVICE_NULLDEV
Simon Glass [Tue, 11 Aug 2020 17:23:37 +0000 (11:23 -0600)]
stdio: Tidy up use of CONFIG_SYS_DEVICE_NULLDEV

Now that this is in Kconfig we can move the logic at the top of the file
to Kconfig, and use if() instead of #if. Update the file with these
changes.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoConvert CONFIG_SYS_DEVICE_NULLDEV to Kconfig
Simon Glass [Tue, 11 Aug 2020 17:23:36 +0000 (11:23 -0600)]
Convert CONFIG_SYS_DEVICE_NULLDEV to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_DEVICE_NULLDEV

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoConvert CONFIG_SPLASH_SCREEN et al to Kconfig
Simon Glass [Tue, 11 Aug 2020 17:23:35 +0000 (11:23 -0600)]
Convert CONFIG_SPLASH_SCREEN et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SPLASH_SCREEN
   CONFIG_SPLASH_SCREEN_ALIGN
   CONFIG_SPLASHIMAGE_GUARD
   CONFIG_SPLASH_SOURCE

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agomoveconfig: Skip binary and ELF files
Simon Glass [Tue, 11 Aug 2020 17:23:34 +0000 (11:23 -0600)]
moveconfig: Skip binary and ELF files

Add a few more file extensions to the list of files that should not be
processed. This avoids unicode errors, for example.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoConvert CONFIG_NETCONSOLE to Kconfig
Tom Rini [Sun, 23 Aug 2020 17:06:36 +0000 (13:06 -0400)]
Convert CONFIG_NETCONSOLE to Kconfig

This converts the following to Kconfig:
   CONFIG_NETCONSOLE

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agosandbox: u-boot.lds: Remove bogus __bss_start symbol
Ovidiu Panait [Mon, 17 Aug 2020 18:27:51 +0000 (21:27 +0300)]
sandbox: u-boot.lds: Remove bogus __bss_start symbol

The sections described in the sandbox linker script are inserted before
data section via "INSERT BEFORE .data;". Running readelf -S on sandbox
u-boot binary shows that the bss section is located after the data
section:

  Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
  ...
  [25] .u_boot_list      PROGBITS         000000000041d1c8  0021d1c8
       000000000000dd90  0000000000000000  WA       0     0     8
  [26] _u_boot_sandbox_g PROGBITS         000000000042af58  0022af58
       00000000000000a0  0000000000000000  WA       0     0     8
  [27] .data             PROGBITS         000000000042b000  0022b000
       000000000000f708  0000000000000000  WA       0     0     32
  [28] .bss              NOBITS           000000000043a720  0023a708
       0000000000018930  0000000000000000  WA       0     0     32

This means that the __bss_start assignment in the linker script is bogus,
as the actual bss section start is located elsewhere. Remove this
assignment, as the __bss_start symbol is not used on sandbox anyway.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
4 years agoboard_f: Remove dead code from init_func_i2c
Ovidiu Panait [Mon, 17 Aug 2020 18:27:50 +0000 (21:27 +0300)]
board_f: Remove dead code from init_func_i2c

Since commit 69153988a6f4 ("i2c: Finish dropping use of CONFIG_I2C_HARD")
init_func_i2c is wrapped only by "#if defined(CONFIG_SYS_I2C)". Because
of this, the second ifdef within becomes pointless:

 #if defined(CONFIG_SYS_I2C)
 static int init_func_i2c(void)
 <snip>
     #ifdef CONFIG_SYS_I2C
         ...
     #else
         ...
     #endif
 <snip>
 }
 #endif

Remove the dead #else preprocessor code.

Fixes: 69153988a6f ("i2c: Finish dropping use of CONFIG_I2C_HARD")
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
4 years agobinman: Add a setup script for Python
Simon Glass [Wed, 5 Aug 2020 19:27:49 +0000 (13:27 -0600)]
binman: Add a setup script for Python

Allow binman to be installed by adding a suitable setup.py script.

Signed-off-by: Simon Glass <sjg@chromium.org>