]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
2 years agoconfigs: am62x_evm_a53_defconfig: Disable semi-functional PSCI reset support
Jan Kiszka [Fri, 25 Aug 2023 18:03:01 +0000 (13:03 -0500)] 
configs: am62x_evm_a53_defconfig: Disable semi-functional PSCI reset support

At this point, system shutdown is not supported by the DM firmware
that TF-A calls. As we can't de-select only this feature[1], declare
complete PSCI reset support as non-functional so that we don't signal
incomplete support to the OS via EFI runtime services. This makes
power-off under Linux work again when booting via EFI.

[1] https://uefi.org/specs/UEFI/2.9_A/08_Services_Runtime_Services.html?highlight=efiresetshutdown#resetsystem
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agoarm: mach-k3: am625: Add support for UDA FS
Nishanth Menon [Fri, 25 Aug 2023 18:03:00 +0000 (13:03 -0500)] 
arm: mach-k3: am625: Add support for UDA FS

While boot partition support with EMMC boot is useful, it is
constrained by the size of boot hardware partition itself.

In the case of K3 devices, tispl images can contain OP-TEE images that
can substantially vary in size and the u-boot image itself can vary over
time as we enable various features.

So use the CSD information in the case of EMMC_BOOT configuration being
enabled to pick boot partition or UDA FS mode operation to pick.

If EMMC_BOOT is disabled, then depend on filesystem configuration to
pick data from UDA.

While at this, drop the extraneous whitespace.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
2 years agoconfigs: am62x_evm*: Enable EMMC_BOOT configuration
Nishanth Menon [Fri, 25 Aug 2023 18:02:59 +0000 (13:02 -0500)] 
configs: am62x_evm*: Enable EMMC_BOOT configuration

Enable EMMC boot support for AM62x evm base configuration.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
2 years agoarm: mach-k3: am625_init: Convert rtc_erratumi2327_init to static
Nishanth Menon [Fri, 25 Aug 2023 18:02:58 +0000 (13:02 -0500)] 
arm: mach-k3: am625_init: Convert rtc_erratumi2327_init to static

The erratum is called locally, make it static, drop the #ifdeffery since
it will only be called in R5 build and mark it potentially unused to
stop compiler screaming at us.

While at this, drop the redundant return for a void function.

Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
2 years agoarm: mach-k3: am625_init: Use IS_ENABLED()
Nishanth Menon [Fri, 25 Aug 2023 18:02:57 +0000 (13:02 -0500)] 
arm: mach-k3: am625_init: Use IS_ENABLED()

Drop the #ifdeffery and use IS_ENABLED() inline check and let the compiler
do it's thing.

Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
2 years agoboard: ti: am62x: am62x.env: Use default findfdt
Nishanth Menon [Fri, 25 Aug 2023 18:02:56 +0000 (13:02 -0500)] 
board: ti: am62x: am62x.env: Use default findfdt

Use the default findfdt using CONFIG_DEFAULT_DEVICE_TREE

Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agoinclude: env: ti: Add a generic default_findfdt.env
Nishanth Menon [Fri, 25 Aug 2023 18:02:55 +0000 (13:02 -0500)] 
include: env: ti: Add a generic default_findfdt.env

ti_mmc bootmethod uses a findfdt routine that is expected to be
implemented by all platforms.

Define a default findfdt based on configured DEFAULT_DEVICE_TREE option
for u-boot. This saves duplication across multiple boards and handles
architecture folder location changes centrally.

TI ARMV7 platforms will need to override default_device_tree_subarch
in the env file to point to the appropriate platform. Note: default
"omap" is used to cater to "most common" default.

Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agoinclude: env: ti: ti_armv7_common.env: Rename to ti_common.env
Nishanth Menon [Fri, 25 Aug 2023 18:02:54 +0000 (13:02 -0500)] 
include: env: ti: ti_armv7_common.env: Rename to ti_common.env

ti_armv7_common does not make any more sense as it is used by armv7
and armv8 TI based platforms.

Reported-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
2 years agoinclude: configs: am62x_evm: Drop distro_bootcmd usage
Nishanth Menon [Fri, 25 Aug 2023 18:02:53 +0000 (13:02 -0500)] 
include: configs: am62x_evm: Drop distro_bootcmd usage

Now that BOOTSTD is used by default, drop un-used header file
inclusion.

Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agoconfigs: am62x_evm_a53_defconfig: Switch to bootstd
Nishanth Menon [Fri, 25 Aug 2023 18:02:52 +0000 (13:02 -0500)] 
configs: am62x_evm_a53_defconfig: Switch to bootstd

Switch to using bootstd. Note with this change, we will stop using
distro_bootcmd and instead depend entirely on bootflow method of
starting the system up.

Suggested-by: Tom Rini <trini@konsulko.com>
Suggested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agoboard: ti: am62x: am62x.env: Add explicit boot_targets
Nishanth Menon [Fri, 25 Aug 2023 18:02:51 +0000 (13:02 -0500)] 
board: ti: am62x: am62x.env: Add explicit boot_targets

Add explicit boot_targets to indicate the specific boot sequence to
follow.

NOTE: The non-standard ti_mmc emulates what is done for distro_boot.
With bootstd, this will eventually need to be replaced by equivalent
class.

Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agoinclude: configs: am62x_evm: Wrap distroboot with CONFIG_DISTRO_DEFAULTS
Nishanth Menon [Fri, 25 Aug 2023 18:02:50 +0000 (13:02 -0500)] 
include: configs: am62x_evm: Wrap distroboot with CONFIG_DISTRO_DEFAULTS

Wrap the distro_boot options with CONFIG_DISTRO_DEFAULTS.

