platform/kernel/u-boot.git
4 years agospi: octeon_spi: Use a fixed 100MHz input clock on Octeon TX2
Stefan Roese [Wed, 5 Aug 2020 13:07:30 +0000 (15:07 +0200)]
spi: octeon_spi: Use a fixed 100MHz input clock on Octeon TX2

Octeon TX2 sets the TB100_EN bit in the config register. We need to use
a fixed 100MHz clock for this as well to work properly.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Suneel Garapati <sgarapati@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Jagan Teki <jagan@amarulasolutions.com>
4 years agoMerge tag 'mmc-2020-10-14' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Thu, 15 Oct 2020 12:20:42 +0000 (08:20 -0400)]
Merge tag 'mmc-2020-10-14' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc

- fsl_esdhc_imx cleanup
- not send cm13 if send_status is 0.
- Add reinit API
- Add mmc HS400 for fsl_esdhc
- Several cleanup for fsl_esdhc
- Add ADMA2 for sdhci

4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Wed, 14 Oct 2020 17:51:56 +0000 (13:51 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- Octeon TX: Add NAND driver (Suneel)
- Octeon TX: Add NIC driver driver (Suneel)
- Octeon TX2: Add NIC driver driver (Suneel)
- Armada 8040: Add iEi Puzzle-M80 board support (Luka)
- Armada A37xx SPI: Add support for CS-GPIO (George)
- Espressobin: Use Linux model/compatible strings (Andre)
- Espressobin: Add armada-3720-espressobin-emmc.dts from Linux (Andre)
- Armada A37xx: Small cleanup of config header (Pali)

4 years agoMerge branch '2020-10-14-assorted-changes'
Tom Rini [Wed, 14 Oct 2020 17:35:05 +0000 (13:35 -0400)]
Merge branch '2020-10-14-assorted-changes'

- Add support for Linux "pstore" dumps.
- Button command fixup.
- gd cleanup and documentation.
- Assorted other cleanups.

4 years agodoc: Sphinx.override_domain() deprecated
Heinrich Schuchardt [Tue, 6 Oct 2020 15:56:59 +0000 (17:56 +0200)]
doc: Sphinx.override_domain() deprecated

Sphinx.override_domain() is deprecated since Sphinx 1.8 and removed in
Sphinx 3.

Use Sphinx.add_domain(, override=True) instead.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agonet: e1000: add defaults for i210 TX/RX PBSIZE
Christian Gmeiner [Tue, 6 Oct 2020 14:08:35 +0000 (16:08 +0200)]
net: e1000: add defaults for i210 TX/RX PBSIZE

Set the defaults on probe for the packet buffer size registers
for the i210.

The TX/RX PBSIZE register of the i210 resets to its default value
only at power-on - see Intel Ethernet Controller I210 Datasheet rev 3.5
chapter 8.3 'Internal Packet Buffer Size Registers'.

If something (another driver, another OS, etc.) modifies this register
from its default value, the e1000 driver doesn't function correctly. It
detects a hang of the transmitter and continuously resets the adapter.
Here we set this value to its default when resetting the i210 to
resolve this issue.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
4 years agocheckpatch.pl: Make CONFIG_IS_ENABLED(CONFIG_*) an error
Alper Nebi Yasak [Mon, 5 Oct 2020 06:57:30 +0000 (09:57 +0300)]
checkpatch.pl: Make CONFIG_IS_ENABLED(CONFIG_*) an error

CONFIG_IS_ENABLED() takes the kconfig name without the CONFIG_ prefix,
e.g. CONFIG_IS_ENABLED(CLK) for CONFIG_CLK. Make including the prefix
an error in checkpatch.pl so calls in the wrong format aren't
accidentally reintroduced.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agotreewide: Fix wrong CONFIG_IS_ENABLED() handling
Alper Nebi Yasak [Mon, 5 Oct 2020 06:57:29 +0000 (09:57 +0300)]
treewide: Fix wrong CONFIG_IS_ENABLED() handling

CONFIG_IS_ENABLED() takes the kconfig name without the CONFIG_ prefix,
e.g. CONFIG_IS_ENABLED(CLK) for CONFIG_CLK. Some of these were being
fixed every now and then, see:

    commit 71ba2cb0d678 ("board: stm32mp1: correct CONFIG_IS_ENABLED usage for LED")
    commit a5ada25e4213 ("rockchip: clk: fix wrong CONFIG_IS_ENABLED handling")
    commit 5daf6e56d36c ("common: console: Fix duplicated CONFIG in silent env callback")
    commit 48bfc31b6484 ("MIPS: bootm: Fix broken boot_env_legacy codepath")

Fix all files found by `git grep "CONFIG_IS_ENABLED(CONFIG"` by running
':%s/CONFIG_IS_ENABLED(CONFIG_\(\w+\))/CONFIG_IS_ENABLED(\1)/g' in vim.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodoc: global data pointer
Heinrich Schuchardt [Mon, 5 Oct 2020 06:30:10 +0000 (08:30 +0200)]
doc: global data pointer

Add the description of the global data pointer to the generated HTML
documentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoglobal_data.h: add Sphinx documentation
Heinrich Schuchardt [Mon, 5 Oct 2020 06:30:09 +0000 (08:30 +0200)]
global_data.h: add Sphinx documentation

Add the missing Sphinx documentation for struct global_data and
gd_board_type().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoglobal_data.h: convert GD_FLG_* to enum
Heinrich Schuchardt [Mon, 5 Oct 2020 06:30:08 +0000 (08:30 +0200)]
global_data.h: convert GD_FLG_* to enum

Sphinx documentation is only available for enums not for #defines.
Anyway it is better to keep related definitions in an enum.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agobootm: add {arch,board}_preboot_os() to bootm.h
Heinrich Schuchardt [Mon, 14 Sep 2020 23:58:11 +0000 (01:58 +0200)]
bootm: add {arch,board}_preboot_os() to bootm.h

Functions that are used in multiple C modules should be defined in an
include.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Michael Walle <michael@walle.cc>
4 years agotime: Fix get_ticks being non-monotonic
Sean Anderson [Wed, 9 Sep 2020 20:24:56 +0000 (16:24 -0400)]
time: Fix get_ticks being non-monotonic

get_ticks does not always succeed. Sometimes it can be called before the
timer has been initialized. If it does, it returns a negative errno.
This causes the timer to appear non-monotonic, because the value will
become much smaller after the timer is initialized.

No users of get_ticks which I checked handle errors of this kind. Further,
functions like tick_to_time mangle the result of get_ticks, making it very
unlikely that one could check for an error without suggesting a patch such
as this one.

This patch panics if we ever get an error. There are two cases in which
this can occur. The first is if we couldn't find/probe the timer for some
reason. One reason for this is if the timer is not available so early. This
likely indicates misconfiguration. Another reason is that the timer has an
invalid/missing device tree binding. In this case, panicing is also
correct. The second case covers errors calling get_count. This can only
occur if the timer is missing a get_count function (or on RISC-V, but that
should be fixed soon).

Fixes: c8a7ba9e6a5
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agospl: Add SPL_SERIAL as requirement for SDP_USB_SDP
Otavio Salvador [Wed, 30 Sep 2020 02:14:29 +0000 (23:14 -0300)]
spl: Add SPL_SERIAL as requirement for SDP_USB_SDP

The USB SDP protocol require the SPL serial support to allow the build
to succeed.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
4 years agospl: Avoid printing boot device if silent console is enabled
Otavio Salvador [Thu, 3 Sep 2020 17:25:15 +0000 (14:25 -0300)]
spl: Avoid printing boot device if silent console is enabled

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoenv/ext4.c: allow loading from an EXT4 partition on the MMC boot device
David Woodhouse [Tue, 4 Aug 2020 09:05:47 +0000 (10:05 +0100)]
env/ext4.c: allow loading from an EXT4 partition on the MMC boot device

This parallels what I added for FAT in commit 6731bef6966, allowing the
environment to be found in a specific partition on the device that the
board's mmc_get_env_dev() returns. On the Banana Pi R2 that means the
device that U-Boot was loaded from; either the internal eMMC or an SD
card.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agommc: remove duplicate mmc_get_env_dev() implementations
David Woodhouse [Tue, 4 Aug 2020 09:05:46 +0000 (10:05 +0100)]
mmc: remove duplicate mmc_get_env_dev() implementations

Since it's so trivial I could just about tolerate this when there were only
two copies of it. But now there are about to be three.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoarm: enable DM_RNG on QEMU by default
Heinrich Schuchardt [Sat, 19 Sep 2020 05:55:35 +0000 (07:55 +0200)]
arm: enable DM_RNG on QEMU by default

The EFI_RNG_PROTOCOL is needed for address randomization in Linux.
We should provide it by default on QEMU.

Reported-by: François Ozog <francois.ozog@linaro.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agocmd/button: return button status
Heinrich Schuchardt [Mon, 14 Sep 2020 10:50:56 +0000 (12:50 +0200)]
cmd/button: return button status

To make the button command useful in a shell script it should return the
status of the button:

* 0 (true) - pressed, on
* 1 (false) - not pressed, off

The button command takes only one argument. Correct maxargs.

Adjust the Python unit test.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
4 years agodrivers: gpio: keep output value for input on sandbox
Heinrich Schuchardt [Mon, 14 Sep 2020 10:50:55 +0000 (12:50 +0200)]
drivers: gpio: keep output value for input on sandbox

For testing purposes keep the output value when switching to input.
This allows us to manipulate the input value via the gpio command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
4 years agotest: sharpen button label unit test
Heinrich Schuchardt [Mon, 14 Sep 2020 10:50:54 +0000 (12:50 +0200)]
test: sharpen button label unit test

Using different strings for the device tree node labels and the label
property of buttons sharpens the button label unit test.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
4 years agocmd: Fixup DT to pass PStore Ramoops parameters
Frédéric Danis [Fri, 20 Mar 2020 09:59:24 +0000 (10:59 +0100)]
cmd: Fixup DT to pass PStore Ramoops parameters

To simplify configuration and keep synchronized the PStore/Ramoops between
U-Boot and the Linux kernel, this commit dynamically adds the Ramoops
parameters defined in the U-Boot session to the Device Tree.

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
4 years agotest: Add PStore command tests
Frédéric Danis [Fri, 20 Mar 2020 09:59:23 +0000 (10:59 +0100)]
test: Add PStore command tests

Add PStore command to sandbox and sandbox64 defconfigs.
Add test checking:
- 'pstore display' of all records
- 'pstore display' only the 2nd dump record
- 'pstore save' of all records

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
[trini: Adjust to always load files from source directory]
Signed-off-by: Tom Rini <trini@konsulko.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
4 years agocmd: Add command to display or save Linux PStore dumps
Frédéric Danis [Fri, 20 Mar 2020 09:59:22 +0000 (10:59 +0100)]
cmd: Add command to display or save Linux PStore dumps

This patch adds a new pstore command allowing to display or save ramoops
logs (oops, panic, console, ftrace and user) generated by a previous
kernel crash.
PStore parameters can be set in U-Boot configuration file, or at run-time
using "pstore set" command. Records size should be the same as the ones
used by kernel, and should be a power of 2.
This command allows:
- to display uncompressed logs
- to save compressed or uncompressed logs, compressed logs are saved as a
  compressed stream, it may need some work to be able to decompress it,
  e.g. adding a fake header:
  "printf "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x00" |
  cat - dmesg-ramoops-0.enc.z | gzip -dc"
- ECC part is not used to check memory corruption
- only 1st FTrace log is displayed or saved

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
[trini: Minor updates for current design, correct spacing in rST]
Signed-off-by: Tom Rini <trini@konsulko.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
4 years agommc: fsl_esdhc: add ADMA2 support
Michael Walle [Mon, 12 Oct 2020 08:07:14 +0000 (10:07 +0200)]
mmc: fsl_esdhc: add ADMA2 support

Newer eSDHC controllers support ADMA2 descriptor tables which support
64bit DMA addresses. One notable user of addresses in the upper memory
segment is the EFI loader.

If support is enabled, but the controller doesn't support ADMA2, we
will fall back to SDMA (and thus 32 bit DMA addresses only).

Signed-off-by: Michael Walle <michael@walle.cc>
4 years agommc: fsl_esdhc: replace most #ifdefs by IS_ENABLED()
Michael Walle [Mon, 12 Oct 2020 08:07:13 +0000 (10:07 +0200)]
mmc: fsl_esdhc: replace most #ifdefs by IS_ENABLED()

Make the code cleaner and drop the old-style #ifdef constructs where it is
possible.

Signed-off-by: Michael Walle <michael@walle.cc>
4 years agoarm: mvebu: Remove old comments from configs/mvebu_armada-37xx.h file
Pali Rohár [Mon, 5 Oct 2020 10:17:15 +0000 (12:17 +0200)]
arm: mvebu: Remove old comments from configs/mvebu_armada-37xx.h file

These comments are relict for old, now removed config options.
So remove these obsoleted comments too.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm64: dts: a3720: add support for espressobin with populated emmc
Andre Heider [Fri, 4 Sep 2020 15:33:54 +0000 (17:33 +0200)]
arm64: dts: a3720: add support for espressobin with populated emmc

Import armada-3720-espressobin-emmc.dts from Linux, but use sdhc1 for
emmc, since our dtsi is still based on downstream and sdhc0 is used for
the sd card.

Signed-off-by: Andre Heider <a.heider@gmail.com>
4 years agoarm64: dts: armada-3720-espressobin: split common parts to .dtsi
Andre Heider [Fri, 4 Sep 2020 15:33:53 +0000 (17:33 +0200)]
arm64: dts: armada-3720-espressobin: split common parts to .dtsi

Move most of the dts to the new common armada-3720-espressobin.dtsi
file, just like Linux, but keep the current, downstream based, version.

The dts itself is imported from Linux.

Signed-off-by: Andre Heider <a.heider@gmail.com>
4 years agoarm64: dts: armada-3720-espressobin: use Linux model/compatible strings
Andre Heider [Fri, 2 Oct 2020 05:51:12 +0000 (07:51 +0200)]
arm64: dts: armada-3720-espressobin: use Linux model/compatible strings

Fix the actual board vendor and ease synching dts files from Linux.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agospi: mvebu_a3700_spi: add support for cs-gpios
George Hilliard [Wed, 30 Sep 2020 14:28:21 +0000 (09:28 -0500)]
spi: mvebu_a3700_spi: add support for cs-gpios

The device tree has a way to specify GPIO lines as chip selects.  From
the binding docs:

    So if for example the controller has 2 CS lines, and the cs-gpios
    property looks like this:

    cs-gpios = <&gpio1 0 0> <0> <&gpio1 1 0> <&gpio1 2 0>;

    Then it should be configured so that num_chipselect = 4 with the
    following mapping:

    cs0 : &gpio1 0 0
    cs1 : native
    cs2 : &gpio1 1 0
    cs3 : &gpio1 2 0

Add support for this, while retaining backward-compatibility with
existing device trees; the driver will preserve existing behavior if a
cs-gpios list is not given, or if a particular line is specified as <0>
(native).

This implementation is inspired by similar implementations in
neighboring drivers for other platforms: atmega, mxc, etc.

Signed-off-by: George Hilliard <ghilliar@amazon.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: mvebu_armada-8k: Add support for initializing iEi Puzzle-M801 networking
Luka Kovacic [Fri, 28 Aug 2020 22:35:51 +0000 (00:35 +0200)]
arm: mvebu: mvebu_armada-8k: Add support for initializing iEi Puzzle-M801 networking

Add support for the marvell,armada8040-puzzle-m801 compatible string
in the board/Marvell/mvebu_armada-8k/board.c file to initialize the
networking on iEi Puzzle-M801 board (2x CP1 1 Gb ports).

Signed-off-by: Luka Kovacic <luka.kovacic@sartura.hr>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: Initial iEi Puzzle-M801 support
Luka Kovacic [Fri, 28 Aug 2020 22:35:50 +0000 (00:35 +0200)]
arm: mvebu: Initial iEi Puzzle-M801 support

Add initial U-Boot support for the iEi Puzzle-M801 board based on the
Marvell Armada 88F8040 SoC.

Currently supported hardware:
1x USB 3.0
4x Gigabit Ethernet
2x SFP+ (with NXP PCA9555 and NXP PCA9544)
1x SATA 3.0
1x M.2 type B
1x RJ45 UART
1x SPI flash
1x EPSON RX8010 RTC

Signed-off-by: Luka Kovacic <luka.kovacic@sartura.hr>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agonet: Add NIC controller driver for OcteonTX2
Suneel Garapati [Wed, 26 Aug 2020 12:37:42 +0000 (14:37 +0200)]
net: Add NIC controller driver for OcteonTX2

Adds support for Network Interface controllers found on
OcteonTX2 SoC platforms.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
4 years agonet: Add NIC controller driver for OcteonTX
Suneel Garapati [Wed, 26 Aug 2020 12:37:33 +0000 (14:37 +0200)]
net: Add NIC controller driver for OcteonTX

Adds support for Network Interface controllers found on
OcteonTX SoC platforms.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
4 years agomtd: nand: Add NAND controller driver for OcteonTX
Suneel Garapati [Wed, 26 Aug 2020 12:37:22 +0000 (14:37 +0200)]
mtd: nand: Add NAND controller driver for OcteonTX

Adds support for NAND controllers found on OcteonTX or
OcteonTX2 SoC platforms. Also includes driver to support
Hardware ECC using BCH HW engine found on these platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
4 years agoMerge branch '2020-10-12-assorted-encryption-changes'
Tom Rini [Tue, 13 Oct 2020 14:04:17 +0000 (10:04 -0400)]
Merge branch '2020-10-12-assorted-encryption-changes'

- Fix verified boot on BE targets
- Add support for multiple required keys in verified boots
- Add support for Initialization Vectors in AES keys in FIT images
- Assorted fixes in the RSA code

4 years agolib: rsa: superfluous initialization in rsa_verify()
Heinrich Schuchardt [Thu, 8 Oct 2020 18:53:13 +0000 (20:53 +0200)]
lib: rsa: superfluous initialization in rsa_verify()

Remove initialization of ret with unused value.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agorsa: fix retrieving public exponent on big-endian systems
Rasmus Villemoes [Tue, 6 Oct 2020 10:09:45 +0000 (12:09 +0200)]
rsa: fix retrieving public exponent on big-endian systems

Commit fdf0819afb (rsa: fix alignment issue when getting public
exponent) changed the logic to avoid doing an 8-byte access to a
possibly-not-8-byte-aligned address.

However, using rsa_convert_big_endian is wrong: That function converts
an array of big-endian (32-bit) words with the most significant word
first (aka a BE byte array) to an array of cpu-endian words with the
least significant word first. While the exponent is indeed _stored_ as
a big-endian 64-bit word (two BE words with MSW first), we want to
extract it as a cpu-endian 64 bit word. On a little-endian host,
swapping the words and byte-swapping each 32-bit word works, because
that's the same as byte-swapping the whole 64 bit word. But on a
big-endian host, the fdt32_to_cpu are no-ops, but
rsa_convert_big_endian() still does the word-swapping, breaking
verified boot.

To fix that, while still ensuring we don't do unaligned accesses, add
a little helper that first memcpy's the bytes to a local fdt64_t, then
applies fdt64_to_cpu(). [The name is chosen based on the
[bl]eXX_to_cpup in linux/byteorder/generic.h].

Fixes: fdf0819afb ("rsa: fix alignment issue when getting public exponent")
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agolib: rsa: check algo match in rsa_verify_with_keynode
Matthieu CASTET [Wed, 23 Sep 2020 17:11:44 +0000 (19:11 +0200)]
lib: rsa: check algo match in rsa_verify_with_keynode

The algo name should match between the FIT's signature node and the
U-Boot's control FDT.

If we do not check it, U-Boot's control FDT can expect sha512 hash but
nothing will prevent to accept image with sha1 hash if the signature is correct.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
4 years agofit: cipher: aes: allow to read the IV in the FIT image
Philippe Reynes [Thu, 17 Sep 2020 13:01:47 +0000 (15:01 +0200)]
fit: cipher: aes: allow to read the IV in the FIT image

This commit add the support in u-boot to read the IV
in the FIT image instead of u-boot device tree.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
4 years agofit: cipher: aes: allow to store the IV in the FIT image
Philippe Reynes [Thu, 17 Sep 2020 13:01:46 +0000 (15:01 +0200)]
fit: cipher: aes: allow to store the IV in the FIT image

Binaries may be encrypted in a FIT image with AES. This
algo needs a key and an IV (Initialization Vector). The
IV is provided in a file (pointer by iv-name-hint in the
ITS file) when building the ITB file.

This commits adds provide an alternative way to manage
the IV. If the property iv-name-hint is not provided in
the ITS file, the tool mkimage will generate an random
IV and store it in the FIT image.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
4 years agolib/hashtable: remove superfluous check
Heinrich Schuchardt [Thu, 20 Aug 2020 17:57:45 +0000 (19:57 +0200)]
lib/hashtable: remove superfluous check

We assign first_deleted = 0. There is no need to check its value without
any further assignment in between.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodoc: verified-boot: add required-mode information
Thirupathaiah Annapureddy [Mon, 17 Aug 2020 06:01:11 +0000 (23:01 -0700)]
doc: verified-boot: add required-mode information

Add documentation about 'required-mode' property in /signature node
in U-Boot's control FDT.

Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agotest: vboot: add tests for multiple required keys
Thirupathaiah Annapureddy [Mon, 17 Aug 2020 06:01:10 +0000 (23:01 -0700)]
test: vboot: add tests for multiple required keys

This patch adds vboot tests to verify the support for multiple
required keys using new required-mode DTB policy.

This patch also fixes existing test where dev
key is assumed to be marked as not required, although
it is marked as required.

Note that this patch re-added sign_fit_norequire().
sign_fit_norequire() was removed as part of the following:
commit b008677daf2a ("test: vboot: Fix pylint errors").
This patch leverages sign_fit_norequire() to fix the
existing bug.

Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agovboot: add DTB policy for supporting multiple required conf keys
Thirupathaiah Annapureddy [Mon, 17 Aug 2020 06:01:09 +0000 (23:01 -0700)]
vboot: add DTB policy for supporting multiple required conf keys

Currently FIT image must be signed by all required conf keys. This means
Verified Boot fails if there is a signature verification failure
using any required key in U-Boot DTB.

This patch introduces a new policy in DTB that can be set to any required
conf key. This means if verified boot passes with one of the required
keys, U-Boot will continue the OS hand off.

There were prior attempts to address this:
https://lists.denx.de/pipermail/u-boot/2019-April/366047.html
The above patch was failing "make tests".
https://lists.denx.de/pipermail/u-boot/2020-January/396629.html

Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoMerge branch 'for-next' of https://github.com/lftan/u-boot
Tom Rini [Mon, 12 Oct 2020 11:55:17 +0000 (07:55 -0400)]
Merge branch 'for-next' of https://github.com/lftan/u-boot

4 years agoMerge tag 'ti-v2021.01-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
Tom Rini [Mon, 12 Oct 2020 11:26:57 +0000 (07:26 -0400)]
Merge tag 'ti-v2021.01-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti

- Minor cleanup on K3 env variables
- Fix OSPI compatible for J721e
- Drop unused property in omap-usb2-phy
- Update Maintainer for am335x-guardian board.

4 years agommc: fsl_esdhc_imx: replace all readl/writel to esdhc_read32/esdhc_write32
Haibo Chen [Wed, 30 Sep 2020 07:52:23 +0000 (15:52 +0800)]
mmc: fsl_esdhc_imx: replace all readl/writel to esdhc_read32/esdhc_write32

Currently, readl/writel and esdhc_read32/esdhc_write32 are used. To align
the usage, change to only use esdhc_read32/esdhc_write32.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
4 years agommc: do not check argument of free() beforehand
Heinrich Schuchardt [Tue, 29 Sep 2020 19:48:08 +0000 (21:48 +0200)]
mmc: do not check argument of free() beforehand

free() checks if its argument in NULL. No need to check it twice.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agommc: sdhci: move the ADMA2 table handling into own module
Michael Walle [Wed, 23 Sep 2020 10:42:51 +0000 (12:42 +0200)]
mmc: sdhci: move the ADMA2 table handling into own module

There are other (non-SDHCI) controllers which supports ADMA2 descriptor
tables, namely the Freescale eSDHC. Instead of copying the code, move it
into an own module.

Signed-off-by: Michael Walle <michael@walle.cc>
4 years agommc: fsl_esdhc: simplify esdhc_setup_data()
Michael Walle [Wed, 23 Sep 2020 10:42:49 +0000 (12:42 +0200)]
mmc: fsl_esdhc: simplify esdhc_setup_data()

First, we need the waterlevel setting for PIO mode only. Secondy, both DMA
setup code is identical for both directions, except for the data pointer.
Thus, unify them.

Signed-off-by: Michael Walle <michael@walle.cc>
4 years agommc: fsl_esdhc: use dma-mapping API
Michael Walle [Wed, 23 Sep 2020 10:42:48 +0000 (12:42 +0200)]
mmc: fsl_esdhc: use dma-mapping API

Use the dma_{map,unmap}_single() calls. These will take care of the
flushing and invalidation of caches.

Signed-off-by: Michael Walle <michael@walle.cc>
4 years agommc: fsl_esdhc: simplify 64bit check for SDMA transfers
Michael Walle [Wed, 23 Sep 2020 10:42:47 +0000 (12:42 +0200)]
mmc: fsl_esdhc: simplify 64bit check for SDMA transfers

SDMA can only do DMA with 32 bit addresses. This is true for all
architectures (just doesn't apply to 32 bit ones). Simplify the code and
remove unnecessary CONFIG_FSL_LAYERSCAPE.

Also make the error message more concise.

Signed-off-by: Michael Walle <michael@walle.cc>
4 years agommc: fsl_esdhc_imx: remove the 1ms delay before sending command
Haibo Chen [Tue, 22 Sep 2020 10:11:43 +0000 (18:11 +0800)]
mmc: fsl_esdhc_imx: remove the 1ms delay before sending command

This 1ms delay before sending command already exist from the beginning
of the fsl_esdhc driver added in year 2008. Now this driver has been
split for two files: fsl_esdhc.c and fsl_esdhc_imx.c. fsl_esdhc_imx.c
only for i.MX series. i.MX series esdhc/usdhc do not need this 1ms delay
before sending any command. So remove this 1ms, this will save a lot
time if handling a large mmc data.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
4 years agommc: do not send cmd13 if the parameter 'send_status' is 0 for __mmc_switch
Haibo Chen [Tue, 22 Sep 2020 10:11:42 +0000 (18:11 +0800)]
mmc: do not send cmd13 if the parameter 'send_status' is 0 for __mmc_switch

According to the code logic in __mmc_switch, if the parameter 'send_status'
is zero, no need to send cmd13, just wait the stated timeout time, then
can return directly.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
4 years agoconfigs: lx2160ardb: enable eMMC HS400 mode support
Yangbo Lu [Tue, 1 Sep 2020 08:58:09 +0000 (16:58 +0800)]
configs: lx2160ardb: enable eMMC HS400 mode support

Enable eMMC HS400 mode support on LX2160ARDB.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agoarm: dts: lx2160ardb: support eMMC HS400 mode
Yangbo Lu [Tue, 1 Sep 2020 08:58:08 +0000 (16:58 +0800)]
arm: dts: lx2160ardb: support eMMC HS400 mode

Add properties related to eMMC HS400 mode.

mmc-hs400-1_8v;
bus-width = <8>;

They had been already in kernel dts file since the first
lx2160ardb dts patch.

b068890 arm64: dts: add LX2160ARDB board support

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: fix eMMC HS400 stability issue
Yangbo Lu [Tue, 1 Sep 2020 08:58:07 +0000 (16:58 +0800)]
mmc: fsl_esdhc: fix eMMC HS400 stability issue

There was a fix-up for eMMC HS400 stability issue in Linux.

Patch link:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
commit/?id=58d0bf843b49fa99588ac9f85178bd8dfd651b53

Description:
Currently only LX2160A eSDHC supports eMMC HS400. According to
a large number of tests, eMMC HS400 failed to work at 150MHz,
and for a few boards failed to work at 175MHz. But eMMC HS400
worked fine on 200MHz. We hadn't found the root cause but
setting eSDHC_DLLCFG0[DLL_FREQ_SEL] = 0 using slow delay chain
seemed to resovle this issue. Let's use this as fixup for now.

Introduce the fix-up in u-boot since the issue could be reproduced
in u-boot too.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: fix mmc->clock with actual clock
Yangbo Lu [Tue, 1 Sep 2020 08:58:06 +0000 (16:58 +0800)]
mmc: fsl_esdhc: fix mmc->clock with actual clock

Fix mmc->clock with actual clock which is divided by the
controller, and record it with priv->clock which was removed
accidentally.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: support eMMC HS400 mode
Yangbo Lu [Tue, 1 Sep 2020 08:58:05 +0000 (16:58 +0800)]
mmc: fsl_esdhc: support eMMC HS400 mode

The process for eMMC HS400 mode for eSDHC is,

1. Perform the Tuning Process at the HS400 target operating frequency.
   Latched the clock division value.
2. if read transaction, then set the SDTIMNGCTL[FLW_CTL_BG].
3. Switch to High Speed mode and then set the card clock frequency to
   a value not greater than 52Mhz
4. Clear TBCTL[TB_EN],tuning block enable bit.
5. Change to 8 bit DDR Mode
6. Switch the card to HS400 mode.
7. Set TBCTL[TB_EN], tuning block enable bit.
8. Clear SYSCTL[SDCLKEN]
9. Wait for PRSSTAT[SDSTB] to be set
10. Change the clock division to latched value.Set TBCTL[HS 400 mode]
    and Set SDCLKCTL[CMD_CLK_CTRL]
11. Set SYSCTL[SDCLKEN]
12. Wait for PRSSTAT[SDSTB] to be set
13. Set DLLCFG0[DLL_ENABLE] and DLLCFG0[DLL_FREQ_SEL].
14. Wait for delay chain to lock.
15. Set TBCTL[HS400_WNDW_ADJUST]
16. Again clear SYSCTL[SDCLKEN]
17. Wait for PRSSTAT[SDSTB] to be set
18. Set ESDHCCTL[FAF]
19. Wait for ESDHCCTL[FAF] to be cleared
20. Set SYSCTL[SDCLKEN]
21. Wait for PRSSTAT[SDSTB] to be set.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: add a mmc_hs400_prepare_ddr() interface
Yangbo Lu [Tue, 1 Sep 2020 08:58:04 +0000 (16:58 +0800)]
mmc: add a mmc_hs400_prepare_ddr() interface

Add a mmc_hs400_prepare_ddr() interface for controllers
which needs preparation before switching to DDR mode for
HS400 mode.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: add a hs400_tuning flag
Yangbo Lu [Tue, 1 Sep 2020 08:58:03 +0000 (16:58 +0800)]
mmc: add a hs400_tuning flag

Some controllers may have difference between HS200 tuning
and HS400 tuning, such as different registers setting,
different procedure, or different errata.

This patch is to add a hs400_tuning flag to identify the
tuning for HS400 mode.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: clean TBCTL[TB_EN] manually during init
Yangbo Lu [Tue, 1 Sep 2020 08:58:02 +0000 (16:58 +0800)]
mmc: fsl_esdhc: clean TBCTL[TB_EN] manually during init

Clean TBCTL[TB_EN] manually during init since it is not able to
be reset by reset all operation.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: support tuning for eMMC HS200
Yangbo Lu [Tue, 1 Sep 2020 08:58:01 +0000 (16:58 +0800)]
mmc: fsl_esdhc: support tuning for eMMC HS200

Support tuning process for eMMC HS200 for eSDHC.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: add a reinit() callback
Yangbo Lu [Tue, 1 Sep 2020 08:58:00 +0000 (16:58 +0800)]
mmc: fsl_esdhc: add a reinit() callback

Add a reinit() callback for mmc rescan.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: add a reinit() API
Yangbo Lu [Tue, 1 Sep 2020 08:57:59 +0000 (16:57 +0800)]
mmc: add a reinit() API

For DM_MMC, the controller re-initialization is needed to
clear old configuration for mmc rescan.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agophy: omap-usb2-phy: Drop usage of "ti, dis-chg-det-quirk" DT property
Vignesh Raghavendra [Thu, 8 Oct 2020 09:28:38 +0000 (14:58 +0530)]
phy: omap-usb2-phy: Drop usage of "ti, dis-chg-det-quirk" DT property

"ti,dis-chg-det-quirk" property is not part of Linux kernel DT binding
documentation.  Therefore drop this and instead use soc_device_match()
to distinguish b/w AM654 SR1.0 and SR2.0 devices similar to Linux kernel
driver.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoconfigs: am65x_evm: Use DEFAULT_LINUX_BOOT_ENV and remove overlayaddr
Nishanth Menon [Thu, 8 Oct 2020 02:48:01 +0000 (21:48 -0500)]
configs: am65x_evm: Use DEFAULT_LINUX_BOOT_ENV and remove overlayaddr

Use DEFAULT_LINUX_BOOT_ENV to define the standard addresses used in rest
of TI platforms as defined in ti_armv7_common.h

This avoids the standard pitfalls we've had with kernel images and fdt
addresses stomping on each other.

As part of this process, redefine overlayaddr to be dtboaddr (defined
in ti_armv7_common.h for this very purpose) and get rid of the
definition of overlayaddr..

Signed-off-by: Nishanth Menon <nm@ti.com>
4 years agoconfigs: j721e_evm: Get rid of overlayaddr
Nishanth Menon [Thu, 8 Oct 2020 02:48:00 +0000 (21:48 -0500)]
configs: j721e_evm: Get rid of overlayaddr

Now that we dont have any further users of overlayaddr, get rid of it.

Signed-off-by: Nishanth Menon <nm@ti.com>
4 years agoenv: ti: ufs: Use dtboaddr instead of overlayaddr
Nishanth Menon [Thu, 8 Oct 2020 02:47:59 +0000 (21:47 -0500)]
env: ti: ufs: Use dtboaddr instead of overlayaddr

Use dtboaddr to define the overlay address common to all TI platforms
instead of creating a new overlayaddr for the purpose.

Signed-off-by: Nishanth Menon <nm@ti.com>
4 years agoconfigs: j721e_evm: Use DEFAULT_LINUX_BOOT_ENV
Nishanth Menon [Thu, 8 Oct 2020 02:47:58 +0000 (21:47 -0500)]
configs: j721e_evm: Use DEFAULT_LINUX_BOOT_ENV

Use DEFAULT_LINUX_BOOT_ENV to define the standard addresses used in rest
of TI platforms as defined in ti_armv7_common.h

This avoids the standard pitfalls we've had with kernel images and fdt
addresses stomping on each other.

As part of this process, redefine overlayaddr to be dtboaddr (defined
in ti_armv7_common.h for this very purpose).. we will get rid of
overlayaddr later in the series.

Signed-off-by: Nishanth Menon <nm@ti.com>
4 years agodma: ti: k3-udma: Reset the channel during release
Vignesh Raghavendra [Thu, 17 Sep 2020 14:41:22 +0000 (20:11 +0530)]
dma: ti: k3-udma: Reset the channel during release

Reset the channel completely during channel release in order to clear
teardown bit before handing over to next user or jumping to Linux.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
4 years agoconfigs: am335x_evm_defconfig: Enable CONFIG_OF_LIBFDT_OVERLAY
Vignesh Raghavendra [Wed, 16 Sep 2020 10:53:20 +0000 (16:23 +0530)]
configs: am335x_evm_defconfig: Enable CONFIG_OF_LIBFDT_OVERLAY

This enables applying DTBOs at U-Boot prompt before booting to kernel.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoboard: ti: j721e: Fix OSPI node compatible
Vignesh Raghavendra [Thu, 17 Sep 2020 11:18:16 +0000 (16:48 +0530)]
board: ti: j721e: Fix OSPI node compatible

Update detect_enable_hyperflash() to look for "ti,am654-ospi" compatible
to match the upstream DT node.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoam335x, guardian: update the maintainer list
Moses Christopher [Mon, 7 Sep 2020 09:44:47 +0000 (09:44 +0000)]
am335x, guardian: update the maintainer list

I am leaving Bosch, so replacing myself with Gireesh

Signed-off-by: Moses Christopher <BollavarapuMoses.Christopher@in.bosch.com>
4 years agoMerge branch '2020-10-10-log-improvements'
Tom Rini [Sun, 11 Oct 2020 19:22:05 +0000 (15:22 -0400)]
Merge branch '2020-10-10-log-improvements'

- Assorted improvements to our log functionality.

4 years agodoc: remove redundant doc/README.log
Heinrich Schuchardt [Mon, 14 Sep 2020 08:12:19 +0000 (10:12 +0200)]
doc: remove redundant doc/README.log

doc/README.log was already moved to doc/develop/logging.rst but has been
recreated by an incorrect merge.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agolog: syslog: Handle errors in net_init
Sean Anderson [Sat, 12 Sep 2020 21:45:44 +0000 (17:45 -0400)]
log: syslog: Handle errors in net_init

Since the previous patch, net_init now exposes some errors, so check for
them.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agonet: Expose some errors generated in net_init
Sean Anderson [Sat, 12 Sep 2020 21:45:43 +0000 (17:45 -0400)]
net: Expose some errors generated in net_init

net_init does not always succeed, and there is no existing mechanism to
discover errors. This patch allows callers of net_init (such as net_init)
to handle errors. The root issue is that eth_get_dev can fail, but
net_init_loop doesn't expose that. The ideal way to fix eth_get_dev would
be to return an error with ERR_PTR, but there are a lot of callers, and all
of them just check if it's NULL. Another approach would be to change the
signature to something like

int eth_get_dev(struct udevice **pdev)

but that would require rewriting all of the many callers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agolog: Disable the syslog driver by default
Simon Glass [Sat, 12 Sep 2020 18:28:50 +0000 (12:28 -0600)]
log: Disable the syslog driver by default

This driver interferes with other sandbox tests since it causes log output
to be interspersed with "No ethernet found." messages. Disable this driver
by default.

Enable it for the syslog tests so that they still pass.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agolog: Add a way to enable/disable a log device
Simon Glass [Sat, 12 Sep 2020 18:28:49 +0000 (12:28 -0600)]
log: Add a way to enable/disable a log device

At present all log devices are enabled by default. Add a function to allow
devices to be disabled or enabled at runtime.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agolog: Drop #ifdef in log_test
Simon Glass [Sat, 12 Sep 2020 18:28:48 +0000 (12:28 -0600)]
log: Drop #ifdef in log_test

This is not needed as the Makefile only builds the file if CONFIG_LOG_TEST
is enabled. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agolog: Add a flag to enable log drivers
Simon Glass [Sat, 12 Sep 2020 18:28:47 +0000 (12:28 -0600)]
log: Add a flag to enable log drivers

At present there is no way to disable a log driver. But the syslog driver
causes (attempted) network traffic in sandbox every time a log message
is printed, which is often.

Add a flag to enable a log driver. Adjust struct log_device to use a short
for next_filter_num so that no more memory is used for devices. Also fix
a missing line in the struct log_driver comment while here.

To maintain compatibility, enable it for all drivers for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agolib: Allow hexdump to be used in SPL
Simon Glass [Sat, 12 Sep 2020 17:13:35 +0000 (11:13 -0600)]
lib: Allow hexdump to be used in SPL

It is sometimes useful to output hex dumps in SPL. Add a config option to
allow this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agolog: Allow LOG_DEBUG to always enable log output
Simon Glass [Sat, 12 Sep 2020 17:13:34 +0000 (11:13 -0600)]
log: Allow LOG_DEBUG to always enable log output

At present if CONFIG_LOG enabled, putting LOG_DEBUG at the top of a file
(before log.h inclusion) causes _log() to be executed for every log()
call, regardless of the build- or run-time logging level.

However there is no guarantee that the log record will actually be
displayed. If the current log level is lower than LOGL_DEBUG then it will
not be.

Add a way to signal that the log record should always be displayed and
update log_passes_filters() to handle this.

With the new behaviour, log_debug() will always log if LOG_DEBUG is
enabled.

Move log_test_syslog_nodebug() into its own file since it cannot be made
to work where it is, with LOG_DEBUG defined.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoMerge branch '2020-10-09-kconfig-reorg'
Tom Rini [Fri, 9 Oct 2020 22:10:24 +0000 (18:10 -0400)]
Merge branch '2020-10-09-kconfig-reorg'

- Re-organize a number of Kconfig related entries to be better organized
  for long term maintenance.

4 years agoconfigs: Resync with savedefconfig
Tom Rini [Fri, 9 Oct 2020 16:22:06 +0000 (12:22 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoKconfig: Create a new tools menu
Simon Glass [Fri, 11 Sep 2020 02:21:27 +0000 (20:21 -0600)]
Kconfig: Create a new tools menu

At present MKIMAGE_DTC_PATH is in the devicetree menu but not within
'devicetree control' since it does not relate to that. As a result it
shows up in the top menu.

It actually relates to the mkimage tool, so create a new tools menu for it
and move it there.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move BOARD_TYPES under init options
Simon Glass [Fri, 11 Sep 2020 02:21:26 +0000 (20:21 -0600)]
Kconfig: Move BOARD_TYPES under init options

This actually relates to something displayed on start-up, so move it into
that menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move BOUNCE_BUFFER under driver options
Simon Glass [Fri, 11 Sep 2020 02:21:25 +0000 (20:21 -0600)]
Kconfig: Move BOUNCE_BUFFER under driver options

This option does not belong at the top level. Move it under generic
driver options.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move VERSION_VARIABLE under environment
Simon Glass [Fri, 11 Sep 2020 02:21:24 +0000 (20:21 -0600)]
Kconfig: Move VERSION_VARIABLE under environment

This relates to the environment so should not be at the top level. Move
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: MISC_INIT_R and BOARD_LATE_INIT -> start-up hooks
Simon Glass [Fri, 11 Sep 2020 02:21:23 +0000 (20:21 -0600)]
Kconfig: MISC_INIT_R and BOARD_LATE_INIT -> start-up hooks

These are start-up hooks so put them under that menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move startup hooks under init options
Simon Glass [Fri, 11 Sep 2020 02:21:22 +0000 (20:21 -0600)]
Kconfig: Move startup hooks under init options

These hooks relate to U-Boot init so move them under that menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Create a new 'init options' menu
Simon Glass [Fri, 11 Sep 2020 02:21:21 +0000 (20:21 -0600)]
Kconfig: Create a new 'init options' menu

There are quite a few options at the top level relating to U-Boot init.
Move them into their own menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move DEFAULT_FDT_FILE under boot options
Simon Glass [Fri, 11 Sep 2020 02:21:20 +0000 (20:21 -0600)]
Kconfig: Move DEFAULT_FDT_FILE under boot options

This relates to booting since it is the default devicetree provided to
Linux. Move it under the 'boot options' menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move SUPPORT_RAW_INITRD under boot options
Simon Glass [Fri, 11 Sep 2020 02:21:19 +0000 (20:21 -0600)]
Kconfig: Move SUPPORT_RAW_INITRD under boot options

This relates to booting, so move it under the 'boot images' menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move misc boot options under 'boot options'
Simon Glass [Fri, 11 Sep 2020 02:21:18 +0000 (20:21 -0600)]
Kconfig: Move misc boot options under 'boot options'

There are a number of miscellaneous boot images at the top level of the
kconfig menu. Move these into the 'boot options' menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move CONFIG_BOOTDELAY under autoboot options
Simon Glass [Fri, 11 Sep 2020 02:21:17 +0000 (20:21 -0600)]
Kconfig: Move CONFIG_BOOTDELAY under autoboot options

This option relates to autoboot, so move it there.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move autoboot options under boot options
Simon Glass [Fri, 11 Sep 2020 02:21:16 +0000 (20:21 -0600)]
Kconfig: Move autoboot options under boot options

At present the autoboot options are in cmd/Kconfig but they don't really
relate to commands. They relate to booting, so move this menu under the
boot menu.

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