platform/kernel/u-boot-spacemit.git
2 years agobinman: bintool: parametrize args to pass to binary for returning version
Quentin Schulz [Thu, 1 Sep 2022 15:51:40 +0000 (17:51 +0200)]
binman: bintool: parametrize args to pass to binary for returning version

The code to check the version is very similar between binaries, the most
likely only needed variables are the regex to find the version (already
supported) and the args to pass to the binary so that it prints this
version (e.g. --version, -V or similar).

Let's make it a parameter of Bintool so that code duplication can be
avoided for simple changes.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2 years agobinman: btool: mkimage: use Bintool.version
Quentin Schulz [Thu, 1 Sep 2022 15:51:39 +0000 (17:51 +0200)]
binman: btool: mkimage: use Bintool.version

Bintool.version already contains everything required to get the version
out of mkimage binary so let's not override it with its own
implementation.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: btool: lz4: use Bintool.version
Quentin Schulz [Thu, 1 Sep 2022 15:51:38 +0000 (17:51 +0200)]
binman: btool: lz4: use Bintool.version

Bintool.version already contains everything required to get the version
out of lz4 binary so let's not override it with its own implementation.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: bintool: move version check implementation into bintool class
Quentin Schulz [Thu, 1 Sep 2022 15:51:37 +0000 (17:51 +0200)]
binman: bintool: move version check implementation into bintool class

Version checking has nothing specific to compression/decompression tools
so let's move it to the Bintool class.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: btool: gzip: fix packer name so that binary can be found
Quentin Schulz [Wed, 31 Aug 2022 15:55:14 +0000 (17:55 +0200)]
binman: btool: gzip: fix packer name so that binary can be found

The binary is looked on the system by the suffix of the packer class.
This means binman was looking for btool_gzip on the system and not gzip.

Therefore, let's pass "gzip" as the name so that it can be found and
used.

Fixes: 0f369d79925a ("binman: Add gzip bintool")
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoMerge branch '2022-08-31-assorted-fixes'
Tom Rini [Wed, 31 Aug 2022 23:32:31 +0000 (19:32 -0400)]
Merge branch '2022-08-31-assorted-fixes'

- Assorted bugfixes including re-working the i2c command CVE and fixing
  some TI reference platforms with different EEPROMs.

2 years agoarm: smh: Fix uninitialized parameters with newer GCCs
Sean Anderson [Tue, 30 Aug 2022 20:32:27 +0000 (16:32 -0400)]
arm: smh: Fix uninitialized parameters with newer GCCs

Newer versions of GCC won't initialize parts of structures which don't
appear to be used. This results in uninitialized semihosting parameters
passed via R1. Fix this by marking the inline assembly as clobbering
memory.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agotools: mkimage: fix build with recent LibreSSL
Mark Kettenis [Mon, 29 Aug 2022 11:34:01 +0000 (13:34 +0200)]
tools: mkimage: fix build with recent LibreSSL

LibreSSL 3.5.0 and later (also shipped as part of OpenBSD 7.1 and
and later) have an opaque RSA object and do provide the
RSA_get0_* functions that OpenSSL provides.

Fixes: 2ecc354b8e46 ("tools: mkimage: fix build with LibreSSL")
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Jonathan Gray <jsg@jsg.id.au>
2 years agobootm: Fix upper bound of FDT overlap checks
Pali Rohár [Sat, 27 Aug 2022 12:48:10 +0000 (14:48 +0200)]
bootm: Fix upper bound of FDT overlap checks

FTD blob can be put immediately after the OS image.
So use strict inequality for start address check.

Fixes: fbde7589ce30 ("common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS image")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoimage-fit: don't set compression if it can't be read
Daniel Golle [Sat, 27 Aug 2022 03:17:28 +0000 (04:17 +0100)]
image-fit: don't set compression if it can't be read

fit_image_get_comp() should not set value -1 in case it can't read
the compression node. Instead, leave the value untouched in that case
as it can be absent and a default value previously defined by the
caller of fit_image_get_comp() should be used.

As a result the warning message
WARNING: 'compression' nodes for ramdisks are deprecated, please fix your .its file!
no longer shows if the compression node is actually absent.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobootm: fix typo imape_comp -> image_comp
Daniel Golle [Sat, 27 Aug 2022 03:14:42 +0000 (04:14 +0100)]
bootm: fix typo imape_comp -> image_comp

Change variable name 'imape_comp' to the supposedly intended name
'image_comp'.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agocorenet_ds.h: Remove
Tom Rini [Fri, 26 Aug 2022 14:53:36 +0000 (10:53 -0400)]
corenet_ds.h: Remove

This was missed when removing the platform.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoi2c: fix stack buffer overflow vulnerability in i2c md command
Marek Vasut [Fri, 26 Aug 2022 21:15:56 +0000 (23:15 +0200)]
i2c: fix stack buffer overflow vulnerability in i2c md command