This is an intermediate step for us to switch over to
CONFIG_BOOTSTD_DEFAULTS and drop this section in follow on patches.

Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agoinclude: configs: am62x_evm: Drop unused SDRAM address
Nishanth Menon [Fri, 25 Aug 2023 18:02:49 +0000 (13:02 -0500)] 
include: configs: am62x_evm: Drop unused SDRAM address

Drop unused macro. This was meant for a second region of DDR which we
do not need for AM62x evm configurations.

Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agoinclude: configs: ti_armv7_common: Add documentation for protected section
Nishanth Menon [Fri, 25 Aug 2023 18:02:48 +0000 (13:02 -0500)] 
include: configs: ti_armv7_common: Add documentation for protected section

Make the section protected by CONFIG_DISTRO_DEFAULTS macro clear.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
2 years agoinclude: env: ti: mmc: envboot: Only attempt boot.scr if BOOTSTD is not enabled
Nishanth Menon [Fri, 25 Aug 2023 18:02:47 +0000 (13:02 -0500)] 
include: env: ti: mmc: envboot: Only attempt boot.scr if BOOTSTD is not enabled

'script' bootmethod that should be used with CONFIG_BOOTSTD.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agoinclude: env: ti: mmc: envboot/mmcboot: Check result of mmc dev before proceeding
Nishanth Menon [Fri, 25 Aug 2023 18:02:46 +0000 (13:02 -0500)] 
include: env: ti: mmc: envboot/mmcboot: Check result of mmc dev before proceeding

If mmc dev reports that the device is not present, there is no point in
proceeding further to attempt to load the files.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agoboard: verdin-am62: fix check for minimum memory size
Emanuele Ghidoli [Thu, 24 Aug 2023 08:08:50 +0000 (10:08 +0200)] 
board: verdin-am62: fix check for minimum memory size

verdin am62 SKUs comes in multiple memory configuration, check that
the detected memory is at least 512MB since we have some
reserved memory just before this threshold and therefore
the module cannot work with less memory.

Fixes: 7d1a10659f5b ("board: toradex: add verdin am62 support")
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2 years agoverdin-am62: add u-boot update wrappers
Emanuele Ghidoli [Thu, 24 Aug 2023 08:08:49 +0000 (10:08 +0200)] 
verdin-am62: add u-boot update wrappers

Add update_tiboot3, update_tispl and update_uboot wrappers to update
R5 SPL, A53 SPL and A53 U-boot respectively.

Usage example:
> tftpboot ${loadaddr} tiboot3-am62x-gp-verdin.bin
> run update_tiboot3

> tftpboot ${loadaddr} tispl.bin
> run update_tispl

> tftpboot ${loadaddr} u-boot.img
> run update_uboot

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2 years agoMerge branch '2023-09-06-assorted-CI-updates' into next
Tom Rini [Wed, 6 Sep 2023 22:47:18 +0000 (18:47 -0400)] 
Merge branch '2023-09-06-assorted-CI-updates' into next

- Merge in a number of changes for CI. The biggest ones of note are that
  we now support sandbox64 in CI, and Azure has been reworked to
  generally have more consistent overall runtime for the pipeline.

2 years agoAzure: Add sandbox64 to CI
Tom Rini [Fri, 1 Sep 2023 20:41:43 +0000 (16:41 -0400)] 
Azure: Add sandbox64 to CI

Now that sandbox64 can run and pass the regular test.py suite, add it
here as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years ago.gitlab-ci: Test sandbox64 board in addition to sandbox
Marek Vasut [Fri, 1 Sep 2023 08:48:10 +0000 (10:48 +0200)] 
.gitlab-ci: Test sandbox64 board in addition to sandbox

Test both 32bit and 64bit sandbox boards in CI.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoAzure: Split sandbox and qemu test.py runs
Tom Rini [Fri, 1 Sep 2023 20:41:42 +0000 (16:41 -0400)] 
Azure: Split sandbox and qemu test.py runs

Currently, most sandbox runs take a long time (due to running so many
tests) while QEMu based test.py runs are fairly short.  Split the
pipeline here so that we get more consistent average run times.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoAzure: Rework test_py job to publish its wrapper script
Tom Rini [Fri, 1 Sep 2023 20:41:41 +0000 (16:41 -0400)] 
Azure: Rework test_py job to publish its wrapper script

Both to aide in debugging of any test.py issues as well as to make it
easier to split the current matrix in two, have a new job that creates
and publishes the current wrapper script we use for test.py jobs.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoCI: Drop some jobs we didn't really utilize
Tom Rini [Sun, 20 Aug 2023 17:31:29 +0000 (13:31 -0400)] 
CI: Drop some jobs we didn't really utilize

- We have added more TODO/etc comments since this task was created and
  never focused on removing them.
- The output of sloccount isn't preserved or looked at, and if desired
  should be in the release stats pages instead somehow.
- The results of cppcheck aren't investigated and require modeling work
  to be useful to start with.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoCI: Combine tools-only and envtools jobs
Tom Rini [Sun, 20 Aug 2023 17:31:28 +0000 (13:31 -0400)] 
CI: Combine tools-only and envtools jobs

These jobs are to confirm specific build targets, on a Linux host.  We
can safely combine these two build tests, with a make mrproper in
between.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoAzure: Rework build the world jobs
Tom Rini [Sun, 20 Aug 2023 17:31:27 +0000 (13:31 -0400)] 
Azure: Rework build the world jobs

Now that we have 3600 minutes per build job, condense and rework things
such that our overall time largely doesn't change, but we can also
largely avoid having to re-tweak this job to avoid timeouts.  Given that
we have 10 threads, we also move a few of the specific sandbox test
builds to a prior stage.

