]> git.baikalelectronics.ru Git - uboot.git/log
uboot.git
19 months agoiot2050: Refresh defconfigs and activate CONFIG_EFI_SCROLL_ON_CLEAR_SCREEN
Jan Kiszka [Tue, 28 Feb 2023 18:19:21 +0000 (19:19 +0100)]
iot2050: Refresh defconfigs and activate CONFIG_EFI_SCROLL_ON_CLEAR_SCREEN

This feature is desired on the platform.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
19 months agoboard: siemens: iot2050: use the named gpio to control the user-button
chao zeng [Tue, 28 Feb 2023 18:19:20 +0000 (19:19 +0100)]
board: siemens: iot2050: use the named gpio to control the user-button

User-button is controlled by the mcu domain gpio number 25.
But main0 main1 mcu domain all have gpio number 25.

To identify where the gpio is from, Using gpio controll base as the prefix
to indicate the gpio resource.

Signed-off-by: chao zeng <chao.zeng@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
19 months agodoc: iot2050: Add a note about the watchdog firmware
Jan Kiszka [Tue, 28 Feb 2023 18:19:19 +0000 (19:19 +0100)]
doc: iot2050: Add a note about the watchdog firmware

This is enabled by default, thus should be described as well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
19 months agoarm: dts: iot2050: Optionally embed OTP programming data into image
Jan Kiszka [Tue, 28 Feb 2023 18:19:18 +0000 (19:19 +0100)]
arm: dts: iot2050: Optionally embed OTP programming data into image

Use external blob otpcmd.bin to replace the 0xff filled OTP programming
command block to create a firmware image that provisions the OTP on
first boot. This otpcmd.bin is generated from the customer keys using
steps described in the meta-iot2050 integration layer for the device.

Based on original patch by Baocheng Su.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
19 months agoiot2050: Add script for signing artifacts
Jan Kiszka [Tue, 28 Feb 2023 18:19:17 +0000 (19:19 +0100)]
iot2050: Add script for signing artifacts

There are many ways to get a signed firmware for the IOT2050 devices,
namely for the parts under user-control. This script documents one way
of doing it, given a signing key. Augment the board documentation with
the required procedure around it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
19 months agotools: Add script for converting public key into device tree include
Jan Kiszka [Tue, 28 Feb 2023 18:19:16 +0000 (19:19 +0100)]
tools: Add script for converting public key into device tree include

Allows to create a public key device tree dtsi for inclusion into U-Boot
SPL and proper during first build already. This can be achieved via
CONFIG_DEVICE_TREE_INCLUDES.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
19 months agoarm: dts: iot2050: Allow verifying U-Boot proper by SPL
Jan Kiszka [Tue, 28 Feb 2023 18:19:15 +0000 (19:19 +0100)]
arm: dts: iot2050: Allow verifying U-Boot proper by SPL

Add hashes and configuration signature stubs to prepare verified boot
of main U-Boot by SPL.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
19 months agoiot2050: Add CFG_ENV_FLAGS_LIST_STATIC
Jan Kiszka [Tue, 28 Feb 2023 18:19:14 +0000 (19:19 +0100)]
iot2050: Add CFG_ENV_FLAGS_LIST_STATIC

Will be needed when CONFIG_ENV_WRITEABLE_LIST is enabled. The listed
variables shall remain writable, for informational purposes - they have
to be considered untrusted because the persistent U-Boot env is not
protected.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
19 months agoiot2050: Add watchdog start to bootcmd
Jan Kiszka [Tue, 28 Feb 2023 18:19:13 +0000 (19:19 +0100)]
iot2050: Add watchdog start to bootcmd

Allows run-time control over watchdog auto-start and the timeout via
setting the environment variable watchdog_timeout_ms. A value of zero
means "do not start". Use CONFIG_WATCHDOG_TIMEOUT_MSECS as initial value
and this to zero by default. Users can then enable the watchdog once the
use and OS which picks it up during boot.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
19 months agoiot2050: Migrate settings into board env file
Jan Kiszka [Tue, 28 Feb 2023 18:19:12 +0000 (19:19 +0100)]
iot2050: Migrate settings into board env file

Anything that is not boot-env related is better kept there by now.

At this chance, also drop a stale comment from iot2050.h

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
19 months agoiot2050: Update firmware layout
Jan Kiszka [Tue, 28 Feb 2023 18:19:11 +0000 (19:19 +0100)]
iot2050: Update firmware layout

The latest version of the binary-only firmware parts come in a combined
form of FSBL and sysfw containers. This implies some layout changes to
the generated firmware image but also makes handling of artifacts much
simpler (4 files less). The env locations will not change, just the
space reserved for U-Boot will shrink from 4 to 3 MB - still plenty of
space left in practice.

Adjust configuration and documentation accordingly.

Along this change, add a new reservation for update commands of the
user-controlled OTP part. A specific userspace tool will fill it, and
the FSBL will evaluate it during boot. This reservation will use 64K of
the former sysfw section.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
19 months agoarm: dts: iot2050: Use the auto generator nodes for fdt
Su Baocheng [Tue, 28 Feb 2023 18:19:10 +0000 (19:19 +0100)]
arm: dts: iot2050: Use the auto generator nodes for fdt

Refactor according to the entry `fit: Entry containing a FIT` of
document tools/binman/README.entries.

As the generator uses the device tree name for the config description,
board_fit_config_name_match requires a small adjustment as well.

Signed-off-by: Su Baocheng <baocheng.su@siemens.com>
[Jan: re-add now required CONFIG_OF_LIST, update config matching]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
19 months agoboard: siemens: iot2050: Split the build for PG1 and PG2
Su Baocheng [Tue, 28 Feb 2023 18:19:09 +0000 (19:19 +0100)]
board: siemens: iot2050: Split the build for PG1 and PG2