This reinstates fix from commit 8f8c04bf1ebb ("i2c: fix stack buffer
overflow vulnerability in i2c md command") without the changes unrelated
to the actual fix. Avoid the underflow by setting only nbytes and
linebytes as unsigned integers.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Nicolas Iooss <nicolas.iooss+uboot@ledger.fr>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tim Harvey <tharvey@gateworks.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
2 years agoRevert "i2c: fix stack buffer overflow vulnerability in i2c md command"
Marek Vasut [Fri, 26 Aug 2022 21:15:55 +0000 (23:15 +0200)]
Revert "i2c: fix stack buffer overflow vulnerability in i2c md command"

This reverts commit 8f8c04bf1ebbd2f72f1643e7ad9617dafa6e5409.

The commit is largely wrong and breaks most of i2c command functionality.
The problem described in the aforementioned commit commit message is valid,
however the commit itself does many more changes unrelated to fixing that
one problem it describes. Those extra changes, namely the handling of i2c
device address length as unsigned instead of signed integer, breaks the
expectation that address length may be negative value. The negative value
is used by DM to indicate that address length of device does not change.

The actual bug documented in commit 8f8c04bf1ebbd2f72f1643e7ad9617dafa6e5409
can be fixed by extra sanitization in separate patch.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Nicolas Iooss <nicolas.iooss+uboot@ledger.fr>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agospl: ahci: Fix dependency for SPL_AHCI_PCI
Oleksandr Suvorov [Thu, 25 Aug 2022 17:03:51 +0000 (20:03 +0300)]
spl: ahci: Fix dependency for SPL_AHCI_PCI

The option SPL_SATA_SUPPORT is renamed to SPL_SATA. Fix the option
name.

Fixes: 73059529b20 ("ata: ahci-pci: Add new option CONFIG_SPL_AHCI_PCI")
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Acked-by: Pali Rohár <pali@kernel.org>
2 years agofs: fix comment typo
Roger Knecht [Thu, 25 Aug 2022 12:12:01 +0000 (12:12 +0000)]
fs: fix comment typo

Fix typo in include/fs.h

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Roger Knecht <rknecht@pm.me>
2 years agokbuild: add KBUILD_HOSTLDFLAGS to cmd_host-csingle
Heiko Thiery [Wed, 24 Aug 2022 08:37:23 +0000 (10:37 +0200)]
kbuild: add KBUILD_HOSTLDFLAGS to cmd_host-csingle

When compiling executables from a single.c file, the linker is also
invoked. Pass the flags like the other linker commands.

cherry-pick kbuild change from Linux:

63185b46cdb3 (kbuild: use HOSTLDFLAGS for single .c executables)

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoboard: ti: common: board_detect: Fix EEPROM read quirk
Matwey V. Kornilov [Tue, 23 Aug 2022 16:05:34 +0000 (19:05 +0300)]
board: ti: common: board_detect: Fix EEPROM read quirk

There are three different kinds of EEPROM possibly present on boards.
  1. 1byte address. For those we should avoid 2byte address in order
     not to rewrite the data. Second byte of the address can potentially
     be interpreted as the data to write.
  2. 2byte address with defined behaviour. When we try to use 1byte
     address they just return "FF FF FF FF ... FF"
  3. 2byte address with undefined behaviour (for instance, 24LC32AI).
     When we try to use 1byte address, then their internal read
     pointer is changed to some value. Subsequential reads may be
     broken.

To gracefully handle both case #1 and case #3 we read all required
data from EEPROM at once (about 80 bytes). So either all the data is
valid or we fallback to 2byte address.

Cc: Nishanth Menon <nm@ti.com>
Fixes: a58147c2dbbf ("board: ti: common: board_detect: Do 1byte address checks first.")
Reference: https://lore.kernel.org/all/CAJs94Ebdd4foOjhGFu9Bop0v=B1US9neDLxfhgcY23ukgLzFOQ@mail.gmail.com/
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Acked-by: Nishanth Menon <nm@ti.com>
2 years agogitlab-ci: Update comment about the Dockerfile
Joel Stanley [Tue, 23 Aug 2022 06:18:26 +0000 (16:18 +1000)]
gitlab-ci: Update comment about the Dockerfile

It's found in the u-boot tree now.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agocommon/console.c: prevent pre-console buffer contents from being added to itself
Rasmus Villemoes [Tue, 3 May 2022 13:13:27 +0000 (15:13 +0200)]
common/console.c: prevent pre-console buffer contents from being added to itself

I do not have any non-serial output devices, so a
print_pre_console_buffer(PRE_CONSOLE_FLUSHPOINT2_EVERYTHING_BUT_SERIAL)
does nothing for me.

However, I was manually inspected the pre-console buffer using md.b,
and I noticed that the early part of it was repeated. The reason is
that the first call of print_pre_console_buffer(), from
console_init_f(), ends up invoking puts() with the contents of the
buffer at that point, and puts() at that point ends up in the else
branch of

if (gd->flags & GD_FLG_DEVINIT) {
/* Send to the standard output */
fputs(stdout, s);
} else {
/* Send directly to the handler */
pre_console_puts(s);
serial_puts(s);
}

so indeed the contents is added again.

That can be somewhat confusing (both when reading the buffer manually,
but also if it did actually come out on some device). So disable all
use of the pre-console buffer while print_pre_console_buffer() is
emitting it.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoMerge tag 'dm-pull-26aug22' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Sat, 27 Aug 2022 12:07:09 +0000 (08:07 -0400)]
Merge tag 'dm-pull-26aug22' of https://source.denx.de/u-boot/custodians/u-boot-dm