Note that while sandbox builds with address sanitization enabled (ASAN)
not all tests pass, so we limit ourselves to just checking that the
version test passes for now.

Link: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml#timeouts
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agotest: print: Fix hexdump test on 64bit systems
Marek Vasut [Fri, 25 Aug 2023 08:19:40 +0000 (10:19 +0200)] 
test: print: Fix hexdump test on 64bit systems

Use the following regex to make this test compatible with
both 32bit and 64bit systems. The trick is to use %0*lx
format string for the address prefix in the test.

"
s@\(ut_assert_nextline("\)0\+\([^:]\+\)\(:.*"\)\();\)@\1%0*lx\3, IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x\2UL\4
"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agotest: dm: test-fdt: Use fdtdec_get_int() in dm_check_devices()
Marek Vasut [Wed, 23 Aug 2023 19:37:44 +0000 (21:37 +0200)] 
test: dm: test-fdt: Use fdtdec_get_int() in dm_check_devices()

The current fdtdec_get_addr() takes into consideration #address-cells
and #size-cells for "ping-expect" property which is clearly neither.
Use fdtdec_get_int() instead and return negative one in case the
property is not in DT or the platform under test is not DT based,
i.e. mimic the current fdtdec_get_addr() behavior.

This fixes ut dm dm_test_bus_children test.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoconfigs: sandbox64: Enable legacy image format support
Marek Vasut [Wed, 23 Aug 2023 00:17:12 +0000 (02:17 +0200)] 
configs: sandbox64: Enable legacy image format support

Align the sandbox64 defconfig with sandbox defconfig. Enable missing
legacy image format support. This fixes ut_bootstd_bootflow_cmd_menu
test.

Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agoMerge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-coldfire into...
Tom Rini [Wed, 6 Sep 2023 15:50:49 +0000 (11:50 -0400)] 
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-coldfire into next

- Relocation support

2 years agoMerge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-usb into next
Tom Rini [Wed, 6 Sep 2023 15:50:22 +0000 (11:50 -0400)] 
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-usb into next

2 years agoMerge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-sh into next
Tom Rini [Wed, 6 Sep 2023 15:00:42 +0000 (11:00 -0400)] 
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-sh into next

- rmobile cleanup

2 years agoARM: rmobile: Clean up rmobile_cpuinfo_idx()
Marek Vasut [Sat, 19 Aug 2023 14:39:13 +0000 (16:39 +0200)] 
ARM: rmobile: Clean up rmobile_cpuinfo_idx()

Clean the function up a bit further. Return immediately on match
and return ARRAY_SIZE() - 1 on failure. Add proper comment in that
case.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2 years agoMerge branch '2023-09-06-riscv-fixes' into next
Tom Rini [Wed, 6 Sep 2023 15:00:10 +0000 (11:00 -0400)] 
Merge branch '2023-09-06-riscv-fixes' into next

- Merge two patches to fix the issues with risc-v building on next after
  the merge of v2023.10-rc4 to next.

2 years agoriscv: Correct event usage for riscv_cpu_probe/setup
Tom Rini [Mon, 4 Sep 2023 19:06:35 +0000 (15:06 -0400)] 
riscv: Correct event usage for riscv_cpu_probe/setup

With having both an EVENT_SPY_SIMPLE setup for both riscv_cpu_probe and
riscv_cpu_setup we do not need the latter function to call the former
function as it will already have been done in time.

Fixes: 1c55d62fb9cc ("riscv: cpu: make riscv_cpu_probe to EVT_DM_POST_INIT_R callback")
Tested-by: Milan P. Stanić <mps@arvanta.net>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoriscv: Rework riscv_cpu_probe for current event macros
Tom Rini [Mon, 4 Sep 2023 19:06:34 +0000 (15:06 -0400)] 
riscv: Rework riscv_cpu_probe for current event macros

This function should now be a EVENT_SPY_SIMPLE call, update it.

Tested-by: Milan P. Stanić <mps@arvanta.net>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarch: m68k: Implement relocation
Marek Vasut [Sat, 26 Aug 2023 22:25:36 +0000 (00:25 +0200)] 
arch: m68k: Implement relocation

Implement relocation for M68K. Perform all the updates in start.S
relocate_code in assemby, since it is a simple matter of traversing
the dynsym table and adding relocation offset - MONITOR_BASE to all
the items in that table. The necessity to deal with MONITOR_BASE is
a specific of M68K, where the ELF entry point is at offset 0x400,
which is the MONITOR_BASE, while TEXT_BASE is at offset 0 .

This also removes the one last user of NEEDS_MANUAL_RELOC, so that
could be finally cleaned up .

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agotools: relocate-rela: Add M68K support
Marek Vasut [Sat, 26 Aug 2023 22:25:35 +0000 (00:25 +0200)] 
tools: relocate-rela: Add M68K support

Add M68K ELF32 support into this tool, so it can patch static rela
into M68K u-boot-nodtb.bin . This is the first step toward M68K
relocation support, and in turn, removal of NEEDS_MANUAL_RELOC
from the codebase altogether.

Tested-by: Michal Simek <michal.simek@amd.com> # microblaze, arm64
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agotools: relocate-rela: Fix BE symtab handling
Marek Vasut [Sun, 30 Jul 2023 22:16:52 +0000 (00:16 +0200)] 
tools: relocate-rela: Fix BE symtab handling

The symtab contains data in target endianness, convert the data to
native endianness before doing any operations and on them, and back
to target endianness before updating the bin file.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tested-by: Michal Simek <michal.simek@amd.com> # microblaze, arm64
Reviewed-by: Angelo Dureghello <angelo@kernel-space.org>
2 years agoMerge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Tue, 5 Sep 2023 18:44:10 +0000 (14:44 -0400)] 
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-usb