Due to different signature keys, the PG1 and the PG2 boards can no
longer use the same FSBL (tiboot3). This makes it impossible anyway to
maintaine a single flash.bin for both variants, so we can also split the
build.

A new target is added to indicates the build is for PG1 vs. PG2 boards.
Hence now the variants have separated defconfig files.

The runtime board_is_sr1() check does make no sense anymore, so remove
it and replace with build time check.

Documentation is updated accordingly. New binary artifacts are already
available via meta-iot2050.

Signed-off-by: Su Baocheng <baocheng.su@siemens.com>
[Jan: refactor config option into targets, tweak some wordings]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
19 months agoMerge tag 'u-boot-at91-2023.07-a' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Tue, 28 Mar 2023 15:21:29 +0000 (11:21 -0400)]
Merge tag 'u-boot-at91-2023.07-a' of https://source.denx.de/u-boot/custodians/u-boot-at91 into next

First set of u-boot-at91 features for the 2023.07 cycle:

This feature set includes the clock changes required for sam9x60 SoC to
support USB host.

19 months agoRevert "rockchip: Fix early use of bootph props"
Tom Rini [Mon, 27 Mar 2023 19:20:19 +0000 (15:20 -0400)]
Revert "rockchip: Fix early use of bootph props"

While this change is correct for v2023.04 it is not correct for next
(where this is right now) nor post-v2023.04.

This reverts commit a1e1c76342e714639b36f2dd4954152ee0e22871.

Signed-off-by: Tom Rini <trini@konsulko.com>
19 months agoMerge branch 'master' into next
Tom Rini [Mon, 27 Mar 2023 19:19:57 +0000 (15:19 -0400)]
Merge branch 'master' into next

