]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
3 years agoenv: Use better name for variable in env_get_f()
Marek Behún [Sun, 17 Oct 2021 15:36:32 +0000 (17:36 +0200)]
env: Use better name for variable in env_get_f()

The `nxt` variable actually points to the terminating null-byte of the
current env var, and the next env var is at `nxt + 1`, not `nxt`. So a
better name for this variable is `end`.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoenv: Use string pointer instead of indexes in env_get_f()
Marek Behún [Sun, 17 Oct 2021 15:36:31 +0000 (17:36 +0200)]
env: Use string pointer instead of indexes in env_get_f()

Since we no longer use env_get_char() to access n-th character of
linearized environment data, but rather access the arrays themselves, we
can convert the iteration to use string pointers instead of position
indexes.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoenv: Inline env_get_char() into its only user
Marek Behún [Sun, 17 Oct 2021 15:36:30 +0000 (17:36 +0200)]
env: Inline env_get_char() into its only user

This function is a relic from the past when environment was read from
underlying device one character at a time.

It is used only in the case when getting an environemnt variable prior
relocation, and the function is simple enough to be inlined there.

Since env_get_char() is being changed to simple access to an array, we
can drop the failing cases and simplify the code (this could have been
done before, since env_get_char() did not fail even before).

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoenv: Change env_match() to static and remove from header
Marek Behún [Sun, 17 Oct 2021 15:36:29 +0000 (17:36 +0200)]
env: Change env_match() to static and remove from header

This function was used by other parts of U-Boot in the past when
environment was read from underlying device one character at a time.

This is not the case anymore.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoexamples: api: glue: Remove comment that does not apply anymore
Marek Behún [Sun, 17 Oct 2021 15:36:28 +0000 (17:36 +0200)]
examples: api: glue: Remove comment that does not apply anymore