- DWC3 fix on Layerscape

2 years agoMerge tag 'u-boot-imx-20230905' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Tue, 5 Sep 2023 13:05:16 +0000 (09:05 -0400)] 
Merge tag 'u-boot-imx-20230905' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

Fixes for release
-----------------

- imx9: fix DRAM calculation
- thermal: fixes
- fixed for DM, DH and Gateworks boards

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

2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Tue, 5 Sep 2023 13:04:49 +0000 (09:04 -0400)] 
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

+ Implement OpenSBI DBCN extension for early debug console
+ Fixes for VisionFive2 board
      + Fix timer missing
      + Fix L2 LIM issue
      + Enable PCIE auto enumeration to support USB and NVMe by default
+ Set eth0 mac address properly
+ Add __noreturn attribute to spl_invoke_opensbi

2 years agorisc-v: implement DBCN based debug console
Heinrich Schuchardt [Mon, 4 Sep 2023 11:24:04 +0000 (13:24 +0200)] 
risc-v: implement DBCN based debug console

Use the DBCN SBI extension to implement a debug console.
Make it the default for S-mode RISC-V.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agorisc-v: implement DBCN write byte
Heinrich Schuchardt [Mon, 4 Sep 2023 11:24:03 +0000 (13:24 +0200)] 
risc-v: implement DBCN write byte

The DBCN extension provides a Console Write Byte call.
Implement function sbi_dbcn_write_byte to invoke it.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agospl: add __noreturn attribute to spl_invoke_opensbi function
Chanho Park [Tue, 29 Aug 2023 01:20:14 +0000 (10:20 +0900)] 
spl: add __noreturn attribute to spl_invoke_opensbi function

spl_invoke_opensbi function is not returned to SPL. Thus, we need to
set __noreturn function attribute.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoconfigs: starfive: Disable SYS_MALLOC_CLEAR_ON_INIT by default
Shengyu Qu [Thu, 24 Aug 2023 16:25:21 +0000 (00:25 +0800)] 
configs: starfive: Disable SYS_MALLOC_CLEAR_ON_INIT by default

SPL_SYS_MALLOC_CLEAR_ON_INIT would enable SYS_MALLOC_CLEAR_ON_INIT by
default, but that's not need on JH7110, so disable that.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoriscv: cpu: jh7110: Imply SPL_SYS_MALLOC_CLEAR_ON_INIT
Shengyu Qu [Thu, 24 Aug 2023 16:25:20 +0000 (00:25 +0800)] 
riscv: cpu: jh7110: Imply SPL_SYS_MALLOC_CLEAR_ON_INIT

Starfive JH7110 needs to clear L2 LIM to zero before use or ECC error
would be triggered. Currently, we use DDR ram for SPL malloc arena on
Visionfive 2 board in defconfig, but it's also possible to use L2 LIM as
SPL malloc arena. To avoid triggering ECC error in this scenario, we
imply SPL_SYS_MALLOC_CLEAR_ON_INIT as default.

Signed-off-by: Bo Gan <ganboing@gmail.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agodlmalloc: Add support for SPL_SYS_MALLOC_CLEAR_ON_INIT
Shengyu Qu [Thu, 24 Aug 2023 16:25:19 +0000 (00:25 +0800)] 
dlmalloc: Add support for SPL_SYS_MALLOC_CLEAR_ON_INIT

To support SPL_SYS_MALLOC_CLEAR_ON_INIT, we have to modify
#ifdef CONFIG_SYS_MALLOC_CLEAR_ON_INIT
to #if CONFIG_IS_ENABLED(SYS_MALLOC_CLEAR_ON_INIT)

Signed-off-by: Bo Gan <ganboing@gmail.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoKconfig: Add SPL_SYS_MALLOC_CLEAR_ON_INIT
Shengyu Qu [Thu, 24 Aug 2023 16:25:18 +0000 (00:25 +0800)] 
Kconfig: Add SPL_SYS_MALLOC_CLEAR_ON_INIT

Add SPL version of SYS_MALLOC_CLEAR_ON_INIT, this would help devices
that need to clear ram before use to work correctly.

Signed-off-by: Bo Gan <ganboing@gmail.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agodoc: board: starfive: Add more info about supported driver
Shengyu Qu [Tue, 22 Aug 2023 14:33:57 +0000 (22:33 +0800)] 
doc: board: starfive: Add more info about supported driver

Since PLDA PCIE driver is added and VL805 support is enabled in
defconfig for Starfive Visionfive 2, modify the document to keep
consistent.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Tested-by: Milan P. Stanić <mps@arvanta.net>
2 years agoconfigs: starfive: Enable PCIE auto enum and NVME/USB stuff for Starfive Visionfive 2
Shengyu Qu [Tue, 22 Aug 2023 14:33:56 +0000 (22:33 +0800)] 
configs: starfive: Enable PCIE auto enum and NVME/USB stuff for Starfive Visionfive 2

Although PCIE driver already exists, board defconfig isn't configured to
enable PCIE enum on boot, thus USB storage device and NVME drive are not
supported by default. So modify defconfig to enable PCIE auto enum, then
start USB subsystem and scan nvme drive on boot.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Tested-by: Milan P. Stanić <mps@arvanta.net>
2 years agoriscv: jh7110: enable riscv,timer in the device tree
Torsten Duwe [Mon, 14 Aug 2023 16:05:33 +0000 (18:05 +0200)] 
riscv: jh7110: enable riscv,timer in the device tree