19 months agoPrepare v2023.04-rc5
Tom Rini [Mon, 27 Mar 2023 18:23:26 +0000 (14:23 -0400)]
Prepare v2023.04-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
19 months agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 27 Mar 2023 17:39:17 +0000 (13:39 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
19 months agoMerge branch '2023-03-27-rockchip-rk3399-fixes'
Tom Rini [Mon, 27 Mar 2023 15:16:51 +0000 (11:16 -0400)]
Merge branch '2023-03-27-rockchip-rk3399-fixes'

- A series of minor cleanups to DISTRO_DEFAULTS and BOOTSTD so that the
  rk3399 bootstd migration can be complete and functional now, and make
  future migrations easier.

19 months agorockchip: rk3399: Drop altbootcmd
Tom Rini [Fri, 24 Mar 2023 20:58:16 +0000 (16:58 -0400)]
rockchip: rk3399: Drop altbootcmd

The defined altbootcmd was specific to distro_bootcmd which is not
longer in use on these platforms, so drop it.

Tested-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>
19 months agorockchip: Use BOOTSTD_DEFAULTS if not DISTRO_DEFAULTS
Tom Rini [Fri, 24 Mar 2023 20:58:15 +0000 (16:58 -0400)]
rockchip: Use BOOTSTD_DEFAULTS if not DISTRO_DEFAULTS

When we do not enable DISTRO_DEFAULTS (generally, to get distro_bootcmd)
we instea do want to imply BOOTSTD_DEFAULTS so that when using bootstd
the general distro boot functionality will still work.

Signed-off-by: Tom Rini <trini@konsulko.com>
19 months agorockchip: Disable DISTRO_DEFAULTS for rk3399 boards
Simon Glass [Fri, 24 Mar 2023 20:58:14 +0000 (16:58 -0400)]
rockchip: Disable DISTRO_DEFAULTS for rk3399 boards

These board have moved to standard boot but the old 'distro_bootcmd'
command is still active. Disable DISTRO_DEFAULTS to fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Vagrant Cascadian <vagrant@debian.org>
19 months agoboot: Create a common BOOT_DEFAULTS for distro and bootstd
Simon Glass [Fri, 24 Mar 2023 20:58:13 +0000 (16:58 -0400)]
boot: Create a common BOOT_DEFAULTS for distro and bootstd

These two features use a lot of common options. Move them into a common
CONFIG to reduce duplication.

Use 'select' for most options since these are things that boards aren't
supposed to override. For now it is not possible to disable
BOOT_DEFAULTS but we may take another look later.

Note that five options use 'imply' to match existing behaviour.

Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Rework a bit so we don't grow so many platforms unintentionally]
Signed-off-by: Tom Rini <trini@konsulko.com>
19 months agolmb: Enable LMB if SYS_BOOT_RAMDISK_HIGH
Simon Glass [Fri, 24 Mar 2023 20:58:12 +0000 (16:58 -0400)]
lmb: Enable LMB if SYS_BOOT_RAMDISK_HIGH

Ramdisk relocation requires LMB, so enable it automatically to avoid
build errors.

Signed-off-by: Simon Glass <sjg@chromium.org>
19 months agoMove DISTRO_DEFAULTS into boot/
Simon Glass [Fri, 24 Mar 2023 20:58:11 +0000 (16:58 -0400)]
Move DISTRO_DEFAULTS into boot/

This relates to booting so move it in to that Kconfig file, before
changing it.

Signed-off-by: Simon Glass <sjg@chromium.org>
19 months agorockchip: Drop bootstage stash in TPL and SPL for rockpro64
Simon Glass [Fri, 24 Mar 2023 20:58:10 +0000 (16:58 -0400)]
rockchip: Drop bootstage stash in TPL and SPL for rockpro64

Unfortunately the IRAM used to stash the bootstage records in TPL
becomes inaccessible after SPL runs. Presumably this is because of ATF
taking it over.

We could move the stash to another address in SPL, before passing it to
U-Boot proper. But it seems easier to wait until we have support for
standard passage[1] which should not be too far away.

For now, disable it in TPL and SPL.

[1] https://patchwork.ozlabs.org/project/uboot/cover/
    20220117150428.1580273-1-sjg@chromium.org/

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Vagrant Cascadian <vagrant@debian.org>
19 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Mon, 27 Mar 2023 15:05:40 +0000 (11:05 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-x86

- x86: Bug fixes of previous BayTrail platform CONFIG_TEXT_BASE changes

19 months agoconfigs: at91: sam9x60: Add required configs for the USB clock
Sergiu Moga [Wed, 8 Mar 2023 14:39:54 +0000 (16:39 +0200)]
configs: at91: sam9x60: Add required configs for the USB clock

Add the configs required to use the SAM9X60's USB clock.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
[claudiu.beznea: added CONFIG_AT91_SAM9X60_USB to
 sam9x60_curiosity_mmc1_defconfig]
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
19 months agoclk: at91: sam9x60: Add initial setup of UPLL and USBCK rates
Sergiu Moga [Wed, 8 Mar 2023 14:39:53 +0000 (16:39 +0200)]
clk: at91: sam9x60: Add initial setup of UPLL and USBCK rates

In order for some of the functionalities, such as the USB clocks,
to work properly we need some clocks to be properly initialised
at the very beginning of booting.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
19 months agoclk: at91: pmc: export clock setup to pmc
Claudiu Beznea [Wed, 8 Mar 2023 14:39:52 +0000 (16:39 +0200)]
clk: at91: pmc: export clock setup to pmc

Clock setup was intended for setting clocks at boot time on SAMA7G5,
e.g. for root clocks like PLLs, that were used to feed IPs needed alive
in u-boot (e.g. Ethernet clock feed by a PLL). Export this functionality
to all at91 clocks as it may be necessary on other SoCs.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
19 months agoclk: at91: sam9x60: Register the required clocks for USB
Sergiu Moga [Wed, 8 Mar 2023 14:39:51 +0000 (16:39 +0200)]
clk: at91: sam9x60: Register the required clocks for USB

Register into DM the clocks required to properly enable USB functionality
within the bootloader.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
19 months agoclk: at91: Add support for sam9x60 USB clock
Sergiu Moga [Wed, 8 Mar 2023 14:39:50 +0000 (16:39 +0200)]
clk: at91: Add support for sam9x60 USB clock

Implement sam9x60 USB clock driver. This clock has
three parents: PLLA, UPLL and MAINXTAL. The driver is
aware of the three possible parents with the help of the
two mux tables provied to the driver during the registration
of the clock.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
19 months agox86: som-db5800-som-6867: Fix up adjustment of CONFIG_TEXT_BASE
Simon Glass [Tue, 14 Mar 2023 23:59:55 +0000 (17:59 -0600)]
x86: som-db5800-som-6867: Fix up adjustment of CONFIG_TEXT_BASE

With recent CONFIG_TEXT_BASE changes, there are inconsistencies between
several settings.

Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC
cache out of the way too.

Fixes: ecd07064ce7b ("x86: som-db5800-som-6867: Adjust CONFIG_TEXT_BASE")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
19 months agox86: dfi-bt700: Fix up adjustment of CONFIG_TEXT_BASE
Simon Glass [Tue, 14 Mar 2023 23:59:54 +0000 (17:59 -0600)]
x86: dfi-bt700: Fix up adjustment of CONFIG_TEXT_BASE

With recent CONFIG_TEXT_BASE changes, there are inconsistencies between
several settings.

Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC
cache out of the way too.

Fixes: 213a08b824fe ("x86: dfi-bt700: Adjust CONFIG_TEXT_BASE")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
19 months agox86: conga-qeval20-qa3-e3845: Fix up adjustment of CONFIG_TEXT_BASE
Simon Glass [Tue, 14 Mar 2023 23:59:53 +0000 (17:59 -0600)]
x86: conga-qeval20-qa3-e3845: Fix up adjustment of CONFIG_TEXT_BASE

With recent CONFIG_TEXT_BASE changes, there are inconsistencies between
several settings.

Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC
cache out of the way too.

Fixes: fdbb542890a6 ("x86: conga-qeval20-qa3-e3845: Adjust CONFIG_TEXT_BASE")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
19 months agox86: bayleybay: Fix up adjustment of CONFIG_TEXT_BASE
Simon Glass [Tue, 14 Mar 2023 23:59:52 +0000 (17:59 -0600)]
x86: bayleybay: Fix up adjustment of CONFIG_TEXT_BASE

With recent CONFIG_TEXT_BASE changes, there are inconsistencies between
several settings.

Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC
cache out of the way too.

Fixes: e8702920a1ac ("x86: bayleybay: Adjust CONFIG_TEXT_BASE")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
19 months agox86: minnowmax: Fix up adjustment of CONFIG_TEXT_BASE
Simon Glass [Tue, 14 Mar 2023 23:59:51 +0000 (17:59 -0600)]
x86: minnowmax: Fix up adjustment of CONFIG_TEXT_BASE

With recent CONFIG_TEXT_BASE changes, there are inconsistencies between
several settings.

Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC
cache out of the way too.

Add documentation on how to make this change safely.

Fixes: a7b780b684a5 ("x86: minnowmax: Adjust CONFIG_TEXT_BASE")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
20 months agoMerge tag 'efi-next-20230325' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Sat, 25 Mar 2023 21:34:34 +0000 (17:34 -0400)]
Merge tag 'efi-next-20230325' of https://source.denx.de/u-boot/custodians/u-boot-efi into next

Pull request for efi-next-20230325

Documenation:

* add man-page for efi command

UEFI:

* Let EFI app call ExitBootServices() before legacy booting kernel
* Support zboot and bootm in the EFI app
* Let efi command show configuration tables
* Support booting a 64-bit kernel from 64-bit EFI app
* Allocate device-tree copy from high memory
* simplify efi_str_to_u16()

20 months agoMerge tag 'efi-2023.04-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 25 Mar 2023 13:40:19 +0000 (09:40 -0400)]
Merge tag 'efi-2023.04-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2023.04-rc5

UEFI:

* Create unique device paths for USB devices with the same vendor
  and product id.

20 months agocmd: bootefi: allocate device-tree copy from high memory
Heinrich Schuchardt [Thu, 23 Feb 2023 19:27:38 +0000 (20:27 +0100)]
cmd: bootefi: allocate device-tree copy from high memory

The bootefi command creates a copy of the device-tree within the first
127 MiB of memory. This may lead to overwriting previously loaded binaries
(e.g. kernel, initrd).

Linux EFI stub itself copies U-Boot's copy of the device-tree. This means
there is not restriction for U-Boot to place the device-tree copy to any
address. (Restrictions existed for 32bit ARM before Linux commit
7a1be318f579 ("ARM: 9012/1: move device tree mapping out of linear region")
for legacy booting.

Reported-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
20 months agoefI: Allow packaging a kernel in the debugging script
Simon Glass [Sun, 19 Mar 2023 19:30:16 +0000 (08:30 +1300)]
efI: Allow packaging a kernel in the debugging script

Add an option to package a kernel into the debugging script used for
EFI.

The name of the kernel must be added to the script. By default it is
assumed that the kernel is built in the /tmp/kernel directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
20 months agoefi: Support showing tables
Simon Glass [Sun, 19 Mar 2023 19:30:15 +0000 (08:30 +1300)]
efi: Support showing tables

Add a command (for the app and payload) to display the tables provided
by EFI. Note that for the payload the tables should always be present, so
an error message is unnecessary and would bloat the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
20 months agoefi: Split out table-listing code into a new file
Simon Glass [Sun, 19 Mar 2023 19:30:14 +0000 (08:30 +1300)]
efi: Split out table-listing code into a new file

This code is used with EFI_LOADER but is also useful (with some
modifications) for the EFI app and payload. Move it into a shared
file.

Show the address of the table so it can be examined if needed. Also show
the table name as unknown if necessary. Our list of GUIDs is fairly
small.

Signed-off-by: Simon Glass <sjg@chromium.org>
20 months agodoc: Add help for the efi command
Simon Glass [Sun, 19 Mar 2023 19:30:13 +0000 (08:30 +1300)]
doc: Add help for the efi command

This command currently has no help. Add some.

Signed-off-by: Simon Glass <sjg@chromium.org>
20 months agoefi: Include GUID names with EFI app and payload
Simon Glass [Sun, 19 Mar 2023 19:30:12 +0000 (08:30 +1300)]
efi: Include GUID names with EFI app and payload

These are currently only available when running with EFI_LOADER.
Expand this to include the app and payload, since it is useful to be
able to decode things there.

Signed-off-by: Simon Glass <sjg@chromium.org>
20 months agoefi: Add another tranch of GUIDs
Simon Glass [Sun, 19 Mar 2023 19:30:11 +0000 (08:30 +1300)]
efi: Add another tranch of GUIDs

Provide information about the GUIDs supplied by QEMU, so far as it is
known.

These values are used in the 'efi table' command as well as the printf
format string %sU

Signed-off-by: Simon Glass <sjg@chromium.org>
20 months agox86: Support zboot and bootm in the EFI app
Simon Glass [Sun, 19 Mar 2023 19:30:10 +0000 (08:30 +1300)]
x86: Support zboot and bootm in the EFI app

These have been disabled due to the rudimentary support available. It is
a little better now, so enable these options.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
20 months agox86: Exit EFI boot services before starting kernel
Simon Glass [Sun, 19 Mar 2023 19:30:09 +0000 (08:30 +1300)]
x86: Exit EFI boot services before starting kernel

When running the EFI app, we need to exit boot services before jumping
to Linux.

At some point it may be possible to jump to Linux and pass on the system
table, and:

  * install the device-tree as configuration table
  * use LoadImage() to load the kernel image (e.g. from memory)
  * start the image with StartImage()

This should allow the Linux efistub to be used. For now, this is not
implemented.

Signed-off-by: Simon Glass <sjg@chromium.org>
20 months agox86: Support booting a 64-bit kernel from 64-bit U-Boot
Simon Glass [Sun, 19 Mar 2023 19:30:08 +0000 (08:30 +1300)]
x86: Support booting a 64-bit kernel from 64-bit U-Boot

Add the missing code to handle this. For a 64-bit kernel the entry
address is 0x200 bytes after the normal entry.

Rename the parameter to boot_linux_kernel() accordingly. Update the
comments to indicate that these are addresses, not pointers.

Signed-off-by: Simon Glass <sjg@chromium.org>
20 months agox86: Add return-value comment to cpu_jump_to_64bit()
Simon Glass [Sun, 19 Mar 2023 19:30:07 +0000 (08:30 +1300)]
x86: Add return-value comment to cpu_jump_to_64bit()

This does not mention what it returns. Add the missing documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>
20 months agox86: Adjust bootparam.h to be more like linux
Simon Glass [Sun, 19 Mar 2023 19:30:06 +0000 (08:30 +1300)]
x86: Adjust bootparam.h to be more like linux

This likely came from Linux originally, so update it to match v6.2 more.
This has no functional change.

Signed-off-by: Simon Glass <sjg@chromium.org>
20 months agoefi: Set RUN_64BIT correctly for the EFI app
Simon Glass [Sun, 19 Mar 2023 19:30:05 +0000 (08:30 +1300)]
efi: Set RUN_64BIT correctly for the EFI app

The U-Boot EFI app can run as a 64-bit program, so set the Kconfig
correctly in that case. Make sure it doesn't build SPL, since there is
no need to switch from 32 to 64 bit when running.

Signed-off-by: Simon Glass <sjg@chromium.org>
20 months agoefi_loader: simplify efi_str_to_u16()
Heinrich Schuchardt [Sun, 19 Mar 2023 08:20:23 +0000 (09:20 +0100)]
efi_loader: simplify efi_str_to_u16()

Use efi_alloc() to allocate memory.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoefi_loader: move dp_alloc() to efi_alloc()
Heinrich Schuchardt [Sun, 19 Mar 2023 08:20:22 +0000 (09:20 +0100)]
efi_loader: move dp_alloc() to efi_alloc()

The incumbent function efi_alloc() is unused.

Replace dp_alloc() by a new function efi_alloc() that we can use more
widely.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
20 months agoefi_loader: move struct efi_device_path to efi.h
Heinrich Schuchardt [Sun, 19 Mar 2023 07:59:33 +0000 (08:59 +0100)]
efi_loader: move struct efi_device_path to efi.h

Avoid forward declaration of struct efi_device_path.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
20 months agoefi_loader: fix device-path for USB devices
Heinrich Schuchardt [Sun, 19 Mar 2023 15:18:09 +0000 (16:18 +0100)]
efi_loader: fix device-path for USB devices

EFI device paths for block devices must be unique. If a non-unique device
path is discovered, probing of the block device fails.

Currently we use UsbClass() device path nodes. As multiple devices may
have the same vendor and product id these are non-unique. Instead we
should use Usb() device path nodes. They include the USB port on the
parent hub. Hence they are unique.

A USB storage device may contain multiple logical units. These can be
modeled as Ctrl() nodes.

Reported-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoefi_loader: support for Ctrl() device path node
Heinrich Schuchardt [Sun, 19 Mar 2023 15:18:08 +0000 (16:18 +0100)]
efi_loader: support for Ctrl() device path node

* Add the definitions for Ctrl() device path nodes.
* Implement Ctrl() nodes in the device path to text protocol.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
20 months agoefi_loader: fix device-path for USB devices
Heinrich Schuchardt [Sun, 19 Mar 2023 15:18:09 +0000 (16:18 +0100)]
efi_loader: fix device-path for USB devices

EFI device paths for block devices must be unique. If a non-unique device
path is discovered, probing of the block device fails.

Currently we use UsbClass() device path nodes. As multiple devices may
have the same vendor and product id these are non-unique. Instead we
should use Usb() device path nodes. They include the USB port on the
parent hub. Hence they are unique.

A USB storage device may contain multiple logical units. These can be
modeled as Ctrl() nodes.

Reported-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoefi_loader: support for Ctrl() device path node
Heinrich Schuchardt [Sun, 19 Mar 2023 15:18:08 +0000 (16:18 +0100)]
efi_loader: support for Ctrl() device path node

* Add the definitions for Ctrl() device path nodes.
* Implement Ctrl() nodes in the device path to text protocol.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
20 months agoMerge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-marvell into...
Tom Rini [Sat, 25 Mar 2023 02:25:28 +0000 (22:25 -0400)]
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-marvell into next

- mvebu: kwboot: Fix UART booting (Pali)
- mvebu: doc: Misc updates / fixes (Pali)
- kirkwood: Early init enhancements, e.g. for DEBUG UART (Pali & Tony)
- mvebu: Enable NAND flash for Thecus N2350 board (Tony)
- mvebu: Set common SPI flash default speed and mode (Tony)

20 months agoMerge branch 'rpi-2023.04' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi
Tom Rini [Fri, 24 Mar 2023 21:00:41 +0000 (17:00 -0400)]
Merge branch 'rpi-2023.04' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi

- Fixes for booting newer revs of the SoC in the Raspberry Pi 4
- Propagate some firmware DT properties to the loaded DT
- Update the Zero2W upstream DT name

20 months agommc: bcm2835-host: let firmware manage the clock divisor
Vincent Fazio [Tue, 14 Sep 2021 18:19:19 +0000 (13:19 -0500)]
mmc: bcm2835-host: let firmware manage the clock divisor

Newer firmware can manage the SDCDIV clock divisor register, allowing
the divisor to scale with the core as necessary.

Leverage this ability if the firmware supports it.

Adapted from the following raspberrypi Linux kernel commit:

  bcm2835-sdhost: Firmware manages the clock divisor
  https://github.com/raspberrypi/linux/commit/08532d242d7702ae0add95096aa49c5e96e066e2

Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
20 months agoarm: rpi: fallback to max clock rate for MMC clock
Vincent Fazio [Tue, 14 Sep 2021 18:19:18 +0000 (13:19 -0500)]
arm: rpi: fallback to max clock rate for MMC clock

In rpi-firmware 25e2b597ebfb2495eab4816a276758dcc6ea21f1,
the GET_CLOCK_RATE mailbox property was changed to return the last
value set by SET_CLOCK_RATE.

https://github.com/raspberrypi/firmware/issues/1619#issuecomment-917025502

Due to this change in firmware behavior, bcm2835_get_mmc_clock now
returns a clock rate of zero since we do not issue SET_CLOCK_RATE.
This results in degraded MMC performance.

SET_CLOCK_RATE fixes the clock to a specific value and disables scaling
so is not an ideal solution.

Instead, fallback to GET_MAX_CLOCK_RATE in bcm2835_get_mmc_clock if
GET_CLOCK_RATE returns zero.

Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
20 months agotools: kwboot: Document information about NOR XIP
Pali Rohár [Thu, 23 Mar 2023 20:00:07 +0000 (21:00 +0100)]
tools: kwboot: Document information about NOR XIP

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
20 months agotools: kwboot: Workaround A38x BootROM bug for images with a gap
Pali Rohár [Thu, 23 Mar 2023 19:57:55 +0000 (20:57 +0100)]
tools: kwboot: Workaround A38x BootROM bug for images with a gap

A38x BootROM has a bug which cause that BootROM loads data part of UART
image into RAM target address increased by one byte when source address
and header size stored in the image header are not same.

Workaround this bug by completely removing a gap between header and data
part of the UART image. Without gap, this BootROM bug is not triggered.

This gap can be present in SDIO or SATA image types which have aligned
start of the data part to the media sector size. With this workaround
kwboot should be able to convert and send SDIO or SATA images for UART
booting.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
20 months agotools: kwboot: Fix sending very small images
Pali Rohár [Thu, 23 Mar 2023 19:57:54 +0000 (20:57 +0100)]
tools: kwboot: Fix sending very small images

Sending of very small images (smaller than 128 bytes = xmodem block size)
cause out-of-bound memory read access. Fix this issue by ensuring that
hdrsz when sending image is not larger than total size of the image.
Issue was introduced in commit 20a6585838ca ("tools: kwboot: Fix sending
Kirkwood v0 images"). Special case when total image is smaller than header
size aligned to multiply of xmodem size is already handled since that
commit.

Fixes: 20a6585838ca ("tools: kwboot: Fix sending Kirkwood v0 images")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
20 months agotools: kwboot: Fix inserting UART data checksum without -B option
Pali Rohár [Thu, 23 Mar 2023 19:57:53 +0000 (20:57 +0100)]
tools: kwboot: Fix inserting UART data checksum without -B option

Commit 83a1a335bc84 ("tools: kwboot: Fix parsing UART image without data
checksum") added fixup code to insert place for data checksum if UART image
does not have it. Together with option -B (change baudrate), kwboot
calculates this checksum. Without option -B, it inserts only place for
checksum but does not calculate it.

This commit fix above logic and calculate data checksum also when kwboot is
used without -B option.

Fixes: 83a1a335bc84 ("tools: kwboot: Fix parsing UART image without data checksum")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
20 months agotools: kwboot: Fix invalid UART kwbimage v1 headersz
Pali Rohár [Thu, 23 Mar 2023 19:57:52 +0000 (20:57 +0100)]
tools: kwboot: Fix invalid UART kwbimage v1 headersz

Ensure that UART aligned header size is always stored into kwbimage v1
header. It is needed for proper UART booting. Calculation of headersz field
was broken in commit a075a68b1344 ("tools: kwboot: Calculate real used
space in kwbimage header when calling kwboot_img_grow_hdr()") which
introduced optimization of kwboot_img_grow_hdr() function.

Fixes: a075a68b1344 ("tools: kwboot: Calculate real used space in kwbimage header when calling kwboot_img_grow_hdr()")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
20 months agotools: kwbimage: Fix invalid UART kwbimage v1 headersz
Pali Rohár [Thu, 23 Mar 2023 19:57:51 +0000 (20:57 +0100)]
tools: kwbimage: Fix invalid UART kwbimage v1 headersz

Armada 385 BootROM ignores low 7 bits of headersz when parsing kwbimage
header of UART type, which effectively means that headersz is rounded down
to multiply of 128 bytes. For all other image types BootROM reads and use
all bits of headersz. Therefore fill into UART type of kwbimage v1 headersz
aligned to 128 bytes.

Fixes: bb79e11f257d ("tools: kwbimage: Fill the real header size into the main header")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
20 months agoddr: marvell: a38x: Remove unused file seq_exec.h
Pali Rohár [Sat, 4 Mar 2023 12:26:46 +0000 (13:26 +0100)]
ddr: marvell: a38x: Remove unused file seq_exec.h

DDR code does not use seq_exec.h, so remove it.

Signed-off-by: Pali Rohár <pali@kernel.org>
20 months agoarm: kirkwood: Enable Debug UART for Zyxel NSA310S
Tony Dinh [Mon, 13 Mar 2023 03:35:51 +0000 (20:35 -0700)]
arm: kirkwood: Enable Debug UART for Zyxel NSA310S

It's useful to enable Debug UART for future DM Serial regression tests
for Kirkwood boards.

Also, see background discussion in this thread:
https://lists.denx.de/pipermail/u-boot/2023-March/512010.html

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
20 months agoarm: kirkwood: Move internal registers in arch_very_early_init() function
Pali Rohár [Sat, 11 Mar 2023 10:57:01 +0000 (11:57 +0100)]
arm: kirkwood: Move internal registers in arch_very_early_init() function

Same change as was done for mvebu in commit bae797b56e7b ("arm: mvebu: Move
internal registers in arch_very_early_init() function") but for kirkwood.

Signed-off-by: Pali Rohár <pali@kernel.org>
Tested-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
20 months agodoc/kwboot.1: Update Armada 38x BootROM bug description
Pali Rohár [Sat, 11 Mar 2023 10:42:16 +0000 (11:42 +0100)]
doc/kwboot.1: Update Armada 38x BootROM bug description

Replace SPI-NOR by default boot source location as bug is not SPI-NOR related.

Signed-off-by: Pali Rohár <pali@kernel.org>
20 months agoarm: mvebu: Set common SPI flash default speed and mode
Tony Dinh [Fri, 3 Mar 2023 03:27:29 +0000 (19:27 -0800)]
arm: mvebu: Set common SPI flash default speed and mode

CONFIG_SF_DEFAULT_SPEED is used in SPL SPI to configure and probe the
flash device during DM SPI uclass probing process, if the
spi-max-frequency is not available in the DTB. Currently the max
frequency is not available, because of the probing mechanism in SPI
uclass has not been fully updated to DM.

The CONFIG_SF_DEFAULT_SPEED is set to 1Mhz if a board defconfig
does not specify it. This speed is too slow and result in a few
seconds delay while the u-boot image is loaded from flash. Based on a
survey of the device tree specifications for MVEBU boards, a sane default
value should be 10Mhz. The default of 10Mhz enables an almost
instantaneously loading of the u-boot image.

Note that this patch depends on this patch series (has been merged to
u-boot-marvell/next):
https://lists.denx.de/pipermail/u-boot/2023-March/511038.html

- RESEND: correct spelling of SF_DEFAULT_MODE

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
20 months agoarm: mvebu: Enable NAND flash for Thecus N2350 board
Tony Dinh [Sat, 25 Feb 2023 03:23:23 +0000 (19:23 -0800)]
arm: mvebu: Enable NAND flash for Thecus N2350 board

Enable 512MB PXA3XX NAND flash when u-boot is running.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Acked-by: Pali Rohár
20 months agoMerge branch '2023-03-22-assorted-minor-code-cleanups' into next
Tom Rini [Thu, 23 Mar 2023 00:57:39 +0000 (20:57 -0400)]
Merge branch '2023-03-22-assorted-minor-code-cleanups' into next

- Minor code cleanups based on problems found by clang or enabling LTO.

20 months agopurism: librem5: Fix a function declaration in spl.c
Tom Rini [Thu, 9 Mar 2023 16:22:11 +0000 (11:22 -0500)]
purism: librem5: Fix a function declaration in spl.c

Here we implement usb_gadget_handle_interrupts() but did not include
<linux/usb/gadget.h> so did not have the declaration correct. Fix this
and add the missing include.

Signed-off-by: Tom Rini <trini@konsulko.com>
20 months agoexamples: Don't use LTO for hello_world
Tom Rini [Thu, 9 Mar 2023 16:22:09 +0000 (11:22 -0500)]
examples: Don't use LTO for hello_world

If we're building U-Boot with LTO, we don't want to use that for
examples as it's more work than required.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agospl: Add function prototype for spl_mmc_get_uboot_raw_sector
Tom Rini [Thu, 9 Mar 2023 16:22:08 +0000 (11:22 -0500)]
spl: Add function prototype for spl_mmc_get_uboot_raw_sector

We did not add a prototype for spl_mmc_get_uboot_raw_sector to
include/spl.h before, so add and document one now. Correct the incorrect
prototype in board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c and
ensure that we have spl.h where we define a non-weak
spl_mmc_get_uboot_raw_sector as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
20 months agoarm: Correct cpu_reset function prototype on some platforms
Tom Rini [Thu, 9 Mar 2023 16:22:07 +0000 (11:22 -0500)]
arm: Correct cpu_reset function prototype on some platforms

Some platforms were not including <cpu_func.h> which sets the prototype
for reset_cpu, and in turn had it set wrong. Correct these cases.

Signed-off-by: Tom Rini <trini@konsulko.com>
20 months agoproftool: Remove unused variables in make_flame_tree
Tom Rini [Mon, 27 Feb 2023 22:08:38 +0000 (17:08 -0500)]
proftool: Remove unused variables in make_flame_tree

With clang-15 we now get reported that in the make_flame_tree function,
neither the missing_count nor depth variables are used, only
incremenete/decremented. Remove these.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoimx8image: Remove unused cont_img_count variable
Tom Rini [Mon, 27 Feb 2023 22:08:37 +0000 (17:08 -0500)]
imx8image: Remove unused cont_img_count variable

With clang-15, it is now reported that cont_img_count is unused. This is
true as the code will increment / reset this counter, but never
functionally use it. Remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
20 months agozlib: trees.c: Fix a warning with clang-15
Tom Rini [Mon, 27 Feb 2023 22:08:36 +0000 (17:08 -0500)]
zlib: trees.c: Fix a warning with clang-15

With clang-15 we now will get warnings such as:

warning: a function declaration without a prototype is deprecated in all
versions of C [-Wstrict-prototypes]

And it is easy enough to address this warning here, even if we would
like to stay in sync more with upstream as it's a single location.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agolibavb: Fix a warning with clang-15
Tom Rini [Mon, 27 Feb 2023 22:08:35 +0000 (17:08 -0500)]
libavb: Fix a warning with clang-15

With clang-15 we now will get warnings such as:

warning: a function declaration without a prototype is deprecated in all
versions of C [-Wstrict-prototypes]

And it is easy enough to address this warning here, as we aren't
concerned with re-syncing with an upstream.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agodlmalloc: Fix a warning with clang-15
Tom Rini [Mon, 27 Feb 2023 22:08:34 +0000 (17:08 -0500)]
dlmalloc: Fix a warning with clang-15

With clang-15 we now will get warnings such as:

warning: a function declaration without a prototype is deprecated in all
versions of C [-Wstrict-prototypes]

And it is easy enough to address this warning here, as we aren't
concerned with re-syncing with an upstream.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoglobal: Disable deprecated-non-prototype warning with clang
Tom Rini [Mon, 27 Feb 2023 22:08:33 +0000 (17:08 -0500)]
global: Disable deprecated-non-prototype warning with clang

We have a number of places in the code which use the following syntax:

void func(a, b, c)
    int a; /* Does a */
    something_t *b; /* Pointer to b */
    int c; /* Does c */
{
...
}

Which while not what we document as our coding style, this is also code
which we have imported from other projects, and would like to re-sync
with in the future. While the biggest example of this is the zlib code,
there are other places as well. For now, we will silence this warning.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoMerge branch '2023-03-22-assorted-fixes'
Tom Rini [Wed, 22 Mar 2023 18:01:01 +0000 (14:01 -0400)]
Merge branch '2023-03-22-assorted-fixes'

- Assorted TI platform fixes, correct location of NXP boot format git
  repository, don't try and mount partitions that are too small to be
  ext4 as ext4, handle .bin files in .gitattributes, flush out panic
  messages for sure, and correct console location on Arm total_compute.

20 months agodma: ti: k3-udma: Fix channel hang on teardown
Vignesh Raghavendra [Wed, 8 Mar 2023 04:12:57 +0000 (09:42 +0530)]
dma: ti: k3-udma: Fix channel hang on teardown

Setting RX flow error handling will stall the channel until descriptors
are available to move RX data. Setting this bit causes issues when
tearing down ethernet DMA channel at the end of TFTP transfer as
unrelated network packets can cause teardown to stall indefinitely waiting
for driver to queue add more desc leading to channel hang with error
logs:
udma_stop_dev2mem TIMEOUT !
udma_stop_dev2mem: peer not stopped TIMEOUT !
udma_stop_dev2mem TIMEOUT !

Fix this by clearing rx_error_handling similar to how its done for UDMA
as part of udma_alloc_rchan_sci_req()

This fixes occasional TFTP Failures seen when downloading multiple files
one after the other on AM64/AM62 SoCs.

Fixes: 1dfb71468d59 ("dma: ti: k3-udma: Add BCDMA and PKTDMA support")
Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
20 months agofs: ext4: check the minimal partition size to mount
Patrick Delaunay [Wed, 8 Mar 2023 08:49:54 +0000 (09:49 +0100)]
fs: ext4: check the minimal partition size to mount

No need to mount a too small partition to handle a EXT4 file system.

This patch add a test on partition size before to read the
SUPERBLOCK_SIZE buffer and avoid error latter in fs_devread() function.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
20 months agogitattributes: Treat .bin files as binary.
Sebastian Andrzej Siewior [Fri, 10 Mar 2023 13:52:30 +0000 (14:52 +0100)]
gitattributes: Treat .bin files as binary.

Binary files, which are committed to a private fork of this repository,
will be subject to line feed substitution unless marked as binary.

Mark .bin files as binary.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
20 months agoconfigs: am62x_evm_a53_defconfig: Fix SF_DEFAULT_MODE
Nikhil M Jain [Sat, 11 Mar 2023 15:54:23 +0000 (21:24 +0530)]
configs: am62x_evm_a53_defconfig: Fix SF_DEFAULT_MODE

Setting sf default mode to 0x3 breaks sf update when we do SF read
through u-boot console.

This issue arises when we do a splash image through OSPI flash media,
to fix this set the default mode to 0x0.

Fixes: fff4e278712d ("configs: enable OSPI related configs in AM62x")
Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
20 months agoarm: total_compute: Remap console logs
annsai01 [Mon, 13 Mar 2023 08:57:15 +0000 (14:27 +0530)]
arm: total_compute: Remap console logs

Remapping console logs from soc uart2 (s1 terminal)
to css non-secure (uart_ap terminal)

Signed-off-by: Annam Sai Manisha <annam.saimanisha@arm.com>
20 months agoconfigs: am62: move stack and heap to HSM RAM
Kamlesh Gurudasani [Thu, 2 Mar 2023 14:10:47 +0000 (19:40 +0530)]
configs: am62: move stack and heap to HSM RAM

On high security devices, ROM enables firewalls to protect the OCSRAM
region access during bootup. Only after TIFS has started (and had
time to disable the OCSRAM firewall region) will we have write access to
the region.

This means we will need to move the stack & heap from OCSRAM to HSM RAM
and reduce the size of BSS and the SPL to allow it to fit properly.

To protect us from overflowing our ~256k of HSM SRAM, add limits and
check during the wakeup SPL build.

Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com>
20 months agoarm: mach-k3: am62: move scratch board area to HSM RAM
Kamlesh Gurudasani [Thu, 2 Mar 2023 14:10:46 +0000 (19:40 +0530)]
arm: mach-k3: am62: move scratch board area to HSM RAM

On high security devices, ROM enables firewalls to protect the OCSRAM
region access during bootup. Only after TIFS has started (and had
time to disable the OCSRAM firewall region) will we have write access to
the region.

So, move scratch board area to HSM RAM.

Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com>
20 months agoconsole: Use flush() before panic and reset
Tony Dinh [Wed, 15 Mar 2023 00:24:26 +0000 (17:24 -0700)]
console: Use flush() before panic and reset

To make sure the panic and the reset messages will go out, console flush() should be used.
Sleep periods do not work in early u-boot phase when timer driver is not initialized yet.

Reference: https://lists.denx.de/pipermail/u-boot/2023-March/512233.html

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
20 months agoREADME.mpc85xx-sd-spi-boot: Suggest the NXP boot format github repo
Fabio Estevam [Fri, 13 Jan 2023 01:04:46 +0000 (22:04 -0300)]
README.mpc85xx-sd-spi-boot: Suggest the NXP boot format github repo

As explained in the text at the bottom of the page
https://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/boot-format:

"QUIC repositories on this site will not receive any updates after
March 31, 2022, and will be deleted on March 31, 2023."

Point to the NXP boot format github repo instead.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Pali Rohár <pali@kernel.org>
20 months agoMerge branch '2023-03-21-assorted-CI-updates' into next
Tom Rini [Wed, 22 Mar 2023 14:35:58 +0000 (10:35 -0400)]
Merge branch '2023-03-21-assorted-CI-updates' into next

- Assorted improvements to our GitLab and Azure infrastructure.

20 months agoMerge tag 'u-boot-amlogic-20230322' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Wed, 22 Mar 2023 13:21:41 +0000 (09:21 -0400)]
Merge tag 'u-boot-amlogic-20230322' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- odroid-go-ultra: setup PMIC regulators at board init

20 months agoCI: Allow a mirror to be specified for Docker Hub
Peter Hoyes [Fri, 10 Mar 2023 09:53:03 +0000 (09:53 +0000)]
CI: Allow a mirror to be specified for Docker Hub

To conserve bandwidth and potentially avoid rate limits, allow a local
mirror of Docker Hub to be specified globally. The default value is
unchanged.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
20 months agoCI: Allow job tag to be optionally set globally
Peter Hoyes [Fri, 10 Mar 2023 09:53:02 +0000 (09:53 +0000)]
CI: Allow job tag to be optionally set globally

The default behavior of Gitlab runners is to only run jobs which match
the configured tag, although there is an option to run untagged jobs
[1].

To support running the CI in more complex environments where different
types of runners may be present that support different tags, allow the
DEFAULT_TAG for all jobs in the pipeline to be set globally using an
environment variable. An empty default value is provided to retain
support for untagged runners.

[1] https://docs.gitlab.com/ee/ci/runners/configure_runners.html#use-tags-to-control-which-jobs-a-runner-can-run

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>