This comment is not true since commit 6215bd4c1fd6 ("api: Use hashtable
function for API_env_enum").

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoenv: Drop env_get_char_spec() and old, unused .get_char() implementations
Marek Behún [Sun, 17 Oct 2021 15:36:27 +0000 (17:36 +0200)]
env: Drop env_get_char_spec() and old, unused .get_char() implementations

Commit b2cdef4861be ("env: restore old env_get_char() behaviour")
dropped the .get_char() method from struct env_driver, but left the two
existing implementations (eeprom and nvram) in case someone would use
them by overwriting weak function env_get_char_spec().

Since this was never done in the 3.5 years, let's drop these methods and
simplify the code.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoenv: Fix documentation for env_get_f()
Marek Behún [Sun, 17 Oct 2021 15:36:26 +0000 (17:36 +0200)]
env: Fix documentation for env_get_f()

This function actually returns:
- the number of bytes written into @buf excluding the terminating
  NULL-byte, if there was enough space in @buf
- the number of bytes written into @buf including the terminating
  NULL-byte, if there wasn't enough space in @buf
- -1 if the variable is not found

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agodm: Fix util.h's broken include guard
Pierre-Clément Tosi [Thu, 30 Sep 2021 15:52:45 +0000 (17:52 +0200)]
dm: Fix util.h's broken include guard

Fix up the header's include guard to contain the definition of
dm_priv_to_rw(), which was erroneously added outside of it, by moving
its #endif to the end of the file (i.e. where it belongs). This removes
the risk of compilation errors resulting from the redefinition of that
function where the header might have been (indirectly) included more
than once.

Fixes: cfb9c9b77c2 ("dm: core: Use separate priv/plat data region")
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Cc: Simon Glass <sjg@chromium.org>
3 years agosandbox: provide /chosen/boot-hartid property
Heinrich Schuchardt [Sat, 28 Aug 2021 09:42:09 +0000 (11:42 +0200)]
sandbox: provide /chosen/boot-hartid property

On RISC-V the sandbox must provide the /chosen/boot-hartid in the
devicetree.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agobuildman: Add gcc-11.1.0 to the directory list
Tom Rini [Tue, 5 Oct 2021 16:20:36 +0000 (12:20 -0400)]
buildman: Add gcc-11.1.0 to the directory list

While CI has been using gcc-11.1.0 for a long time, we have not updated
buildman to match.  Correct this omission.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoCI: Switch running the nokia_rx51 test with in-container toolchain
Tom Rini [Fri, 15 Oct 2021 02:21:29 +0000 (22:21 -0400)]
CI: Switch running the nokia_rx51 test with in-container toolchain

Instead of fetching an arm toolchain to use, run the test with the one
that's already in the container image.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Thu, 21 Oct 2021 11:52:15 +0000 (07:52 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- Turris MOX and Omnia changes, mostly moving to Kconfig (Marek)
- a37xx: pci: Misc smaller fixes (Pali)
- cmd: tlv_eeprom: Fix building with DEBUG enabled (Sven)
- termios_linux.h: Fix tcsendbreak() implementation (Pali)
- mvebu: Add missing "if SPL" (Tom)

3 years agoarm: a37xx: pci: Fix condition for CRS response
Pali Rohár [Tue, 19 Oct 2021 09:05:01 +0000 (11:05 +0200)]
arm: a37xx: pci: Fix condition for CRS response

As stated in comment above the code, CRS response can be returned to OS
only for 4-byte PCI_VENDOR_ID config read request. So fix the code.

Fixes: 1d7ad68559e2 ("arm: a37xx: pci: Handle propagation of CRSSVE bit from PCIe Root Port")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: Add missing "if SPL"
Tom Rini [Fri, 15 Oct 2021 14:54:41 +0000 (10:54 -0400)]
arm: mvebu: Add missing "if SPL"

We can only select SPL_SKIP_LOWLEVEL_INIT if SPL is enabled, otherwise
we get a warning about unmet dependencies on platforms that don't use
SPL.

Fixes: cf47a8cf8f7e ("arm: mvebu: Select SPL_SKIP_LOWLEVEL_INIT on ARMADA_32BIT")
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: a37xx: pci: Do not allow setting bars on PCI Bridge
Pali Rohár [Tue, 12 Oct 2021 11:19:19 +0000 (13:19 +0200)]
arm: a37xx: pci: Do not allow setting bars on PCI Bridge

PCI Bridge which represents Aardvark PCIe Root Port does not have
configurable bars.

So ensure that write operation to bars registers on PCI Bridge is noop and
bars registers always contain zero address which indicates that bars are
unsupported.

After this change U-Boot 'pci bar 0.0.0' command does not show any
allocated bars for PCI Bridge device.

Signed-off-by: Pali Rohár <pali@kernel.org>
Fixes: cb056005dc67 ("arm: a37xx: pci: Add support for accessing PCI Bridge on root bus")
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_omnia: Move CONFIG_SPL_DRIVERS_MISC to Kconfig
Marek Behún [Sat, 9 Oct 2021 17:33:46 +0000 (19:33 +0200)]
arm: mvebu: turris_omnia: Move CONFIG_SPL_DRIVERS_MISC to Kconfig

Instead of declaring CONFIG_SPL_DRIVERS_MISC in board config header,
select it in Kconfig.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_omnia: Move SPL's SYS_MALLOC_SIMPLE to Kconfig
Marek Behún [Sat, 9 Oct 2021 17:33:45 +0000 (19:33 +0200)]
arm: mvebu: turris_omnia: Move SPL's SYS_MALLOC_SIMPLE to Kconfig

Instead of declaring CONFIG_SYS_MALLOC_SIMPLE dependant on
CONFIG_SPL_BUILD in board config header, select
CONFIG_SPL_SYS_MALLOC_SIMPLE in Kconfig.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_omnia: Use show_board_info()
Marek Behún [Sat, 9 Oct 2021 17:33:44 +0000 (19:33 +0200)]
arm: mvebu: turris_omnia: Use show_board_info()

We are printing board information in checkboard() function, which is
called from the default weak implementation of show_board_info().

Rename checkboard() to show_board_info(). This throws away the weak
implementation of show_board_info().

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_omnia: Overwrite ethaddr only if invalid
Marek Behún [Sat, 9 Oct 2021 17:33:43 +0000 (19:33 +0200)]
arm: mvebu: turris_omnia: Overwrite ethaddr only if invalid

Currently we always overwrite ethaddrs with those from EEPROM.

In order to allow user to use a cloned MAC address in U-Boot, change the
code so that it sets ethaddr variables only if they aren't set or are
invalid.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_mox: Better check for valid ethernet addresses in env
Marek Behún [Sat, 9 Oct 2021 17:33:42 +0000 (19:33 +0200)]
arm: mvebu: turris_mox: Better check for valid ethernet addresses in env

Currently we overwrite ethaddr and eth1addr only if these variables
don't exist.

Better overwrite them even if the env variable exists, but is invalid -
eth_env_get_enetaddr_by_index() checks for validity.

Refactor the code to use a for cycle.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_mox: Always handle reset button
Marek Behún [Sat, 9 Oct 2021 17:33:41 +0000 (19:33 +0200)]
arm: mvebu: turris_mox: Always handle reset button

Handle reset button even if we can't configure modules.

This happens if we fail retrieving reset GPIO with which we can reset
the modules.

(Note that this GPIO is different from reset button GPIO.)

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_mox: Use show_board_info()
Marek Behún [Sat, 9 Oct 2021 17:33:40 +0000 (19:33 +0200)]
arm: mvebu: turris_mox: Use show_board_info()

We are printing board information in last_stage_init(), but U-Boot has
dedicated function, show_board_info(), for this.

Move code which prints board information (board version, serial number,
module topology, ...) to show_board_info().

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_mox: Cosmetic update for board config header
Marek Behún [Sat, 9 Oct 2021 17:33:39 +0000 (19:33 +0200)]
arm: mvebu: turris_mox: Cosmetic update for board config header

Reorder the definitions in Turris MOX' board config header, drop the
comment relics from when this file was copied, fix indentation.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: kirkwood, mvebu: Remove CONFIG_SYS_RESET_ADDRESS option
Marek Behún [Sat, 9 Oct 2021 17:33:38 +0000 (19:33 +0200)]
arm: kirkwood, mvebu: Remove CONFIG_SYS_RESET_ADDRESS option

This option is not used anywhere.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: a3720: Create Kconfig option for I2C_MV
Marek Behún [Sat, 9 Oct 2021 17:33:37 +0000 (19:33 +0200)]
arm: mvebu: a3720: Create Kconfig option for I2C_MV

Move the config option CONFIG_I2C_MV to a Kconfig option
CONFIG_SYS_I2C_MV and move the default definition from config header
files into defconfigs.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_mox: Move options to defconfig
Marek Behún [Sat, 9 Oct 2021 17:33:36 +0000 (19:33 +0200)]
arm: mvebu: turris_mox: Move options to defconfig

Move config options CONFIG_LAST_STAGE_INIT and
CONFIG_DISPLAY_BOARDINFO_LATE to turris_mox_defconfig.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agotools: termios_linux.h: Fix tcsendbreak() implementation
Pali Rohár [Wed, 6 Oct 2021 12:30:25 +0000 (14:30 +0200)]
tools: termios_linux.h: Fix tcsendbreak() implementation

There are two Linux ioctls which implements tcsendbreak() functionality:
TCSBRK and TCSBRKP

TCSBRK with non-zero parameter implements tcdrain() and with zero parameter
implements tcsendbreak() for duration of 0.25s.

TCSBRKP with zero parameter is same as TCSBRK and with non-zero parameter
implements tcsendbreak() for duration in deciseconds specified by
parameter. TCSBRKP does not have to be provided by older toolchain
versions.

So tcsendbreak() has to either use TCSBRK with zero parameter or TCSBRKP
with any parameter.

Fix code to use TCSBRKP and fallback to TCSBRK with 0.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agocmd: tlv_eeprom
Sven Auhagen [Sun, 12 Sep 2021 07:25:44 +0000 (09:25 +0200)]
cmd: tlv_eeprom

The function show_eeprom is missing int i if debug is enabled.

Signed-off-by: Sven Auhagen <sven.auhagen@voleatech.de>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoMerge tag 'u-boot-imx-20211020' of https://source.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Wed, 20 Oct 2021 18:24:09 +0000 (14:24 -0400)]
Merge tag 'u-boot-imx-20211020' of https://source.denx.de/u-boot/custodians/u-boot-imx

u-boot-imx-20211020
-------------------

First PR from u-boot-imx for 2022.01

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/9535

- new board: kontron-sl-mx8mm
- imx8m:
- fix secure boot
- imx ESDHC: fixes
- i.MX53: Support thum2, bmode and fixes for Menlo board
  usbarmory switch to Ethernet driver model
- imx6 :
- DDR calibration for Toradex boards
- imx7:
- Fixes
- Updated gateworks boards (ventana / venice)

# gpg verification failed.

3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Wed, 20 Oct 2021 18:23:08 +0000 (14:23 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

- Assorted warning fixes, io read/write bugfix

3 years agoimx8mm-cl-iot-gate-optee: align config with Kconfig
Stefano Babic [Wed, 20 Oct 2021 10:13:44 +0000 (12:13 +0200)]
imx8mm-cl-iot-gate-optee: align config with Kconfig

Due to missing configs, CI goes in deadlock until an OOM is tracked. Add
CONFIG_SYS_LOAD_ADDR and replace CONFIG_SYS_EXTRA_OPTIONS with
CONFIG_IMX_CONFIG.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org>
CC: Fabio Estevam <festevam@denx.de>
3 years agokontron-sl-mx8mm: fix missing configs and deadlock in CI
Stefano Babic [Wed, 20 Oct 2021 09:55:25 +0000 (11:55 +0200)]
kontron-sl-mx8mm: fix missing configs and deadlock in CI

Even if board can be successfuly built, CI goes in deadlock (see thread
on https://www.mail-archive.com/u-boot@lists.denx.de/msg419663.html).
This is caused by SYS_CONFIG set in header file and because defconfig
for the board is out of sync with Kconfig. As result, buildman goes on
to read from stdin until an OOM is reached.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Frieder Schrempf <frieder.schrempf@kontron.de>
3 years agobuildman: Detect Kconfig loops
Simon Glass [Wed, 20 Oct 2021 03:43:24 +0000 (21:43 -0600)]
buildman: Detect Kconfig loops

Hex and int Kconfig options are supposed to have defaults. This is so we
can configure U-Boot without having to enter particular values for the
items that don't have specific values in the board's defconfig file.

If this rule is not followed, then introducing a new Kconfig can produce
a loop like this:

   Break things (BREAK_ME) [] (NEW)
   Error in reading or end of file.

   Break things (BREAK_ME) [] (NEW)
   Error in reading or end of file.

The continues forever since buildman passes /dev/null to 'conf', and
the build system just tries again. Eventually there is so much output that
buildman runs out of memory.

We can detect this situation by looking for a symbol (like 'BREAK_ME')
which has no default (the '[]' above) and is marked as new. If this
appears multiple times in the output, we know something is wrong.

Add a filter function for the output which detects this situation. Allow
it to return True to terminate the process. Implement this termination in
cros_subprocess.

With this we get a nice message:

   buildman --board sandbox -T0
   Building current source for 1 boards (0 threads, 32 jobs per thread)
      sandbox:  w+   sandbox
   +.config:66:warning: symbol value '' invalid for BREAK_ME
   +
   +Error in reading or end of file.
   +make[3]: *** [scripts/kconfig/Makefile:75: syncconfig] Terminated
   +make[2]: *** [Makefile:569: syncconfig] Terminated
   +make: *** [Makefile:177: sub-make] Terminated
   +(** did you define an int/hex Kconfig with no default? **)

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agobuildman: Write output even on fatal error
Simon Glass [Wed, 20 Oct 2021 03:43:23 +0000 (21:43 -0600)]
buildman: Write output even on fatal error

At present buildman does not write any output (to the 'out' and 'err)
files if the build terminates with a fatal error. This is to avoid adding
lots of spam to the logs.

However there are times when this is actually useful, such as when the
build fails for an obscure reason such as a Kconfig loop.

Update the logic to always write the output, so that the user gets a clue
as to what is happening.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoriscv: Avoid io read/write cause wrong result
Nick Hu [Mon, 18 Oct 2021 03:50:05 +0000 (11:50 +0800)]
riscv: Avoid io read/write cause wrong result

io read/write may cause wrong result because they may read/write data
from/to register instead of memory. Add 'volatile' to avoid it.

Signed-off-by: Nick Hu <nick.hu@sifive.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
3 years agoboard: sifive: Fix -Wint-to-pointer-cast warning
Bin Meng [Sun, 12 Sep 2021 03:15:16 +0000 (11:15 +0800)]
board: sifive: Fix -Wint-to-pointer-cast warning

The following warning is seen in unleashed.c in a 32-bit build:

  warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Cast with uintptr_t.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoram: sifive: Fix -Wint-to-pointer-cast warnings
Bin Meng [Sun, 12 Sep 2021 03:15:15 +0000 (11:15 +0800)]
ram: sifive: Fix -Wint-to-pointer-cast warnings

The following warning is seen in sifive_ddr.c in a 32-bit build:

  warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Change to use dev_read_addr_index_ptr().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agonet: macb: Fix -Wint-to-pointer-cast warnings
Bin Meng [Sun, 12 Sep 2021 03:15:14 +0000 (11:15 +0800)]
net: macb: Fix -Wint-to-pointer-cast warnings

The following warning is seen in macb.c in a 32-bit build:

  warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Change to use dev_read_addr_index_ptr(), or cast with uintptr_t.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agodm: Provide dev_read_addr_index_ptr() wrapper
Bin Meng [Sun, 12 Sep 2021 03:15:13 +0000 (11:15 +0800)]
dm: Provide dev_read_addr_index_ptr() wrapper

Like dev_read_addr_ptr(), provide a wrapper for the indexed version.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agodm: core: Add a new API devfdt_get_addr_index_ptr()
Bin Meng [Sun, 12 Sep 2021 03:15:12 +0000 (11:15 +0800)]
dm: core: Add a new API devfdt_get_addr_index_ptr()

At present there is only devfdt_get_addr_ptr() which only returns
the first <addr, size> pair in the 'reg' property. Add a new API
devfdt_get_addr_index_ptr() to return the indexed pointer.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoi2c: ocores: Fix -Wint-to-pointer-cast warning
Bin Meng [Sun, 12 Sep 2021 03:15:11 +0000 (11:15 +0800)]
i2c: ocores: Fix -Wint-to-pointer-cast warning

The following warning is seen in ocores_i2c.c in a 32-bit build:

  warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Change to use dev_read_addr_ptr().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agogpio: sifive: Fix -Wint-to-pointer-cast warning
Bin Meng [Sun, 12 Sep 2021 03:15:10 +0000 (11:15 +0800)]
gpio: sifive: Fix -Wint-to-pointer-cast warning

dev_read_addr() returns a value of type fdt_addr_t which is a 64-bit
address and plat->base is a pointer. In a 32-bit build, this causes the
following warning seen when building sifive-gpio.c:

  warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Change to use dev_read_addr_ptr().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoclk: sifive: Fix -Wint-to-pointer-cast warning
Bin Meng [Sun, 12 Sep 2021 03:15:09 +0000 (11:15 +0800)]
clk: sifive: Fix -Wint-to-pointer-cast warning

dev_read_addr() returns a value of type fdt_addr_t which is a 64-bit
address and pd->va is a pointer. In a 32-bit build, this causes the
following warning seen when building sifive-prci.c:

  warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Change to use dev_read_addr_ptr().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agocache: sifive: Fix -Wint-to-pointer-cast warning
Bin Meng [Sun, 12 Sep 2021 03:15:08 +0000 (11:15 +0800)]
cache: sifive: Fix -Wint-to-pointer-cast warning

The following warning is seen in cache-sifive-ccache.c in a 32-bit build:

  warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Fix by casting it with uintptr_t.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoboard: sifive: Fix a potential build warning in board_fdt_blob_setup()
Bin Meng [Sat, 11 Sep 2021 14:31:23 +0000 (22:31 +0800)]
board: sifive: Fix a potential build warning in board_fdt_blob_setup()

Commit 47d73ba4f4a4 ("board: sifive: overwrite board_fdt_blob_setup in u-boot proper")
added a board-specific implementation of board_fdt_blob_setup() which
takes a pointer as the return value, but it does not return anything
if CONFIG_OF_SEPARATE is not enabled. This will cause a build warning
seen when testing booting S-mode U-Boot directly from QEMU, per the
instructions in [1]:

  board/sifive/unleashed/unleashed.c: In function ‘board_fdt_blob_setup’:
  board/sifive/unleashed/unleashed.c:125:1: warning: control reaches end of non-void function [-Wreturn-type]

Return &_end as the default case.

[1] https://qemu.readthedocs.io/en/latest/system/riscv/sifive_u.html#running-u-boot

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Rick Chen <rick@andestech.com>
3 years agoMerge branch '2021-10-19-assorted-changes'
Tom Rini [Wed, 20 Oct 2021 00:45:12 +0000 (20:45 -0400)]
Merge branch '2021-10-19-assorted-changes'

- Assorted minor fixes and a new GPIO driver

3 years agoclk: fixed_rate: add dummy disable() function
Samuel Holland [Wed, 13 Oct 2021 00:40:29 +0000 (19:40 -0500)]
clk: fixed_rate: add dummy disable() function

commit 6bf6d81c1112 ("clk: fixed_rate: add dummy enable() function")
implemented .enable, so fixed rate clocks can be used where drivers
might call clk_enable(). Implement the .disable op for the same reason;
some drivers, e.g. USB PHYs, may attempt to disable clocks at runtime.

Signed-off-by: Samuel Holland <samuel@sholland.org>
3 years agoarm: total_compute: increase DRAM to 8GB
Usama Arif [Tue, 12 Oct 2021 12:43:16 +0000 (13:43 +0100)]
arm: total_compute: increase DRAM to 8GB

The extra 6GB start at 0x8080000000.

Signed-off-by: Usama Arif <usama.arif@arm.com>
3 years agotools: Stop re-defining -std= when building tools
Tom Rini [Mon, 11 Oct 2021 15:11:41 +0000 (11:11 -0400)]
tools: Stop re-defining -std= when building tools

While we intentionally set -std=gnu11 for building host tools, and have
for quite some time, we never dropped -std=gnu99 from tools/Makefile.
This resulted in passing -std=gnu11 ... -std=gnu99 when building, and
gnu99 would win.  This in turn would result now in warnings such as:
tools/mkeficapsule.c:25:15: warning: redefinition of typedef 'u32' is a C11 feature [-Wtypedef-redefinition]
typedef __u32 u32;
              ^

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoconfigs: am335x_evm: enable CONFIG_CLK_TI_CTRL
Amjad Ouled-Ameur [Mon, 11 Oct 2021 12:27:38 +0000 (14:27 +0200)]
configs: am335x_evm: enable CONFIG_CLK_TI_CTRL

This enables the clock controller driver support on TI's SoCs. This will
fix this GPIO issue at boot time:
request_and_set_gpio: Unable to request GPIO_PR1_MII_CTRL
request_and_set_gpio: Unable to request GPIO_MUX_MII_CTRL
request_and_set_gpio: Unable to request GPIO_FET_SWITCH_CTRL
request_and_set_gpio: Unable to request GPIO_PHY_RESET

This issue comes from the fact that the clock controller is not probed.

Enable the TI's clock controller driver support to solve this.

Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
3 years agodrivers/gpio: add support for MAX7320 i2c i/o expander
Hannes Schmelzer [Fri, 1 Oct 2021 11:37:57 +0000 (13:37 +0200)]
drivers/gpio: add support for MAX7320 i2c i/o expander

This commit adds support for the MAX7320 (and clones) gpio expander.

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
3 years agoMakefile: Only build dtc if needed
Simon Glass [Wed, 22 Sep 2021 17:34:44 +0000 (11:34 -0600)]
Makefile: Only build dtc if needed

At present U-Boot always builds dtc if CONFIG_OF_CONTROL is defined, even
when DTC is provided. The built dtc is not actually used, so this is a
waste of time.

Update the Makefile logic to build dtc only if one is not provided to the
build with the DTC variable. Add documentation to explain this.

This saves about 3.5 seconds of elapsed time on a clean build of
sandbox_spl for me.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoRevert "kbuild: remove unused dtc-version.sh script"
Simon Glass [Wed, 22 Sep 2021 17:34:43 +0000 (11:34 -0600)]
Revert "kbuild: remove unused dtc-version.sh script"

We need this to make building dtc optional. It makes no sense to build our
own dtc if the system one works correctly.

This reverts commit ddb87a0b40262ff99d675e946f57427642303938.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoMerge branch '2021-10-18-OF_xxx-cleanup'
Tom Rini [Tue, 19 Oct 2021 13:07:07 +0000 (09:07 -0400)]
Merge branch '2021-10-18-OF_xxx-cleanup'

- Clean things up and rework such that we can drop OF_PRIOR_STAGE

3 years agoARM: imx: mx5: Add altbootcmd and resets to M53Menlo
Marek Vasut [Sat, 11 Sep 2021 22:40:00 +0000 (00:40 +0200)]
ARM: imx: mx5: Add altbootcmd and resets to M53Menlo

Bulletproof the default boot command with reset statements in case
any command in the chain would fail. In case a failure were to happen,
the board will reset, increment boot counter and retry the procedure.
In case the failures persist and the boot counter reaches the bootlimit,
U-Boot starts altbootcmd instead of the default bootcmd boot command.

The altbootcmd swaps the default boot partition for the other boot
partition, which is an identical copy or an older copy, and tries
booting from that one instead.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
3 years agoARM: imx: mx5: Enable Thumb2 build on MX53 Menlo board
Marek Vasut [Sat, 11 Sep 2021 22:39:59 +0000 (00:39 +0200)]
ARM: imx: mx5: Enable Thumb2 build on MX53 Menlo board

Build U-Boot in Thumb2 mode for M53Menlo board, this makes better
use of the CPU since the instruction density is higher.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
3 years agoARM: imx: mx5: Enable BMODE command on MX53 Menlo board
Marek Vasut [Sat, 11 Sep 2021 22:39:58 +0000 (00:39 +0200)]
ARM: imx: mx5: Enable BMODE command on MX53 Menlo board

The board can do primary/secondary boot switching, enable the bmode command.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
3 years agoboard: ea: mx7ulp_com: move setting CONFIG_BOOTCOMMAND to defconfig
Ricardo Salveti [Thu, 26 Aug 2021 11:04:24 +0000 (14:04 +0300)]
board: ea: mx7ulp_com: move setting CONFIG_BOOTCOMMAND to defconfig

Move setting CONFIG_BOOTCOMMAND to the mx7ulp_com_defconfig file.
It also allows replacing the default CONFIG_BOOTCOMMAND without
code modification.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 years agosmegw01: Select IMX_HAB
Fabio Estevam [Tue, 24 Aug 2021 10:58:48 +0000 (07:58 -0300)]
smegw01: Select IMX_HAB

Select IMX_HAB to allow secure boot.

Signed-off-by: Fabio Estevam <festevam@denx.de>
3 years agosmegw01: Add redundant environment support
Fabio Estevam [Tue, 24 Aug 2021 10:58:47 +0000 (07:58 -0300)]
smegw01: Add redundant environment support

Add redundant environment support as it is required
by SWUpdate.

While at it, place the CONFIG_ENV_OFFSET at 0x100000 to allow
more headroom.

Signed-off-by: Fabio Estevam <festevam@denx.de>
3 years agoapalis-imx6: use dynamic DDR calibration
Francesco Dolcini [Tue, 31 Aug 2021 09:46:06 +0000 (11:46 +0200)]
apalis-imx6: use dynamic DDR calibration

Enable dynamic DDR calibration to have a reliable behavior on edge
temperatures conditions.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
3 years agocolibri-imx6: use dynamic DDR calibration
Francesco Dolcini [Tue, 31 Aug 2021 09:46:05 +0000 (11:46 +0200)]
colibri-imx6: use dynamic DDR calibration

Enable dynamic DDR calibration to have a reliable behavior on edge
temperatures conditions.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
3 years agotreewide: Remove OF_PRIOR_STAGE
Ilias Apalodimas [Mon, 11 Oct 2021 21:00:15 +0000 (00:00 +0300)]
treewide: Remove OF_PRIOR_STAGE

The previous patches removed OF_PRIOR_STAGE from the last consumers of the
Kconfig option.  Cleanup any references to it in documentation,  code and
configuration options.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoboard: arm: Remove OF_PRIOR_STAGE from the remaining Arm boards
Ilias Apalodimas [Mon, 11 Oct 2021 21:00:14 +0000 (00:00 +0300)]
board: arm: Remove OF_PRIOR_STAGE from the remaining Arm boards

At some point back in 2018 prior_stage_fdt_address and OF_PRIOR_STAGE got
introduced,  in order to support a DTB handed over by an earlier stage boo
loader.  However we have another option in the Kconfig (OF_BOARD) which has
identical semantics.

So let's remove the option in an effort to simplify U-Boot's config and DTB
management,  and use OF_BOARD instead.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoriscv: Remove OF_PRIOR_STAGE from RISC-V boards
Ilias Apalodimas [Mon, 11 Oct 2021 21:00:13 +0000 (00:00 +0300)]
riscv: Remove OF_PRIOR_STAGE from RISC-V boards

At some point back in 2018 prior_stage_fdt_address and OF_PRIOR_STAGE got
introduced,  in order to support a DTB handed over by an earlier stage boo
loader.  However we have another option in the Kconfig (OF_BOARD) which has
identical semantics.

On RISC-V some of the boards pick up the DTB from a1 and copy it in their
private gd_t.  Apart from that they copy it to prior_stage_fdt_address,  if
the Kconfig option is selected, which is unnecessary.

So let's switch the config option for those boards to OF_BOARD and define
the required board_fdt_blob_setup() for them.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoMerge tag 'u-boot-rockchip-20211015' of https://source.denx.de/u-boot/custodians...
Tom Rini [Mon, 18 Oct 2021 01:13:49 +0000 (21:13 -0400)]
Merge tag 'u-boot-rockchip-20211015' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

- Fix for Rockchip mmc HS400 mode;
- Fix for px30 board Odroid Go;
- rockchip_sfc update;
- rk3568 clk update;
- doc fix;

3 years agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-tegra
Tom Rini [Fri, 15 Oct 2021 19:58:16 +0000 (15:58 -0400)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-tegra

On merge, fixup order of fdtdec_add_reserved_memory parameters in
arch/arm/cpu/armv8/fsl-layerscape/soc.c

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge branch '2021-10-15-Kconfig-migrations'
Tom Rini [Fri, 15 Oct 2021 17:45:15 +0000 (13:45 -0400)]
Merge branch '2021-10-15-Kconfig-migrations'

- Assorted Kconfig migration patches

3 years agoconfigs: Resync with savedefconfig
Tom Rini [Fri, 15 Oct 2021 12:06:20 +0000 (08:06 -0400)]
configs: Resync with savedefconfig

Resync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_USB_EHCI_IS_TDI to Kconfig
Marek Behún [Sat, 9 Oct 2021 13:27:35 +0000 (15:27 +0200)]
Convert CONFIG_USB_EHCI_IS_TDI to Kconfig

On mvebu this is defined if and only if !ARM64.

Otherwise it is defined for boards with ARCH_MX23, ARCH_TEGRA and
ARCH_ZYNQ, and also for SOC_AR934X (tplink_wdr4300).

Signed-off-by: Marek Behún <marek.behun@nic.cz>
3 years agoDrop CONFIG_USB_EHCI_KIRKWOOD
Marek Behún [Sat, 9 Oct 2021 13:27:34 +0000 (15:27 +0200)]
Drop CONFIG_USB_EHCI_KIRKWOOD

This config option doesn't do anything.

nas220 uses USB_EHCI_MARVELL.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
3 years agoConvert CONFIG_USB_EHCI_MXS to Kconfig
Marek Behún [Sat, 9 Oct 2021 13:27:33 +0000 (15:27 +0200)]
Convert CONFIG_USB_EHCI_MXS to Kconfig

This option is only used for
  mx23evk_defconfig
  mx23_olinuxino_defconfig
which are the only i.MX23 boards.

Add depend on ARCH_MX23 and default to y.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
3 years agoRename CONFIG_EHCI_IS_TDI to CONFIG_USB_EHCI_IS_TDI
Marek Behún [Sat, 9 Oct 2021 13:27:32 +0000 (15:27 +0200)]
Rename CONFIG_EHCI_IS_TDI to CONFIG_USB_EHCI_IS_TDI

In preparation for moving this option to Kconfig, rename it to be
consistent with other USB EHCI Kconfig options.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
3 years agommc: rockchip_sdhci: enable strobe line for HS400
Yifeng Zhao [Fri, 15 Oct 2021 08:41:27 +0000 (16:41 +0800)]
mmc: rockchip_sdhci: enable strobe line for HS400

The default configuration of rk3399 EMMC PHY does not enable the
strobe line, and EMMC controller will got data transmission error
at HS400 mode.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
3 years agoclk: rockchip: rk3568: update clks
Elaine Zhang [Tue, 12 Oct 2021 08:43:00 +0000 (16:43 +0800)]
clk: rockchip: rk3568: update clks

fix up ppll init freq.
support tclk_emmc.
add freq (26M) for mmc device.
fix up the sfc clk rate unit error.

Change in V2:
remove change id.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
3 years agospi: rockchip_sfc: Using read_poll
Jon Lin [Fri, 17 Sep 2021 13:14:59 +0000 (21:14 +0800)]
spi: rockchip_sfc: Using read_poll

Using read_poll logic.

Tested-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
3 years agospi: rockchip_sfc: Implement set_speed logic
Jon Lin [Fri, 17 Sep 2021 13:14:58 +0000 (21:14 +0800)]
spi: rockchip_sfc: Implement set_speed logic

Set clock related processing into set_speed logic. And Optimize
printing format.

Tested-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
3 years agorockchip: px30: sync serial flash controller bindings with mainline
Chris Morgan [Sat, 21 Aug 2021 01:46:58 +0000 (20:46 -0500)]
rockchip: px30: sync serial flash controller bindings with mainline

The devicetree submitted and approved for the mainline linux kernel is
slightly different than the one present here. This syncs both
devicetrees (for the Rockchip SFC node at least) present on the PX30
and the Odroid Go Advance. Changes include renaming the flash node,
reordering the values in the SFC node for the rk3326-odroid-go2,
changing the name of the cs pinctrl node to cs0, and updating the
u-boot specific tree to utilize the new flash node value.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
3 years agodoc: rockchip: write all brand names with a capital
Johan Jonker [Fri, 20 Aug 2021 17:27:59 +0000 (19:27 +0200)]
doc: rockchip: write all brand names with a capital

Brand names are supposed to be written with a capital,
so change them all.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
3 years agodoc: rockchip: sort rockchip support list for rk3188
Johan Jonker [Fri, 20 Aug 2021 17:27:58 +0000 (19:27 +0200)]
doc: rockchip: sort rockchip support list for rk3188

In the list of mainline U-boot supported Rockchip boards
rk3188 is placed below under the name rv3188. Give back it's
original name and sort the list in alphabetical order.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
3 years agorockchip: rk33xx: Drop ROCKCHIP_USB2_PHY on boards without it
Peter Robinson [Thu, 12 Aug 2021 09:11:32 +0000 (10:11 +0100)]
rockchip: rk33xx: Drop ROCKCHIP_USB2_PHY on boards without it

The 64 bit rk33xx chips don't have the ROCKCHIP_USB2_PHY IP so
drop the configs as they were likely copied over from other
boards during enablement.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
3 years agorockchip: board: remove SCLK_GPU from U-Boot DT
Chris Morgan [Thu, 5 Aug 2021 16:48:48 +0000 (11:48 -0500)]
rockchip: board: remove SCLK_GPU from U-Boot DT

Starting with commit 92f1e9a4b31c ("clk: Detect failure to set
defaults") the clk driver for the PX30 would fail to probe for the
Odroid Go Advance. This patch is to remove the clock for the GPU from
the U-Boot specific devicetree, as that clock is not supported by the
U-Boot clk_px30 driver.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
3 years agorockchip: px30: add support for setting cpll clock
Chris Morgan [Thu, 5 Aug 2021 16:48:47 +0000 (11:48 -0500)]
rockchip: px30: add support for setting cpll clock

Starting with commit 92f1e9a4b31c ("clk: Detect failure to set
defaults") the clk driver for the PX30 for the Odroid Go Advance would
no longer probe correctly, because setting the cpll and gpu clocks are
not supported with the clk_px30 U-Boot driver. This adds support for
setting the cpll clock to the clk_px30 driver. Another patch will
update the U-Boot specific device-tree to remove the GPU clock which is
not used by U-Boot.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
3 years agoRemove unused CONFIG_CONS_NONE
Patrick Delaunay [Mon, 4 Oct 2021 09:59:54 +0000 (11:59 +0200)]
Remove unused CONFIG_CONS_NONE

Remove the latest reference of CONFIG_CONS_NONE in code

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoRemove unused CONFIG_SYS_FLASH_AMD_CHECK_DQ7
Patrick Delaunay [Mon, 4 Oct 2021 09:59:53 +0000 (11:59 +0200)]
Remove unused CONFIG_SYS_FLASH_AMD_CHECK_DQ7

Remove the latest reference of CONFIG_SYS_FLASH_AMD_CHECK_DQ7 in code

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoRemove unused CONFIG_NO_RELOCATION
Patrick Delaunay [Mon, 4 Oct 2021 09:59:52 +0000 (11:59 +0200)]
Remove unused CONFIG_NO_RELOCATION

Remove the latest reference of CONFIG_NO_RELOCATION in code

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoam33x: Remove unused define CONFIG_MUSB_HOST
Patrick Delaunay [Mon, 4 Oct 2021 09:59:51 +0000 (11:59 +0200)]
am33x: Remove unused define CONFIG_MUSB_HOST

This define was left over from a previous revision, and was never used.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoscripts: remove some configs in config_whitelist.txt
Patrick Delaunay [Mon, 4 Oct 2021 09:59:50 +0000 (11:59 +0200)]
scripts: remove some configs in config_whitelist.txt

Remove some config finishing by _ badly added by
scripts/build-whitelist.sh when joker is used in comments.

for example:
  doc/uImage.FIT/command_syntax_extensions.txt:
     ... #ifdef CONFIG_OF_*  | ...

  cmd/nvedit.c:# error Define one of CONFIG_ENV_IS_IN_{EEPROM| \
     FLASH|MMC|FAT|EXT4|\

Remove also configs only used in comments:
- CONFIG_BOOGER in include/linux/kconfig.h
- CONFIG_COMMANDS
- CONFIG_INIT_IGNORE_ERROR
- CONFIG_REG_*
- CONFIG_HOTPLUG : drivers/watchdog/omap_wdt.c:18

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
3 years agoMerge branch '2021-10-14-assorted-updates'
Tom Rini [Fri, 15 Oct 2021 11:50:59 +0000 (07:50 -0400)]
Merge branch '2021-10-14-assorted-updates'

- Update to LLVM-13 in CI, assorted PCI fixes and pytest in CI
  improvements

3 years agoboard/km: update MAINTAINERS files
Holger Brunck [Tue, 12 Oct 2021 06:50:38 +0000 (08:50 +0200)]
board/km: update MAINTAINERS files

Update the e-mail addresses and person responsible.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
CC: Aleksandar Gerasimovski <aleksandar.gerasimovski@hitachienergy.com>
CC: Rainer Boschung <rainer.boschung@hitachienergy.com>
3 years agopytest: Show a message when sandbox crashes
Simon Glass [Fri, 8 Oct 2021 15:15:23 +0000 (09:15 -0600)]
pytest: Show a message when sandbox crashes

When a test hands on a real board there is no way on the console to obtain
any information about why it hung.

With sandbox we can actually find out that it died and get a signal or
exit code. Add this to make it easier to figure out what happened.

So instead of:

test/py/u_boot_spawn.py:171: in expect
    c = os.read(self.fd, 1024).decode(errors='replace')
E   OSError: [Errno 5] Input/output error

We get:

test/py/u_boot_spawn.py:171: in expect
    c = os.read(self.fd, 1024).decode(errors='replace')
E   ValueError: U-Boot exited with signal 11 (Signals.SIGSEGV)

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agopci: Fix printf format for regions
Pali Rohár [Fri, 8 Oct 2021 15:01:24 +0000 (17:01 +0200)]
pci: Fix printf format for regions

Correct printf format for unsigned long long is %llx and not %llxx.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agopci: Fix showing registers
Pali Rohár [Thu, 7 Oct 2021 12:51:01 +0000 (14:51 +0200)]
pci: Fix showing registers

Header type is 7-bit number so use all 7 bits when detecting header type
and not only 2 bits.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agopci: Fix showing bars
Pali Rohár [Thu, 7 Oct 2021 12:51:00 +0000 (14:51 +0200)]
pci: Fix showing bars

Header type is 7-bit number so properly clear upper 8th bit which
indicates multifunction device.

And do not try to show bars for unsupported header types.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agopci: Fix configuring BARs
Pali Rohár [Thu, 7 Oct 2021 12:50:59 +0000 (14:50 +0200)]
pci: Fix configuring BARs

Number of BARs is defined by header type, not by class code.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agopci: Skip configuring invalid P2P bridge devices
Pali Rohár [Thu, 7 Oct 2021 12:50:58 +0000 (14:50 +0200)]
pci: Skip configuring invalid P2P bridge devices

Function dm_pci_hose_probe_bus() expects that bus is valid PCI device with
Bridge header type (0x01). So add check before touching PCI config space to
prevent misconfiguring some non-standard device.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agopci: Skip configuring PCI Rom Address for unsupported header types
Pali Rohár [Thu, 7 Oct 2021 12:50:57 +0000 (14:50 +0200)]
pci: Skip configuring PCI Rom Address for unsupported header types

PCI Rom Address is currently supported only for Normal (0x00) and
Bridge (0x01) header types. Fix code accordingly.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agopytest: Shorten traceback length by default
Simon Glass [Wed, 6 Oct 2021 02:18:00 +0000 (20:18 -0600)]
pytest: Shorten traceback length by default

This produces a lot of code output which is not very helpful and is quite
annoying to wade through. Use the short format by default.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoCI: Update to LLVM-13
Tom Rini [Tue, 5 Oct 2021 17:51:38 +0000 (13:51 -0400)]
CI: Update to LLVM-13

- Switch sources and CI scripts to install and use LLVM-13
- Update to latest "focal" tag.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoARM: tegra: Copy memory-region-names property
Thierry Reding [Fri, 3 Sep 2021 13:16:25 +0000 (15:16 +0200)]
ARM: tegra: Copy memory-region-names property

If multiple entries are present in the memory-region property, this new
memory-region-names property can be used to specify names for each of
them so that they can be more easily distinguished.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>