The JH7110 has the arhitectural CPU timer on all 5 rv64 cores.
Note that in the device tree.

Signed-off-by: Torsten Duwe <duwe@suse.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoriscv: allow riscv timer to be instantiated via device tree
Torsten Duwe [Mon, 14 Aug 2023 16:05:28 +0000 (18:05 +0200)] 
riscv: allow riscv timer to be instantiated via device tree

For the architectural timer on riscv, there already is a defined
device tree binding[1]. Allow timer instances to be created from
device tree matches, but for now retain the old mechanism, which
registers the timer biggy-back with the CPU.

[1] linux/Documentation/devicetree/bindings/timer/riscv,timer.yaml

Signed-off-by: Torsten Duwe <duwe@suse.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoeeprom: starfive: set eth0 mac address properly
Seung-Woo Kim [Fri, 11 Aug 2023 07:12:25 +0000 (16:12 +0900)] 
eeprom: starfive: set eth0 mac address properly

fdt_fixup_ethernet() sets eth0 mac address from ethaddr. Set
ethaddr to environment instead of eth0addr.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agonokia_rx51: Remove platform
Tom Rini [Tue, 5 Sep 2023 01:12:28 +0000 (21:12 -0400)] 
nokia_rx51: Remove platform

This platform is behind on migrations (it is the sole user of the oldest
legacy version of the USB gadget stack and is long overdue for
migration) and with Pali no longer being a maintainer, we remove this
platform.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMAINTAINERS: Drop Pali Rohár
Tom Rini [Tue, 5 Sep 2023 01:12:27 +0000 (21:12 -0400)] 
MAINTAINERS: Drop Pali Rohár

Remove Pali from his listed maintainer entries due to his publicly
visible actions on the mailing list.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agousb: host: ohci-generic: Make usage of clock/reset bulk() API
Fabrice Gasnier [Mon, 4 Sep 2023 12:20:21 +0000 (14:20 +0200)] 
usb: host: ohci-generic: Make usage of clock/reset bulk() API

Make usage of clock and reset bulk API in order to simplify the code

Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
2 years agousb: check for companion controller in uclass
Fabrice Gasnier [Fri, 1 Sep 2023 09:52:01 +0000 (11:52 +0200)] 
usb: check for companion controller in uclass

EHCI is usually used with companion controller (like OHCI) as companion
controller. This information on the companion is missing currently in
companion drivers.
So, if the usb-uclass isn't aware, it may scan busses in any order: OHCI
first, then EHCI.
This is seen on STM32MP1 where DT probing makes the probe order to occur
by increasing address (OHCI address < EHCI address).

When a low speed or full-speed device is plugged in, it's not detected as
EHCI should first detect it, and give ownership (handover) to OHCI.

Current situation on STM32MP1 (with a low speed device plugged-in)
STM32MP> usb start
starting USB...
Bus usb@5800c000: USB OHCI 1.0
Bus usb@5800d000: USB EHCI 1.00
scanning bus usb@5800c000 for devices... 1 USB Device(s) found
scanning bus usb@5800d000 for devices... 1 USB Device(s) found
   scanning usb for storage devices... 0 Storage Device(s) found

The "companion" property in the device tree allow to retrieve companion
controller information, from the EHCI node. This allow marking the
companion driver as such.

With this patch (same low speed device plugged in):
STM32MP> usb start
starting USB...
Bus usb@5800c000: USB OHCI 1.0
Bus usb@5800d000: USB EHCI 1.00
scanning bus usb@5800d000 for devices... 1 USB Device(s) found
scanning bus usb@5800c000 for devices... 2 USB Device(s) found
   scanning usb for storage devices... 0 Storage Device(s) found
STM32MP> usb tree
USB device tree:
1  Hub (12 Mb/s, 0mA)
|   U-Boot Root Hub
|
+-2  Human Interface (1.5 Mb/s, 100mA)
   HP HP USB 1000dpi Laser Mouse

1  Hub (480 Mb/s, 0mA)
 u-boot EHCI Host Controller

This also optimize bus scan when a High speed device is plugged in, as
the usb-uclass skips OHCI in this case:

STM32MP> usb reset
resetting USB...
Bus usb@5800c000: USB OHCI 1.0
Bus usb@5800d000: USB EHCI 1.00
scanning bus usb@5800d000 for devices... 2 USB Device(s) found
   scanning usb for storage devices... 1 Storage Device(s) found
STM32MP> usb tree
USB device tree:
1  Hub (480 Mb/s, 0mA)
|  u-boot EHCI Host Controller
|
+-2  Mass Storage (480 Mb/s, 200mA)
   SanDisk Cruzer Blade 03003432021922011407

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agothermal: imx_tmu: Increase the polling interval
Fabio Estevam [Wed, 23 Aug 2023 17:59:11 +0000 (14:59 -0300)] 
thermal: imx_tmu: Increase the polling interval

Polling every second to check whether the CPU has cooled down is
too frequent.

Allow more time for the CPU to cool down by increasing the polling
interval to 5 seconds by defaut.

This value is used in the absence of the 'polling-delay' devicetree
property.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agothermal: imx_tmu: Fix the temperature unit
Fabio Estevam [Wed, 23 Aug 2023 17:59:10 +0000 (14:59 -0300)] 
thermal: imx_tmu: Fix the temperature unit

The temperature unit is millidegree Celsius, so divide by 1000 to correctly
print the temperature values in Celsius.

While at it, also change a typo: "has beyond" to "is beyond".

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agothermal: imx_tmu: Increase the log level for high temperatures
Fabio Estevam [Wed, 23 Aug 2023 17:59:09 +0000 (14:59 -0300)] 
thermal: imx_tmu: Increase the log level for high temperatures