binman/patman documentation improvements
other minor fixes

2 years agoMerge branch '2022-08-26-assorted-fixes'
Tom Rini [Sat, 27 Aug 2022 12:05:15 +0000 (08:05 -0400)]
Merge branch '2022-08-26-assorted-fixes'

- PCIe, NVMe and 2 UBIFS related fixes

2 years agodistroboot: ubifs: Add support for specifying UBI header offset
Pali Rohár [Sun, 7 Aug 2022 19:04:22 +0000 (21:04 +0200)]
distroboot: ubifs: Add support for specifying UBI header offset

Some UBI partitions may use non-standard UBI header offset. For attaching
these UBI partitions it is required to pass second argument with offset to
"ubi part" command.

Therefore extend distroboot to allow specifying additional optional 6th
argument with UBI header offset. This offset is set in new distroboot
variable ${bootubioff} which may be used by distroboot script to e.g.
properly pass this value to linux kernel command line for proper mounting
of rootfs by kernel. This variable is set to empty string (cleared) when
UBI header offset is not specified into distroboot BOOT_TARGET_DEVICES
macro.

Usage of helper macro BOOTENV_DEV_UBIFS_BOOTUBIOFF in this change is there
as a type check. It ensures that in BOOT_TARGET_DEVICES macro was specified
UBIFS func with either 5 or 6 arguments. If not then cpp throws compile
error.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoRename disto_[pxe_]getfile to distro_[pxe_]getfile
Dario Binacchi [Fri, 26 Aug 2022 13:15:41 +0000 (15:15 +0200)]
Rename disto_[pxe_]getfile to distro_[pxe_]getfile

Replace 'disto' with 'distro' since they are all functions about distro
booting.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agovbe: Enable command only with BOOTSTD_FULL
Simon Glass [Tue, 23 Aug 2022 17:14:05 +0000 (10:14 -0700)]
vbe: Enable command only with BOOTSTD_FULL

Avoid enabling this command by default. This saves about 1KB of code
space.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agobinman: Sort tests and rework test-file numbers
Stefan Herbrechtsmeier [Tue, 23 Aug 2022 10:46:09 +0000 (12:46 +0200)]
binman: Sort tests and rework test-file numbers

Tests should be in order of the test-file numbers. Sort the tests
according to the test-file numbers and rework the test-file numbers to
eliminate duplicate numbers.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Document how to handle dependent images
Simon Glass [Thu, 18 Aug 2022 08:16:46 +0000 (02:16 -0600)]
binman: Document how to handle dependent images

Binman does not support this properly at present. Add documentation about
it including a work-around.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Mention split-elf in the main docs
Simon Glass [Thu, 18 Aug 2022 08:16:45 +0000 (02:16 -0600)]
binman: Mention split-elf in the main docs

Since we are talking about ATF, add mention of this new feature too.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agopatman: Tidy up unnecessary blank lines and numbers
Simon Glass [Wed, 17 Aug 2022 18:47:07 +0000 (12:47 -0600)]
patman: Tidy up unnecessary blank lines and numbers

Quite a few blank lines are not needed here. Drop these and use the #
mechanism to number paragraphs.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agopatman: Fix version table
Simon Glass [Wed, 17 Aug 2022 18:47:06 +0000 (12:47 -0600)]
patman: Fix version table

One of the changes to the version table was made by mistake. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoboot: simplify bootmeth_vbe_simple_ft_fixup()
Heinrich Schuchardt [Tue, 23 Aug 2022 08:31:56 +0000 (10:31 +0200)]
boot: simplify bootmeth_vbe_simple_ft_fixup()

Don't assign a value to a variable if it is not used afterwards.
Move variables to the code fragment where they are used.

Addresses-Coverity: CID 356243 ("Code maintainability issues (UNUSED_VALUE)")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoboot: fix vbe_find_first_device()
Heinrich Schuchardt [Tue, 23 Aug 2022 08:25:25 +0000 (10:25 +0200)]
boot: fix vbe_find_first_device()

uclass_find_first_device() may return NULL if no device for the uclass
exists. Handle this case gracefully.

Addresses-Coverity: CID 356244 ("Null pointer dereferences (FORWARD_NULL)")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodm: core: fix a typo in help text
Sergei Antonov [Sun, 21 Aug 2022 13:45:08 +0000 (16:45 +0300)]
dm: core: fix a typo in help text

Signed-off-by: Sergei Antonov <saproj@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: Build documentation in parallel
Simon Glass [Sat, 13 Aug 2022 17:40:40 +0000 (11:40 -0600)]
doc: Build documentation in parallel

With the addition of the revision stats this now takes over a minute. Use
a parallel build to reduce it a bit (24 seconds for me).

Series-changes; 2
- Use '-j auto' instead

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agodisk: part: remove dependency to ubifs for spl
Stefan Herbrechtsmeier [Mon, 8 Aug 2022 14:45:17 +0000 (16:45 +0200)]
disk: part: remove dependency to ubifs for spl