dev_info() message is not printed by default. Increase the log level
to dev_crit(). This allows the critical messages related to the temperature
getting beyong the alert threshold to be displayed.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agothermal: imx_tmu: Fix the polling default
Fabio Estevam [Wed, 23 Aug 2023 17:59:08 +0000 (14:59 -0300)] 
thermal: imx_tmu: Fix the polling default

When the 'polling-delay' property is not passed via devicetree,
pdata->polling_delay keeps at 0. This causes the imx_tmu driver to get
stuck inside the busy while() loop when the CPU temperature is above
the alert point.

Fix this problem by passing a one second polling interval, which provides
a proper delay to let the system to cool down and exit the while() loop
when the temperature is below the alert point.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agoimx8mm_evk_defconfig: Select CONFIG_IMX_TMU
Fabio Estevam [Wed, 23 Aug 2023 17:59:07 +0000 (14:59 -0300)] 
imx8mm_evk_defconfig: Select CONFIG_IMX_TMU

Select the i.MX8MM thermal driver as it is useful for displaying
the CPU temperature and its grading:

CPU:   Commercial temperature grade (0C to 95C) at 38C

It also prevents booting when the temperature is above the alert
point.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agoevent.h: Documented some newly added portions better
Tom Rini [Mon, 4 Sep 2023 15:19:50 +0000 (11:19 -0400)] 
event.h: Documented some newly added portions better

After the merge of v2023.10-rc4 to next include/event.h needs to be
fully documented in order for documentation builds to complete.  Rewords
two of the event_t descriptions to be docbook style and better match the
rest of this enum.  Fix two typos (flag->flags) in other comments.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge tag 'v2023.10-rc4' into next
Tom Rini [Mon, 4 Sep 2023 14:51:58 +0000 (10:51 -0400)] 
Merge tag 'v2023.10-rc4' into next

Prepare v2023.10-rc4

2 years agoPrepare v2023.10-rc4 v2023.10-rc4
Tom Rini [Mon, 4 Sep 2023 14:39:43 +0000 (10:39 -0400)] 
Prepare v2023.10-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge tag 'rpi-2023.10' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi
Tom Rini [Mon, 4 Sep 2023 14:07:48 +0000 (10:07 -0400)] 
Merge tag 'rpi-2023.10' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi

Updates for RPi for 2023.10:

- rpi: Disable DISTRO_DEFAULTS
- arm: rpi: Switch to standard boot
- arm: rpi: Switch to a text environment

2 years agousb: dwc3: Fix enabling USB_DR_MODE_HOST
Oleksandr Suvorov [Fri, 25 Aug 2023 10:42:40 +0000 (13:42 +0300)] 
usb: dwc3: Fix enabling USB_DR_MODE_HOST

The original logic always enables USB_DR_MODE_HOST operation mode in
dwc3_layerscape_bind() in u-boot. Prevent choosing USB_DR_MODE_HOST
operation mode if USB_HOST is not enabled.

Fixes: 2b0b51d0bed ("usb: dwc3: add layerscape support")
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
2 years agousb: dwc3: Fix renaming SPL_USB_HOST_SUPPORT to SPL_USB_HOST
Oleksandr Suvorov [Fri, 25 Aug 2023 10:42:39 +0000 (13:42 +0300)] 
usb: dwc3: Fix renaming SPL_USB_HOST_SUPPORT to SPL_USB_HOST

In the usb/dwc3-layerscape driver the first option should be renamed
to the latter as well. Do it.

Fix original logic in dwc3_layerscape_bind() - do not enable

Fixes: 333e4a621df ("Rename SPL_USB_HOST_SUPPORT to SPL_USB_HOST")
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
2 years agoARM: imx: Use default SAVED_DRAM_TIMING_BASE on Data Modul i.MX8M Plus eDM SBC
Marek Vasut [Thu, 31 Aug 2023 14:41:46 +0000 (16:41 +0200)] 
ARM: imx: Use default SAVED_DRAM_TIMING_BASE on Data Modul i.MX8M Plus eDM SBC

Use default SAVED_DRAM_TIMING_BASE as that is what upstream TFA expects.
Without this change, the board will fail to suspend/resume e.g. in Linux.

Signed-off-by: Marek Vasut <marex@denx.de>
2 years agoARM: imx: Use default SAVED_DRAM_TIMING_BASE on Data Modul i.MX8M Mini eDM SBC
Marek Vasut [Thu, 31 Aug 2023 14:41:45 +0000 (16:41 +0200)] 
ARM: imx: Use default SAVED_DRAM_TIMING_BASE on Data Modul i.MX8M Mini eDM SBC

Use default SAVED_DRAM_TIMING_BASE as that is what upstream TFA expects.
Without this change, the board will fail to suspend/resume e.g. in Linux.

Signed-off-by: Marek Vasut <marex@denx.de>
2 years agoARM: imx: Use default SAVED_DRAM_TIMING_BASE on DH i.MX8M Plus DHCOM
Marek Vasut [Thu, 31 Aug 2023 14:41:15 +0000 (16:41 +0200)] 
ARM: imx: Use default SAVED_DRAM_TIMING_BASE on DH i.MX8M Plus DHCOM

Use default SAVED_DRAM_TIMING_BASE as that is what upstream TFA expects.
Without this change, the board will fail to suspend/resume e.g. in Linux.

Signed-off-by: Marek Vasut <marex@denx.de>
2 years agoboard: gateworks: venice: fix gw7904
Tim Harvey [Tue, 15 Aug 2023 22:01:10 +0000 (15:01 -0700)] 
board: gateworks: venice: fix gw7904

Add missing imx8mm-venice-gw7904 to CONFIG_OF_LIST

Fixes commit 61e7f9732565 ("board: gateworks: venice: add imx8mm-gw7904 support")
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoarm: imx: imx8m: imx9: Fix DRAM size calculation due to rom_pointer
Elena Popa [Tue, 8 Aug 2023 11:58:26 +0000 (14:58 +0300)] 
arm: imx: imx8m: imx9: Fix DRAM size calculation due to rom_pointer

If dram_init_banksize() is called from SPL, the rom_pointer, at that
point, is not correctly initialized. This causes wrong calculation of
DRAM start and size in dram_init_banksize(). The issue became apparent
only in Falcon Mode. Added an extra condition to prevent using
rom_pointer in SPL.

Signed-off-by: Elena Popa <elena.popa@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoARM: imx: Select 2 DRAM banks on Data Modul i.MX8M Mini eDM SBC
Marek Vasut [Sat, 5 Aug 2023 03:40:02 +0000 (05:40 +0200)] 
ARM: imx: Select 2 DRAM banks on Data Modul i.MX8M Mini eDM SBC

U-Boot splits DRAM bank spanning addresses below and above the 32bit
boundary into two DRAM banks. Since this platform may come with 4GiB
of DRAM, increase the DRAM bank count to 2.

Signed-off-by: Marek Vasut <marex@denx.de>
2 years agoARM: imx: Drop CONFIG_USE_BOOTCOMMAND=n on i.MX6 DHSOM
Marek Vasut [Tue, 25 Jul 2023 15:24:43 +0000 (17:24 +0200)] 
ARM: imx: Drop CONFIG_USE_BOOTCOMMAND=n on i.MX6 DHSOM

This board certainly does use default 'run distro_bootcmd' boot command,
make sure this is set in 'bootcmd' variable.