The spl doesn't support ubifs and thereby doesn't provide the
ubifs_is_mounted function. Remove the dependency to ubifs for the spl.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2 years agonvme: Do a clean NVMe shutdown
Hector Martin [Sun, 31 Jul 2022 06:31:31 +0000 (15:31 +0900)]
nvme: Do a clean NVMe shutdown

The brute-force controller disable method can end up racing controller
initialization and causing a crash when we shut down Apple ANS2 NVMe
controllers. Do a proper controlled shutdown, which does block until
things are quiesced properly. This is nicer in general for all
controllers.

Signed-off-by: Hector Martin <marcan@marcan.st>
Tested-by: Mark Kettenis <kettenis@openbsd.org> (firefly-rk3399)
2 years agopci: Add checks to prevent config space overflow
Pali Rohár [Sun, 3 Jul 2022 10:48:06 +0000 (12:48 +0200)]
pci: Add checks to prevent config space overflow

PCIe config space has address range 0-4095. So do not allow reading from
addresses outside of this range. Lot of U-Boot drivers do not expect that
passed value is not in this range. PCI DM read function is extended to
fill read value to all ones or zeros when it fails as U-Boot callers
ignores return value.

Calling U-Boot command 'pci display.b 0.0.0 0 0x2000' now stops printing
config space at the end (before 0x1000 address).

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Tue, 23 Aug 2022 19:44:54 +0000 (15:44 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- kirkwood: pogo_v4 & nsa310s: Add distro boot (Tony)
- kirkwood: add DM timer support and use it on lsxl boards (Michael)
- kirkwood: convert the Buffalo Linkstation LS-CHLv2 and XHL boards
  to DM (Michael)
- mvebu: turris_mox/omnia: misc improments (Pali)
- mvebu: mbus: Fix mbus driver to work also after U-Boot relocation (Pali)

2 years agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 23 Aug 2022 19:24:14 +0000 (15:24 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoboard: lsxl: update the README
Michael Walle [Wed, 17 Aug 2022 19:38:09 +0000 (21:38 +0200)]
board: lsxl: update the README

Update the board's README to reflect all the recent changes.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: disable eth0
Michael Walle [Wed, 17 Aug 2022 19:38:08 +0000 (21:38 +0200)]
board: lsxl: disable eth0

The board has only one network interface. The linux kernel will
gracefully skip a the ethernet interface if no connected PHY could be
probed. u-boot on the other hand will throw an error message. The kernel
device tree is about to be fixed. For now, just disable the ethernet
interface in our -u-boot.dtsi.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: convert to CONFIG_TIMER
Michael Walle [Wed, 17 Aug 2022 19:38:07 +0000 (21:38 +0200)]
board: lsxl: convert to CONFIG_TIMER

Enable the orion timer driver and we are good.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: convert to DM_SERIAL
Michael Walle [Wed, 17 Aug 2022 19:38:06 +0000 (21:38 +0200)]
board: lsxl: convert to DM_SERIAL

DM_SERIAL needs early malloc. The on-chip RAM is pretty tight, it's only
2kiB, with DM_SERIAL enabled, this doesn't work anymore. Fortunately for
us, we don't need the on-chip RAM because the DRAM is already
initialized before u-boot starts. Just put the early malloc area there
and use the default early malloc size.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: convert to DM_ETH
Michael Walle [Wed, 17 Aug 2022 19:38:05 +0000 (21:38 +0200)]
board: lsxl: convert to DM_ETH

Just enabling the Kconfig option for DM_ETH and DM_MDIO is enough.
Additionally, we can remove the old hardcoded config.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: convert to DM_GPIO
Michael Walle [Wed, 17 Aug 2022 19:38:04 +0000 (21:38 +0200)]
board: lsxl: convert to DM_GPIO

Use the new mvebu GPIO driver and convert all the function calls to the
former kirkwood GPIO driver. This means that we are now using the LED
uclass and the regulator uclass. Unfortunately, the GPIO LED doesn't
offer a blinking method. Thus we are now stuck with solid on and off
states, which makes debugging a bit harder. Also, there is no GPIO fan
driver for now.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: make last resort recovery more reliable
Michael Walle [Wed, 17 Aug 2022 19:38:03 +0000 (21:38 +0200)]
board: lsxl: make last resort recovery more reliable

If something is wrong with the environment, we cannot rely on a proper
u-boot operation anymore. In fact, it is possible, that we never reach
misc_init_r() with a broken environment.

Also don't enable the netconsole by environment settings. This way the
user don't have to reconfigure the environment. Instead the network
console is only enabled when the push button is pressed during boot.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: enable ATAGS support
Michael Walle [Wed, 17 Aug 2022 19:38:02 +0000 (21:38 +0200)]
board: lsxl: enable ATAGS support

We still need to be able to boot legacy images. Esp. the debian
installer will have a kernel with an appended DTB.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: use proper *_r variables
Michael Walle [Wed, 17 Aug 2022 19:38:01 +0000 (21:38 +0200)]
board: lsxl: use proper *_r variables

Use the common kernel_addr_r, ramdisk_addr_r and fdt_addr_r variable
names.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: reorder image loading and remove ramdisk_len
Michael Walle [Wed, 17 Aug 2022 19:38:00 +0000 (21:38 +0200)]
board: lsxl: reorder image loading and remove ramdisk_len

We can load the ramdisk as the last step. This way we don't have to set
the intermediate variable 'ramdisk_len' and can remove it.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: use CONFIG_DEFAULT_FDT_FILE
Michael Walle [Wed, 17 Aug 2022 19:37:59 +0000 (21:37 +0200)]
board: lsxl: use CONFIG_DEFAULT_FDT_FILE

Drop our own CONFIG_FDTFILE handling in favor of the generic
CONFIG_DEFAULT_FDT_FILE one.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: automatically select CONFIG_MISC_INIT_R
Michael Walle [Wed, 17 Aug 2022 19:37:58 +0000 (21:37 +0200)]
board: lsxl: automatically select CONFIG_MISC_INIT_R

The board code needs this to be set. Otherwise, the recovery mechanism
doesn't work. Therefore, select this option automatically with the
board.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: remove unused header files
Michael Walle [Wed, 17 Aug 2022 19:37:57 +0000 (21:37 +0200)]
board: lsxl: remove unused header files

Cleanup the included header files in the board code. These are all
leftovers from earlier days.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: remove CONFIG_ENV_OVERWRITE
Michael Walle [Wed, 17 Aug 2022 19:37:56 +0000 (21:37 +0200)]
board: lsxl: remove CONFIG_ENV_OVERWRITE

This is not needed. The user can force setting the variables with
"setenv -f".

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: remove eraseenv script
Michael Walle [Wed, 17 Aug 2022 19:37:55 +0000 (21:37 +0200)]
board: lsxl: remove eraseenv script

This is not needed. The user can do a "env default -f -a".

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: remove unused features
Michael Walle [Wed, 17 Aug 2022 19:37:54 +0000 (21:37 +0200)]
board: lsxl: remove unused features

Make the binary smaller by removing unused features.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: limit size to 384kiB
Michael Walle [Wed, 17 Aug 2022 19:37:53 +0000 (21:37 +0200)]
board: lsxl: limit size to 384kiB

The board only has a 4Mbit flash and two sectors are reserved for the
u-boot environment and the device tree.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agobutton: gpio: add DM_GPIO dependency
Michael Walle [Wed, 17 Aug 2022 19:37:52 +0000 (21:37 +0200)]
button: gpio: add DM_GPIO dependency

The gpio-button driver depends on DM_GPIO, add it to Kconfig to avoid
build errors.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agotimer: add orion-timer support
Michael Walle [Wed, 17 Aug 2022 19:37:51 +0000 (21:37 +0200)]
timer: add orion-timer support

Add timer support for Kirkwood and MVEBU devices.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: kirkwood: make it CONFIG_TIMER aware
Michael Walle [Wed, 17 Aug 2022 19:37:50 +0000 (21:37 +0200)]
arm: kirkwood: make it CONFIG_TIMER aware

If we switch to CONFIG_TIMER, we don't need the legacy timer macros and
functions anymore. Add the proper guards to exclude them from compiling.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
Pali Rohár [Wed, 17 Aug 2022 19:37:49 +0000 (21:37 +0200)]
arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register

Bit 21 in SAR register specifies if TCLK is running at 166 MHz or 200 MHz.
This information is undocumented in public Marvell Kirkwood Functional
Specifications [2], but is available in Linux v3.15 kirkwood code [1].

Commit 8ac303d49f89 ("arm: kirkwood: Do not overwrite CONFIG_SYS_TCLK")
broke support for Marvell 88F6281 SoCs because it was expected that all
those SoCs have TCLK running at 200 MHz as specified in Marvell 88F6281
Hardware Specifications [3].

Fix broken support for 88F6281 by detecting CONFIG_SYS_TCLK from SAR
register, like it was doing Linux v3.15.

[1] - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/mach-kirkwood/common.c?h=v3.15#n542
[2] - https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
[3] - https://web.archive.org/web/20120620073511/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf

Update by Stefan 2022-08-23:
- Fix compilation error for ds109

Fixes: 8ac303d49f89 ("arm: kirkwood: Do not overwrite CONFIG_SYS_TCLK")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agotime: move the CONFIG_SYS_TIMER_RATE handling to the compiler
Michael Walle [Wed, 17 Aug 2022 19:37:48 +0000 (21:37 +0200)]
time: move the CONFIG_SYS_TIMER_RATE handling to the compiler

CONFIG_SYS_TIMER_RATE might be a dynamic value, i.e. a function call
instead of a static value, thus it has to be evaluated at runtime. If it
is a static value, the compiler should be able to optimize the unused
branches out.

This will be needed for kirkwoods dynamic CONFIG_SYS_TCLK setting.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: kirkwood: nsa310s: Add Distro boot capability
Tony Dinh [Thu, 11 Aug 2022 23:40:25 +0000 (16:40 -0700)]
arm: kirkwood: nsa310s: Add Distro boot capability

- Add distro boot to board include file and deconfig file
- Miscellaneous changes:
- Remove Gerald from maintainer list (email bounced)
- Add CONFIG_SUPPORT_PASSING_ATAGS and friends to support legacy
kernel method of booting (e.g. OpenWrt) with appended DTB.
- Add CONFIG_UBIFS_SILENCE_MSG to reduce binary size.

Note that this patch is depended on the following patch:
https://patchwork.ozlabs.org/project/uboot/patch/20220807192709.21717-1-pali@kernel.org/

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2 years agoarm: mvebu: mbus: Fix mbus driver to work also after U-Boot relocation
Pali Rohár [Wed, 10 Aug 2022 12:46:09 +0000 (14:46 +0200)]
arm: mvebu: mbus: Fix mbus driver to work also after U-Boot relocation

mbus driver is initialized from arch_cpu_init() callback which is called
before relocation. This driver stores lot of functions and structure
pointers into global variables, so it is data position dependent.

Therefore after relocations all pointers are invalid and driver does not
work anymore as all pointers referes to the old memory, which overlaps with
CONFIG_SYS_LOAD_ADDR and ${loadaddr}.

For example U-Boot fuse command crashes if loadaddr memory is cleared or
rewritten by some image loaded by U-Boot load command.

  mw.w ${loadaddr} 0x0 10000
  fuse read 0 1 2

Fix this issue by removing of all mbus global variables in which are stored
pointers to structures or functions which changes during relocation. And
replace it by direct function calls (not via pointers). With this change
fuse command finally works.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: mvebu: turris_mox: Set "sfp" label in eth1 DT node when only Mox SFP is detected
Pali Rohár [Wed, 10 Aug 2022 10:54:11 +0000 (12:54 +0200)]
arm: mvebu: turris_mox: Set "sfp" label in eth1 DT node when only Mox SFP is detected

When Mox SFP module is connected after Topaz or Peridot module then port DT
node already contains "sfp" label. But Mox SFP module can be connected also
without Topaz or Peridot module in which case it is connected directly into
he eth1 DT node, which is without any label. So add "sfp" label into eth1
DT node in this case.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: mvebu: turris_omnia: Show MCU version
Pali Rohár [Wed, 10 Aug 2022 09:00:25 +0000 (11:00 +0200)]
arm: mvebu: turris_omnia: Show MCU version

There are already more MCU firmware versions for Turris Omnia in
production, so display git commit (version) of the MCU firmware during
U-Boot startup. It will help to identify what version of MCU firmware is
Turris Omnia using.

MCU firmware for Turris Omnia is open source and available at website:
https://gitlab.nic.cz/turris/hw/omnia_hw_ctrl

It can be updated from running system via i2c bus with this tool:
https://gitlab.nic.cz/turris/omnia-mcutool

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: kirkwood: pogo_v4: Add Distro boot capability
Tony Dinh [Tue, 9 Aug 2022 03:01:34 +0000 (20:01 -0700)]
arm: kirkwood: pogo_v4: Add Distro boot capability

- Add distro boot to board include file and deconfig file
- Miscellaneous changes:
- Add CONFIG_SUPPORT_PASSING_ATAGS and friends to support legacy
kernel method of booting (e.g. OpenWrt) with appended DTB.
- Add CONFIG_LTO and CONFIG_UBIFS_SILENCE_MSG, and disable some
unused configs to reduce binary size.

Note that this patch is depended on the following patch:
https://patchwork.ozlabs.org/project/uboot/patch/20220807192709.21717-1-pali@kernel.org/

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2 years agoarm: mvebu: Define env_sf_get_env_addr() for all Armada boards in SPL
Pali Rohár [Mon, 8 Aug 2022 17:13:43 +0000 (19:13 +0200)]
arm: mvebu: Define env_sf_get_env_addr() for all Armada boards in SPL

SPI0 CS0 Flash is mapped to address range 0xD4000000 - 0xD7FFFFFF by BootROM.
Proper U-Boot removes this direct mapping. So it is available only in SPL.
This applies for all 32-bit Armada BootROMs. SPL mvebu code is used only on
32-bit Armada SoCs. So move env_sf_get_env_addr() function from Turris
Omnia board to common SPL mvebu code and add proper checks for SPI0 CS0.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoPrepare v2022.10-rc3
Tom Rini [Mon, 22 Aug 2022 22:54:48 +0000 (18:54 -0400)]
Prepare v2022.10-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge tag 'dm-pull-20aug22' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Mon, 22 Aug 2022 16:41:07 +0000 (12:41 -0400)]
Merge tag 'dm-pull-20aug22' of https://source.denx.de/u-boot/custodians/u-boot-dm

binman fixes for various things
binman clean-up of compression and addition of utilities

2 years agoMerge branch '2022-08-22-platform-removals-CI-updates'
Tom Rini [Mon, 22 Aug 2022 16:32:52 +0000 (12:32 -0400)]
Merge branch '2022-08-22-platform-removals-CI-updates'

- Remove a few more platforms, update CI to Ubuntu 22.04 and perform
  some other other minor updates to Azure.

2 years agoCI: Move to Ubuntu 2022.04 "Jammy" for CI base
Tom Rini [Wed, 10 Aug 2022 01:08:54 +0000 (21:08 -0400)]
CI: Move to Ubuntu 2022.04 "Jammy" for CI base

- We now have a new enough sbsigntools in the distro, stop building.
- Use the 20220801 tag for Jammy.
- Move to pygit2 1.9.2 (current version) as the old one doesn't build on
 "Jammy".
- Add the working directory to the list of safe directories for git.
- Move to pytest 6.2.5 to address other issues.
- This move exposed a number of minor issues in the existing scripts we
  used within CI to perform the jobs themselves.  The most notable changes
  here involve using 'set +e / set -e' to enforce when we should or should
  not make non-zero buildman status be a fatal error.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoCI: Azure: Merge PowerPC jobs in to one
Tom Rini [Wed, 10 Aug 2022 01:08:52 +0000 (21:08 -0400)]
CI: Azure: Merge PowerPC jobs in to one

At this point given the number of PowerPC platforms we have, a single
job to build them all fits within the time limit we have in Azure.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agopowerpc: remove support for kmtergr1 and MPC8309
Holger Brunck [Fri, 19 Aug 2022 14:55:06 +0000 (16:55 +0200)]
powerpc: remove support for kmtergr1 and MPC8309

The kmtegr1 board is out of maintenance and can be removed. As it is the
only board in the tree using MPC8309 the support for this CPU is dropped
completely.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2 years agoarm: Remove warp board
Tom Rini [Wed, 3 Aug 2022 16:11:00 +0000 (12:11 -0400)]
arm: Remove warp board

This board is missing migration to CONFIG_DM, which had a deadline of
v2020.01, which is now more than 2 years passed due.  Remove it.

Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2022-08-20-enforce-DM_ETH-migration'
Tom Rini [Sun, 21 Aug 2022 02:39:42 +0000 (22:39 -0400)]
Merge branch '2022-08-20-enforce-DM_ETH-migration'

Enforce requiring DM_ETH to be enabled for ethernet drivers, as the
migration deadline has well passed. To facilitate this, we remove some
non-migrated platforms and disable networking on a few others. Finally
we remove some of the now-useless non-DM_ETH code in some platforms as a
prerequisite for DM_ETH being set.

2 years agonet: Make DM_ETH be selected by NETDEVICE
Tom Rini [Tue, 2 Aug 2022 11:33:47 +0000 (07:33 -0400)]
net: Make DM_ETH be selected by NETDEVICE

The deadline for DM_ETH migration passed 2 years ago.  Now that
platforms which cannot be migrated have been either removed or had
drivers disabled, and platforms that needed minor help to migrate have
been forcefully migrated, we can complete the migration.

This entails select'ing DM_ETH under NETDEVICES, and then removing now
extraneous depends on lines.  In a few places, we can now either remove
options or just simplify later dependencies.

Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Ramon Fried <rfried.dev@gmail.com>
2 years agosmdkc100: Remove legacy non-DM_ETH code
Tom Rini [Tue, 2 Aug 2022 11:33:46 +0000 (07:33 -0400)]
smdkc100: Remove legacy non-DM_ETH code

Now that we are about to enable DM_ETH by default, remove legacy code.

Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agowarp7: Remove legacy non-DM_ETH code
Tom Rini [Tue, 2 Aug 2022 11:33:45 +0000 (07:33 -0400)]
warp7: Remove legacy non-DM_ETH code

Now that we are about to enable DM_ETH by default, remove legacy code.

Cc: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agovinco: Remove legacy non-DM_ETH code
Tom Rini [Tue, 2 Aug 2022 11:33:44 +0000 (07:33 -0400)]
vinco: Remove legacy non-DM_ETH code

Now that we are about to enable DM_ETH by default, remove legacy code.

Cc: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agols1021aqds/ls1021aiot: Remove legacy non-DM_ETH code
Tom Rini [Tue, 2 Aug 2022 11:33:43 +0000 (07:33 -0400)]
ls1021aqds/ls1021aiot: Remove legacy non-DM_ETH code

Now that we are about to enable DM_ETH by default, remove legacy code.

Cc: Alison Wang <alison.wang@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoam335x_sl50: Disable SPL_NET
Tom Rini [Tue, 2 Aug 2022 11:33:42 +0000 (07:33 -0400)]
am335x_sl50: Disable SPL_NET

Now that we are about to enable DM_ETH by default, disable SPL_NET as
SPL_DM is not enabled currently.

Cc: Enric Balletbo i Serra <eballetbo@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoigep00x0: Disable networking
Tom Rini [Tue, 2 Aug 2022 11:33:41 +0000 (07:33 -0400)]
igep00x0: Disable networking

This platform needs to be converted to use DM_ETH as the deadline is 2
years passed due.  Disable networking support for now.

Cc: Enric Balletbo i Serra <eballetbo@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: ks8851_mll: Remove legacy non-DM_ETH code and callers
Tom Rini [Tue, 2 Aug 2022 11:33:40 +0000 (07:33 -0400)]
net: ks8851_mll: Remove legacy non-DM_ETH code and callers

As this driver has been converted to DM_ETH and the migration deadline
is 2 years passed, remove the legacy code and callers.

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Ramon Fried <rfried.dev@gmail.com>
2 years agompc8548cds: Guard old ethernet code with !DM_ETH
Tom Rini [Tue, 2 Aug 2022 11:33:39 +0000 (07:33 -0400)]
mpc8548cds: Guard old ethernet code with !DM_ETH

There is some code here for the legacy non-DM_ETH case, add a guard
around it.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoppc: Remove corenet_ds boards
Tom Rini [Tue, 9 Aug 2022 14:16:21 +0000 (10:16 -0400)]
ppc: Remove corenet_ds boards

These boards have been orphaned for some time and are behind on various
DM migrations. Remove them.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agolayerscape: Disable CONFIG_FMAN_ENET on *aqds* platforms
Tom Rini [Tue, 9 Aug 2022 14:16:22 +0000 (10:16 -0400)]
layerscape: Disable CONFIG_FMAN_ENET on *aqds* platforms

The *aqds* platforms have not been migrated to be able to enable
CONFIG_DM_ETH with CONFIG_FMAN_ENET. Disable CONFIG_FMAN_ENET on these
platforms.

Cc: Mingkai Hu <mingkai.hu@nxp.com>
Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Cc: Pramod Kumar <pramod.kumar_1@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agofsl-mc: Update dependencies for DM_ETH
Tom Rini [Tue, 2 Aug 2022 11:33:37 +0000 (07:33 -0400)]
fsl-mc: Update dependencies for DM_ETH

When using DM_ETH, which should be the default now, we need to always
have DM_MDIO and FSL_LS_MDIO enabled, so select them.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Cc: Wasim Khan <wasim.khan@nxp.com>
Cc: Udit Agarwal <udit.agarwal@nxp.com>
Cc: Ashish Kumar <Ashish.Kumar@nxp.com>
Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Manish Tomar <Manish.Tomar@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: lpc32xx_eth.c ethernet driver
Tom Rini [Tue, 2 Aug 2022 11:33:36 +0000 (07:33 -0400)]
net: lpc32xx_eth.c ethernet driver

This driver has not been converted to DM_ETH.  The migration
deadline passed 2 years ago.

Cc: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Ramon Fried <rfried.dev@gmail.com>
2 years agoarm: Remove kzm9g board
Tom Rini [Tue, 2 Aug 2022 11:33:34 +0000 (07:33 -0400)]
arm: Remove kzm9g board

This board is behind on several mandatory DM migrations and is missing
OF_CONTROL support that makes other conversions impossible. Remove it.

Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: Remove armadillo-800eva board
Tom Rini [Tue, 2 Aug 2022 11:33:33 +0000 (07:33 -0400)]
arm: Remove armadillo-800eva board

This board is behind on several mandatory DM migrations and is missing
OF_CONTROL support that makes other conversions impossible. Remove it.

Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: Remove cm_t335 board
Tom Rini [Tue, 2 Aug 2022 11:33:32 +0000 (07:33 -0400)]
arm: Remove cm_t335 board

This board is behind on several mandatory DM migrations and is missing
OF_CONTROL support that makes other conversions impossible. Remove it.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Uri Mashiach <uri.mashiach@compulab.co.il>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: Remove edminiv2 board
Tom Rini [Tue, 2 Aug 2022 11:33:31 +0000 (07:33 -0400)]
arm: Remove edminiv2 board

This board is not converted to use CONFIG_DM, well passed the migration
deadline.  Remove it.

Cc: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agomx28evk: Remove AUART/NAND/SPI variants
Fabio Estevam [Wed, 3 Aug 2022 02:04:04 +0000 (23:04 -0300)]
mx28evk: Remove AUART/NAND/SPI variants

To ease maintenance, let's keep only the main mx28evk_defconfig
and remove the other variants that have not been migrated to DM.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2 years agobinman: Add zstd bintool
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:38 +0000 (16:25 +0200)]
binman: Add zstd bintool

Add zstd bintool to binman to support on-the-fly compression.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Add xz bintool
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:37 +0000 (16:25 +0200)]
binman: Add xz bintool

Add xz bintool to binman to support on-the-fly compression.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Add lzop bintool
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:36 +0000 (16:25 +0200)]
binman: Add lzop bintool

Add lzop bintool to binman to support on-the-fly compression.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Add gzip bintool
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:35 +0000 (16:25 +0200)]
binman: Add gzip bintool

Add gzip bintool to binman to support on-the-fly compression of Linux
kernel images and FPGA bitstreams. The SPL basic fitImage implementation
supports only gzip decompression.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rename the module and support this, since gzip.py is a system module:
Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Add bzip2 bintool
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:34 +0000 (16:25 +0200)]
binman: Add bzip2 bintool

Add bzip2 bintool to binman to support on-the-fly compression.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Add BintoolPacker class to bintool
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:33 +0000 (16:25 +0200)]
binman: Add BintoolPacker class to bintool

Add a bintools base class for packers which compression / decompression
entry contents.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Dropped dead/untested code in version():
Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Add compression tests
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:32 +0000 (16:25 +0200)]
binman: Add compression tests

Add common test functions to test all supported compressions.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>