Fixes: 970bf8603b8 ("Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoarm: rpi: Switch to a text environment
Simon Glass [Thu, 27 Jul 2023 21:54:30 +0000 (15:54 -0600)] 
arm: rpi: Switch to a text environment

Use the new environment format so we can drop most of the config.h file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agorpi: Disable DISTRO_DEFAULTS
Simon Glass [Thu, 27 Jul 2023 21:54:29 +0000 (15:54 -0600)] 
rpi: Disable DISTRO_DEFAULTS

Disable this option to reclaim some space, since bootstd requires less
functionality to operate (e.g. hush parser).

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoarm: rpi: Switch to standard boot
Simon Glass [Thu, 27 Jul 2023 21:54:28 +0000 (15:54 -0600)] 
arm: rpi: Switch to standard boot

Drop use of the distro scripts and use standard boot instead.

We don't need to specify the mmc devices individually, since they are
used in order from 0 to 2, and standard boot uses that order anyway.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoMerge tag 'doc-2023-10-rc4-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 2 Sep 2023 13:08:54 +0000 (09:08 -0400)] 
Merge tag 'doc-2023-10-rc4-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-2023-10-rc4-2

* Man-page for gpt command
* Fix long text help of gpt command
* Add events to HTML documentation
* Update Toradex documentation

2 years agoMerge tag 'doc-next' of https://source.denx.de/u-boot/custodians/u-boot-efi into...
Tom Rini [Sat, 2 Sep 2023 13:08:34 +0000 (09:08 -0400)] 
Merge tag 'doc-next' of https://source.denx.de/u-boot/custodians/u-boot-efi into next

Pull request doc-next

* Update TI am64x documentation

2 years agodoc: Add gpt command documentation
Joshua Watt [Thu, 31 Aug 2023 16:51:35 +0000 (10:51 -0600)] 
doc: Add gpt command documentation

Adds initial documentation for the gpt command

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2 years agocmd: gpt: Remove confusing help text
Joshua Watt [Thu, 31 Aug 2023 16:51:34 +0000 (10:51 -0600)] 
cmd: gpt: Remove confusing help text

This help text appears to be a fragment of the text shown when
CONFIG_CMD_GPT_RENAME is enabled, but is confusing so remove it.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agodoc: board: ti: am64x: Fix build step numbering
Nishanth Menon [Tue, 22 Aug 2023 16:41:03 +0000 (11:41 -0500)] 
doc: board: ti: am64x: Fix build step numbering

Fix up build step numbering.

Fixes: 4bf49bade124 ("doc: board: ti: am64: Add boot flow diagram")
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agodoc: board: ti: am64x: provide image alt text
Nishanth Menon [Tue, 22 Aug 2023 16:40:58 +0000 (11:40 -0500)] 
doc: board: ti: am64x: provide image alt text

Provide alternative text for image.

Fixes: 4bf49bade124 ("doc: board: ti: am64: Add boot flow diagram")
Reported-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agodoc: board: toradex: verdin-am62: document update u-boot wrapper
Marcel Ziswiler [Mon, 28 Aug 2023 22:01:54 +0000 (00:01 +0200)] 
doc: board: toradex: verdin-am62: document update u-boot wrapper

Now with the update U-Boot wrappers having been sorted out, document
their usage.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agodoc: board: toradex: minor documentation update
Marcel Ziswiler [Mon, 28 Aug 2023 22:01:53 +0000 (00:01 +0200)] 
doc: board: toradex: minor documentation update

- Update SPDX-License-Identifier from obsolete GPL-2.0+ to
  GPL-2.0-or-later.
- Add links to product websites of SoM and carrier board where missing.
- Add information about update U-Boot wrapper where missing.
- Add sectionauthor where missing.
- Update information about imx-seco from version 3.7.4 to 3.8.1.
- Various minor grammatic and spelling fixes.
- Improve whitespace by adding or removing new lines.
- Change from code-block for output to just Output::.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agovideo: fix typo in video_sync_all documentation
Heinrich Schuchardt [Mon, 28 Aug 2023 20:40:47 +0000 (22:40 +0200)] 
video: fix typo in video_sync_all documentation

%s/there/their/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: add events.h to documentation
Heinrich Schuchardt [Mon, 28 Aug 2023 19:13:33 +0000 (21:13 +0200)] 
doc: add events.h to documentation

Add the events.h include to the API documentation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodm: event: document all events
Heinrich Schuchardt [Mon, 28 Aug 2023 19:13:32 +0000 (21:13 +0200)] 
dm: event: document all events

Provide Sphinx documentation for all events.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoMerge branch '2023-08-31-replace-more-init-hooks-with-events' into next
Tom Rini [Thu, 31 Aug 2023 19:10:42 +0000 (15:10 -0400)] 
Merge branch '2023-08-31-replace-more-init-hooks-with-events' into next

To quote the author:
This series replaces some more of the init hooks in board_f.c and
board_r.c with events. Notably it converts last_state_init() over.

It also provides a 'simple' event spy, which takes no arguments. It
turns out that this is quite a common case, so it is worth optimising
for this, to reduce code size, before events become too commonly used.

Finally, it introduces a way of emitting an event in an initcall,
instead of calling a function. This is likely to be used at least as
often as the functions, as we convert more of these initcalls.

As part of this, the initcall code is brought back into a C file. Somehow
the compiler has changed or something else, so that this does not confer
any benefits now.

For boards with EVENT enabled, this unfortunately results in small
growth, e.g. for firefly:

   aarch64: (for 1/1 boards) all +114.0 data +16.0 rodata +22.0 text +76.0
       arm: (for 1/1 boards) all +82.0 rodata +18.0 text +64.0

For boards without EVENT enabled the growth is smaller, e.g. nokia_rx51:

       arm: (for 1/1 boards) all +32.0 data +8.0 rodata -8.0 text +32.0

I cannot find a good way to avoid the latter, other than macro magic
with an embedded comma (to completely remove an event entry), which
seems nasty.

2 years agoevent: Use an event to replace last_stage_init()
Simon Glass [Tue, 22 Aug 2023 03:17:01 +0000 (21:17 -0600)] 
event: Use an event to replace last_stage_init()

Add a new event which handles this function. Convert existing use of
the function to use the new event instead.

Make sure that EVENT is enabled by affected boards, by selecting it from
the LAST_STAGE_INIT option. For x86, enable it by default since all boards
need it.

For controlcenterdc, inline the get_tpm() function and make sure the event
is not built in SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agofreescale: Drop call to init_func_vid() in the init sequence
Simon Glass [Tue, 22 Aug 2023 03:17:00 +0000 (21:17 -0600)] 
freescale: Drop call to init_func_vid() in the init sequence

Use the misc_init_f event instead, which is designed for this purpose.

All boards with CONFIG_VID already enable CONFIG_EVENT.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agox86: Convert arch_fsp_init() to use events
Simon Glass [Tue, 22 Aug 2023 03:16:59 +0000 (21:16 -0600)] 
x86: Convert arch_fsp_init() to use events

Convert this to use events instead of calling a function directly in the
init sequence.

Rename it to arch_fsp_init_f() to distinguish it from the one that happens
after relocation.

For FSPv2 nothing needs to be done here, so drop the empty function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoevent: Update documentation for simple spy
Simon Glass [Tue, 22 Aug 2023 03:16:58 +0000 (21:16 -0600)] 
event: Update documentation for simple spy

Now that we have two types of spy, mention this in the documentation. Put
the simple spy first, since it seems to be the common case.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoevent: Rename EVENT_SPY to EVENT_SPY_FULL
Simon Glass [Tue, 22 Aug 2023 03:16:57 +0000 (21:16 -0600)] 
event: Rename EVENT_SPY to EVENT_SPY_FULL

The new name makes it clearer that this is for a full spy, with access to
the context and the event data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoevent: Convert existing spy records to simple
Simon Glass [Tue, 22 Aug 2023 03:16:56 +0000 (21:16 -0600)] 
event: Convert existing spy records to simple

Very few of the existing event-spy records use the arguments they are
passed. Update them to use a simple spy instead, to simplify the code.

Where an adaptor function is currently used, remove it where possible.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoinitcall: Support manual relocation
Simon Glass [Tue, 22 Aug 2023 03:16:55 +0000 (21:16 -0600)] 
initcall: Support manual relocation

Move the manual-relocation code to the initcall file. Make sure to avoid
manually relocating event types. Only true function pointers should be
relocated.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoinitcall: Support emitting events
Simon Glass [Tue, 22 Aug 2023 03:16:54 +0000 (21:16 -0600)] 
initcall: Support emitting events

At present the initcall list consists of a list of function pointers. Over
time the initcall lists will likely change to mostly emitting events,
since most of the calls are board- or arch-specific.

As a first step, allow an initcall to be an event type instead of a
function pointer. Add the required macro and update initcall_run_list() to
emit an event in that case, or ignore it if events are not enabled.

The bottom 8 bits of the function pointer are used to hold the event type,
with the rest being all ones. This should avoid any collision, since
initcalls should not be above 0xffffff00 in memory.

Convert misc_init_f over to use this mechanism.

Add comments to the initcall header file while we are here. Also fix up
the trace test to handle the change.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoevent: Export event_type_name()
Simon Glass [Tue, 22 Aug 2023 03:16:53 +0000 (21:16 -0600)] 
event: Export event_type_name()

Export this function so it can be used with initcall debugging.

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