]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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.

21 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>
21 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>
21 months agoCI: gitlab: Collect pytest artifacts
Marek Vasut [Fri, 3 Mar 2023 01:22:25 +0000 (02:22 +0100)]
CI: gitlab: Collect pytest artifacts

Copy build artifacts for all test.py tests, so they show up in
artifacts storage for later inspection. The test.py tests output
in CI is basically useless, but it is far more useful in the html
output for analysis and debugging.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoAzure CI: Be explicit about pytest cache directory
Tom Rini [Tue, 28 Feb 2023 20:28:49 +0000 (15:28 -0500)]
Azure CI: Be explicit about pytest cache directory

The default pytest cache directory is in a read-only directory in Azure,
which results in a warning on the build page. Use the pytest command
line option to set the cache dir to somewhere writable.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoAzure CI: Save pytest output automatically
Tom Rini [Tue, 28 Feb 2023 20:28:48 +0000 (15:28 -0500)]
Azure CI: Save pytest output automatically

Enable use of the python-azurepipelines package which provides automatic
formatting and uploading of the pytest output.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoDockerfile: Update to latest "Jammy" tag
Tom Rini [Tue, 21 Mar 2023 19:31:19 +0000 (15:31 -0400)]
Dockerfile: Update to latest "Jammy" tag

Update to using the latest "Jammy" tag as our base.

Signed-off-by: Tom Rini <trini@konsulko.com>
21 months agoDockerfile: Add m68k-softmmu to qemu
Tom Rini [Tue, 21 Mar 2023 19:28:00 +0000 (15:28 -0400)]
Dockerfile: Add m68k-softmmu to qemu

Given efforts to add an m68k target to CI, build qemu for it.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoMerge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-sh into next
Tom Rini [Mon, 20 Mar 2023 21:51:10 +0000 (17:51 -0400)]
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-sh into next

21 months agoMerge branch '2023-03-17-improve-read-command-add-write-command' into next
Tom Rini [Mon, 20 Mar 2023 20:31:52 +0000 (16:31 -0400)]
Merge branch '2023-03-17-improve-read-command-add-write-command' into next

To quote the author:
The first patch simplies do_read somewhat by making use of an existing
helper instead of parsing the dev_part string manually. As a bonus
(and my actual motivation), it now understands dev#partname syntax -
hard-coded partition numbers are so last decade.

I also need the symmetrical operation, being able to write to a named
raw partition, and fortunately it doesn't require that many lines of
code to implement that.

There's a very minor change in the error reporting due to using
cmdtp->name to generate the new messages, but I don't think "Error
reading blocks" offers much that "read error" doesn't.

New in v2: the last three patches add documentation, ensure CMD_WRITE
is set for sandbox and adds some basic test cases for the various ways
of accessing the partitions (by number, name, or as raw offset within
the whole disk).

v3: Add Simon's R-b to patches 2, 4, 5, fixup whitespace in patch 5.

I don't want to duplicate the documentation, but I can see the value
in 'write' having its own entry in the TOC, so I added a stub
write.rst that just refers to the read.rst, which then explicitly
documents both.

21 months agoserial: sh: Make indent consistent
Marek Vasut [Tue, 28 Feb 2023 21:19:30 +0000 (22:19 +0100)]
serial: sh: Make indent consistent

Make the indent of these macro elements consistent with the
rest of this table. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoserial: sh: Add DEBUG_UART support
Marek Vasut [Tue, 28 Feb 2023 21:17:22 +0000 (22:17 +0100)]
serial: sh: Add DEBUG_UART support

Add support for debug output very early during boot using the DEBUG_UART
mechanism. This uses a static fixed UART port configuration selected via
Kconfig options and dedicated print functions from debug_uart.h. This is
useful e.g. when debugging problems so early during boot, that not even
the DM is initialized at that point, and thus DM_SERIAL is not available
either.

This functionality is disabled by default. To activate it, define the
following Kconfig options and select SCIF type using CFG_SCI/CFG_SCIF_A/
CFG_HSCIF/<nothing for regular SCIF>:

CONFIG_DEBUG_UART=y
CONFIG_DEBUG_UART_SCIF=y
CONFIG_DEBUG_UART_BASE=0xe6540000
CONFIG_DEBUG_UART_CLOCK=24000000

The later two options define the SCIF physical base address and SCIF
input clock in Hz. Optionally, to validate DEBUG_UART works, enable
the following as well to get early serial output message by default:

CONFIG_DEBUG_UART_ANNOUNCE=y

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoserial: sh: Rename CONFIG_SCI and CONFIG_SCIF_USE_EXT_CLK to CFG_ variants
Marek Vasut [Tue, 28 Feb 2023 21:17:21 +0000 (22:17 +0100)]
serial: sh: Rename CONFIG_SCI and CONFIG_SCIF_USE_EXT_CLK to CFG_ variants

Both CONFIG_SCI and CONFIG_SCIF_USE_EXT_CLK options do not have a
matching Kconfig entry because they are internal to the SCIF driver.
Change their prefix to CFG_, i.e. CFG_SCIF_USE_EXT_CLK and CFG_SCI,
to reflect that and avoid interferring with Kconfig symbols. Since
neither of those options are defined elsewhere, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agopinctrl: renesas: Replace ifdeffery with IS_ENABLED()
Marek Vasut [Tue, 28 Feb 2023 06:25:52 +0000 (07:25 +0100)]
pinctrl: renesas: Replace ifdeffery with IS_ENABLED()

Switch ifdef in sh_gpio_get_value() to IS_ENABLED() macro.
The CONFIG_RCAR_GEN3 will never have SPL counterpart, so
the IS_ENABLED() macro is the right one here. No functional
change, except for improved build test coverage.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agonet: ravb: Support fixed PHY in R-Car
Mikhail Lappo [Mon, 27 Feb 2023 23:04:11 +0000 (00:04 +0100)]
net: ravb: Support fixed PHY in R-Car

Calling old U-Boot API doesn't allow to use fixed PHY.
Searching by mask is the part of new function, after
scanning FDT for a fixed PHY definition

Fixes: e821a7bdb13 ("net: ravb: Detect PHY correctly")
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Mikhail Lappo <mikhail.lappo@esrlabs.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
[Hai Pham: Drop phy_connect_dev since it's called in phy_connect]
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Use mask -1 instead of 0 to reinstate the search behavior
        over all PHY addresses. Add Fixes tag, sort the tag list.]

21 months agoi2c: rcar_i2c: Sort Kconfig depends list ascending
Marek Vasut [Mon, 27 Feb 2023 23:03:46 +0000 (00:03 +0100)]
i2c: rcar_i2c: Sort Kconfig depends list ascending

Sort the list of "depends" symbols in ascending order.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
21 months agoi2c: rcar_iic: Sort Kconfig depends list ascending
Marek Vasut [Mon, 27 Feb 2023 23:03:45 +0000 (00:03 +0100)]
i2c: rcar_iic: Sort Kconfig depends list ascending

Sort the list of "depends" symbols in ascending order.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
21 months agoclk: renesas: rcar-gen3: Replace SSCG caching with MDSEL/PE caching
Marek Vasut [Tue, 28 Feb 2023 06:25:11 +0000 (07:25 +0100)]
clk: renesas: rcar-gen3: Replace SSCG caching with MDSEL/PE caching

Do not cache the single CPG MODE register bit 12, instead cache the
entire register value, and only pick the matching bit from the cached
value when core clock of type MDSEL or PE are used. Both MDSEL and PE
clock type currently define .offset field as 12 on Gen3, which means
this code will use bit 12 on Gen3 again, however there are additional
clock on Gen4 which use different bits, and having this flexibility
in place now will be useful when adding Gen4.

No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoARM: rmobile: Split R-Car Gen3 into separate Kconfig from common 64bit options
Marek Vasut [Tue, 28 Feb 2023 06:28:57 +0000 (07:28 +0100)]
ARM: rmobile: Split R-Car Gen3 into separate Kconfig from common 64bit options

There are multiple shared Kconfig options between R-Car Gen3 and Gen4.
Keep the common options in Kconfig.64 and move the R-Car Gen3 specific
options into separate Kconfig.rcar3 . The Kconfig.rcar3 contains SoC
and board list, which is limited to R-Car Gen3.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoARM: rmobile: Introduce CONFIG_RCAR_64 symbol
Marek Vasut [Tue, 28 Feb 2023 06:28:56 +0000 (07:28 +0100)]
ARM: rmobile: Introduce CONFIG_RCAR_64 symbol

Introduce common Kconfig symbol for 64bit R-Car platforms and move
common configuration options into it. This is preparatory patch to
prevent duplication of Kconfig lists later on, when Gen4 is added.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoARM: rmobile: Factor out SYS_SOC Kconfig option
Marek Vasut [Tue, 28 Feb 2023 06:28:55 +0000 (07:28 +0100)]
ARM: rmobile: Factor out SYS_SOC Kconfig option

Pull the SYS_SOC Kconfig option to avoid duplication of this option
in Kconfig.{32,64,rza1} . The default value is the same, so just set
it in one location.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoARM: rmobile: Sort R-Car Gen3 Kconfig lists
Marek Vasut [Tue, 28 Feb 2023 06:28:54 +0000 (07:28 +0100)]
ARM: rmobile: Sort R-Car Gen3 Kconfig lists

Sort the 'imply' and 'select' lists in R-Car Gen3 Kconfig options.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoARM: rmobile: Convert ifdef in rmobile_get_prr() to IS_ENABLED()
Marek Vasut [Tue, 28 Feb 2023 06:27:51 +0000 (07:27 +0100)]
ARM: rmobile: Convert ifdef in rmobile_get_prr() to IS_ENABLED()

Switch ifdef in rmobile_get_prr() to IS_ENABLED() macro.
The CONFIG_RCAR_GEN3 will never have SPL counterpart, so
the IS_ENABLED() macro is the right one here. No functional
change, except for improved build test coverage.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoARM: renesas: falcon: Enable RWDT reset for V3U Falcon
Hai Pham [Mon, 27 Feb 2023 23:02:19 +0000 (00:02 +0100)]
ARM: renesas: falcon: Enable RWDT reset for V3U Falcon

Enable RWDT reset on Reset Controller so that it can be used as
reset trigger source for V3U Falcon.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Use one current_el() in board_init
21 months agoARM: renesas: falcon: Initialize ARM generic timer and GICv3 if EL3
Hai Pham [Mon, 27 Feb 2023 23:02:18 +0000 (00:02 +0100)]
ARM: renesas: falcon: Initialize ARM generic timer and GICv3 if EL3

U-Boot executes at EL3 is required to initalize those settings.
In other cases, they will be done by prior-stage firmware instead.

This fixes crash when U-Boot is at non-secure exception level.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoARM: renesas: Enable DTO support by default on R-Car Gen3
Marek Vasut [Mon, 27 Feb 2023 23:00:19 +0000 (00:00 +0100)]
ARM: renesas: Enable DTO support by default on R-Car Gen3

All R-Car Gen3 defconfigs present in U-Boot do enable DTO support,
enable it for all of R-Car Gen3 by default in Kconfig instead, so
that no new boards would miss this functionality.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoARM: renesas: Demote overlap memory nodes message to debug on Gen3
Hai Pham [Mon, 27 Feb 2023 23:00:01 +0000 (00:00 +0100)]
ARM: renesas: Demote overlap memory nodes message to debug on Gen3

The R-Car DTs might contains multiple /memory@* nodes from various
sources, i.e. prior firmware, u-boot itself or the OS

The duplicates are likely to happen so the messages are not meaningful
in the default setting since we have already handled that.

Reduce the message to debug level.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoARM: renesas: Remove defines for USB on Eagle/Condor
Hai Pham [Mon, 27 Feb 2023 22:59:32 +0000 (23:59 +0100)]
ARM: renesas: Remove defines for USB on Eagle/Condor

The Eagle board based on R-Car V3M, which does not support any USB
interfaces. The same applies for the Condor board based on R-Car V3H.

Remove the defines.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agotest: add tests of 'read' and 'write' shell commands
Rasmus Villemoes [Thu, 2 Mar 2023 08:12:25 +0000 (09:12 +0100)]
test: add tests of 'read' and 'write' shell commands

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
21 months agosandbox: enable CMD_WRITE
Rasmus Villemoes [Thu, 2 Mar 2023 08:12:24 +0000 (09:12 +0100)]
sandbox: enable CMD_WRITE

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
21 months agodoc: document read/write commands
Rasmus Villemoes [Thu, 2 Mar 2023 08:12:23 +0000 (09:12 +0100)]
doc: document read/write commands

The read and write commands are, deliberately, implemented in the same
file, so that they stay feature-compatible (e.g. if someone implements
support for "read the full partition, however large that is", that
same syntax should also work for write). In order to ensure the
documentation for both are similarly kept in sync, and to avoid
duplication, document them both in read.rst, and add a stub write.rst
referring to read.rst.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agocmd: introduce 'write' command
Rasmus Villemoes [Thu, 2 Mar 2023 08:12:22 +0000 (09:12 +0100)]
cmd: introduce 'write' command

It's almost no extra code to hook up a buddy to the 'read' command. In
fact, since the command is passed its own 'struct cmd_tbl', we can use
the exact same callback, and let it figure out for itself whether it
was invoked as "read" or "write".

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
21 months agocmd: read: use part_get_info_by_dev_and_name_or_num() instead of open-coded dev_part...
Rasmus Villemoes [Thu, 2 Mar 2023 08:12:21 +0000 (09:12 +0100)]
cmd: read: use part_get_info_by_dev_and_name_or_num() instead of open-coded dev_part parsing

Use the helper part_get_info_by_dev_and_name_or_num() for parsing a
dev[:part] string and obtaining the partition info in one go, instead
of open-coding all that.

As a bonus, this will automatically allow using the dev#partname
syntax as well, for accessing raw partitions by name.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
21 months agoMerge tag 'xilinx-for-v2023.07-rc1' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Thu, 16 Mar 2023 16:18:30 +0000 (12:18 -0400)]
Merge tag 'xilinx-for-v2023.07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-microblaze into next

Xilinx changes for v2023.07-rc1

cmd:
- Print results in hex instead of dec in smc command

firmware:
- Cover missing ZYNQMP_FIRMWARE dependencies

fpga:
- fix loads for unencrypted use case

relocation
- Add support for BE systems

spi:
- Fix xilinx_spi init reset sequence

arasan nand:
- Remove hardcoded bbt option
- Set ofnode value

xilinx:
- Enable SMC command
- Fix some sparse issues

zynqmp:
- Remove cdns,zynq-gem compatible string
- Add optee node
- Some DT cleanups

zynq:
- Some DT cleanups

microblaze
- Remove MANUAL_RELOC option

21 months agoMerge tag 'fsl-qoriq-next-2023-3-14' of https://source.denx.de/u-boot/custodians...
Tom Rini [Thu, 16 Mar 2023 16:17:48 +0000 (12:17 -0400)]
Merge tag 'fsl-qoriq-next-2023-3-14' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq into next

Enable DM_SERIAL for freescale ls2080a
Drop non DM_ETH code for freescale:
  lx2160a/ls2080rdb/ls2080aqds/ls1088a

21 months agoRevert 9f62a472dfb2 ("video: Remove duplicate cursor-positioning function")
Tom Rini [Wed, 15 Mar 2023 15:58:58 +0000 (11:58 -0400)]
Revert 9f62a472dfb2 ("video: Remove duplicate cursor-positioning function")

This reverts commit 9f62a472dfb26ec14408a27938ddd2a25700009d.

The changes here aren't quite right, and on platforms such as Raspberry
Pi where we can have both serial and video output, the change above
causes output to change. This can be seen as the hush tests we have now
fail.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoMerge tag 'dm-next-12mar23a' of git://git.denx.de/u-boot-dm into next
Tom Rini [Thu, 16 Mar 2023 16:16:14 +0000 (12:16 -0400)]
Merge tag 'dm-next-12mar23a' of git://git.denx.de/u-boot-dm into next

More tests and fixes for fdt command
binman signing feature
fix buildman -A bug introduced recently

Signed-off-by: Tom Rini <trini@konsulko.com>
21 months agobuildman: Fix CROSS_COMPILE output for sandbox
Simon Glass [Fri, 10 Mar 2023 20:48:51 +0000 (12:48 -0800)]
buildman: Fix CROSS_COMPILE output for sandbox

The previous attempt at fixing this broke the normal usage of the -A
flag.

At present, 'buildman -A sandbox' adds the path containing the
toolchain. We can assume that this is in the path and we don't want to
set CROSS_COMPILE=/bin/

Change this to align with what MakeEnvironment() does, but only for
sandbox boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoRevert "buildman: Correct CROSS_COMPILE output for sandbox"
Simon Glass [Fri, 10 Mar 2023 20:48:50 +0000 (12:48 -0800)]
Revert "buildman: Correct CROSS_COMPILE output for sandbox"

This reverts commit bd0a548ad4a155fec29473d4cc8e135832926973.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agotools: add fdt_add_pubkey
Roman Kopytin [Wed, 8 Mar 2023 01:13:41 +0000 (01:13 +0000)]
tools: add fdt_add_pubkey

Having to use the -K option to mkimage to populate U-Boot's .dtb with the
public key while signing the kernel FIT image is often a little
awkward. In particular, when using a meta-build system such as
bitbake/Yocto, having the tasks of the kernel and U-Boot recipes
intertwined, modifying deployed artifacts and rebuilding U-Boot with
an updated .dtb is quite cumbersome. Also, in some scenarios one may
wish to build U-Boot complete with the public key(s) embedded in the
.dtb without the corresponding private keys being present on the same
build host.

So this adds a simple tool that allows one to disentangle the kernel
and U-Boot builds, by simply copy-pasting just enough of the mkimage
code to allow one to add a public key to a .dtb. When using mkimage,
some of the information is taken from the .its used to build the
kernel (algorithm and key name), so that of course needs to be
supplied on the command line.

Signed-off-by: Roman Kopytin <Roman.Kopytin@kaspersky.com>
Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
21 months agobinman: add tests for sign option
Ivan Mikhaylov [Wed, 8 Mar 2023 01:13:40 +0000 (01:13 +0000)]
binman: add tests for sign option

Add the test which provides sequence of actions:
  1. create the image from binman dts
  2. create public and private keys
  3. add public key into dtb with fdt_add_pubkey
  4. 1. sign FIT container with new sign option with extracting from
        image
     2. sign exact FIT container with replacing of it in image
  5. check with fit_check_sign

Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
Renumber test file from 277 to 280;
   Move UpdateSignatures() to Entry base class;
   Don't allow missing mkimage as it doesn't make sense;
   Propagate --toolpath for CI;
   Call mark_build_done() to avoid regenerating FIT:
Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agobinman: add sign option for binman
Ivan Mikhaylov [Wed, 8 Mar 2023 01:13:39 +0000 (01:13 +0000)]
binman: add sign option for binman

Introduce proof of concept for binman's new option which provides sign
and replace FIT containers in binary images.

Usage as example:

from:
mkimage -G privateky -r -o sha256,rsa4096 -F fit
binman replace -i flash.bin -f fit.fit fit

to:
binman sign -i flash.bin -k privatekey -a sha256,rsa4096 -f fit.fit fit

and to this one if it's need to be extracted, signed with key and put it
back in image:
binman sign -i flash.bin -k privatekey -a sha256,rsa4096 fit

Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
21 months agobinman: add documentation for binman sign option
Ivan Mikhaylov [Wed, 8 Mar 2023 01:13:38 +0000 (01:13 +0000)]
binman: add documentation for binman sign option

Add the documentation about binman sign option and providing an
example.

Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
Add a section about 'binman sign' at the bottom:
Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agotest: cmd: fdt: Test fdt apply
Marek Vasut [Thu, 2 Mar 2023 03:08:44 +0000 (04:08 +0100)]
test: cmd: fdt: Test fdt apply

Add 'fdt chosen' test which works as follows:
- Create basic DT, map it to sysmem
- Apply DTO which adds single property via fragment (without address spec)
- Apply DTO which adds more properties (string, u32, empty) and a subnode,
  with phandle via frament@0 and thus tests /__symbols__ node
- Apply DTO which modifies property of the previous DTO via phandle and thus
  tests the /__fixups__ node
- Print modified DT, verify it contains updates from DTOs

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agotest: cmd: fdt: Test fdt chosen
Marek Vasut [Thu, 2 Mar 2023 03:08:43 +0000 (04:08 +0100)]
test: cmd: fdt: Test fdt chosen

Add 'fdt chosen' test which works as follows:
- Create basic DT, map it to sysmem
- Print /chosen node, verify it is nonexistent
- Create chosen node
- Print /chosen node, verify it contains only version
- Create /chosen node with initrd entries
- Print /chosen node, verify it contains version and initrd entries

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agotest: cmd: fdt: Test fdt rsvmem
Marek Vasut [Thu, 2 Mar 2023 03:08:42 +0000 (04:08 +0100)]
test: cmd: fdt: Test fdt rsvmem

Add 'fdt rsvmem' test which works as follows:
- Create custom FDT with single reserved memory (rsvmem) entry, map it to sysmem
- Add new rsvmem entry
- Delete existing older rsvmem entry
- Add new rsvmem entry again
- Always print the rsvmem list and validate it

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agotest: cmd: fdt: Test fdt memory
Marek Vasut [Thu, 2 Mar 2023 03:08:41 +0000 (04:08 +0100)]
test: cmd: fdt: Test fdt memory

Add 'fdt memory' test which works as follows:
- Create custom FDT with /memory node, with select #*cells, map it to sysmem
- Perform memory fixup
- Read back the /memory node and validate its content

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agotest: cmd: fdt: Test fdt header
Marek Vasut [Thu, 2 Mar 2023 03:08:39 +0000 (04:08 +0100)]
test: cmd: fdt: Test fdt header

Add 'fdt header' test which works as follows:
- Create basic FDT, map it to sysmem
- Print the FDT header
- Get all members of the FDT header into variable and
  verify the variables contain correct data

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Merged in test: cmd: fdt: Drop unused fdt_test_header_get() fdt parameter:
Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agotest: cmd: fdt: Test fdt print and list
Marek Vasut [Thu, 2 Mar 2023 03:08:32 +0000 (04:08 +0100)]
test: cmd: fdt: Test fdt print and list

Add 'fdt print' and 'fdt list' test which works as follows:
- Create fuller FDT, map it to sysmem
- Print the entire FDT, parts of the FDT and select properties
- Compare output from the print or list

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agocmd: fdt: Drop the 0x prefix
Marek Vasut [Thu, 2 Mar 2023 03:04:40 +0000 (04:04 +0100)]
cmd: fdt: Drop the 0x prefix

The 'fdt get addr' is always assumed to be hex value, drop the prefix.
Since this might break existing users who depend on the existing
behavior with 0x prefix, this is a separate patch. Revert if this
breaks anything.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoconsole: Use only 0x00 as line separator for console recording
Marek Vasut [Mon, 27 Feb 2023 19:55:39 +0000 (20:55 +0100)]
console: Use only 0x00 as line separator for console recording

In case character 0x20 (space) is used as line separator,
character 0x9 (tab) is treated end of line. Commands which
output a lot of tabs, i.e. various tree printing commands
like 'fdt print' then end up generating a lot of newlines
in the recorded output, and the recorded output is corrupted.

Use character 0x00 (NUL) as separator instead to treat the
tabs as valid part of recorded line.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agotest: cmd: fdt: Drop new unneeded curly brackets
Marek Vasut [Fri, 10 Mar 2023 03:33:14 +0000 (04:33 +0100)]
test: cmd: fdt: Drop new unneeded curly brackets

Drop no longer needed { } around ut_assert*() functions in FDT test.
No functional change.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agotest: Wrap assert macros in ({ ... }) and fix missing semicolons
Marek Vasut [Fri, 10 Mar 2023 03:33:13 +0000 (04:33 +0100)]
test: Wrap assert macros in ({ ... }) and fix missing semicolons

Wrap the assert macros in ({ ... }) so they can be safely used both as
right side argument as well as in conditionals without curly brackets
around them. In the process, find a bunch of missing semicolons, fix
them.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
21 months agoMerge tag 'v2023.04-rc4' into next
Tom Rini [Tue, 14 Mar 2023 14:58:41 +0000 (10:58 -0400)]
Merge tag 'v2023.04-rc4' into next

Prepare v2023.04-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
21 months agoMerge branch '2023-03-14-revert-two-TI-patches' into next
Tom Rini [Tue, 14 Mar 2023 14:53:50 +0000 (10:53 -0400)]
Merge branch '2023-03-14-revert-two-TI-patches' into next

Per request of the author, these two patches weren't quite ready to be
applied yet, so revert them.

21 months agoRevert "configs: j721s2: merge HS and non-HS defconfigs"
Tom Rini [Tue, 14 Mar 2023 14:53:44 +0000 (10:53 -0400)]
Revert "configs: j721s2: merge HS and non-HS defconfigs"

This reverts commit c714045cc3c0c36bc836c909e74db3273a7dd390.

Signed-off-by: Tom Rini <trini@konsulko.com>
21 months agoRevert "configs: j7200: Merge HS and non-HS defconfigs"
Tom Rini [Tue, 14 Mar 2023 14:53:38 +0000 (10:53 -0400)]
Revert "configs: j7200: Merge HS and non-HS defconfigs"

This reverts commit e352e1061f4c9a8adb70b6ff819890c42e5b3ef7.

Signed-off-by: Tom Rini <trini@konsulko.com>
21 months agoconfigs: ls208x: enable DM_SERIAL
Ioana Ciornei [Tue, 28 Feb 2023 16:32:12 +0000 (18:32 +0200)]
configs: ls208x: enable DM_SERIAL

Now that the DT nodes for the serial devices are in place for these
boards, enable DM_SERIAL in the associated configs.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
21 months agoarch: arm: dst: fsl-ls2080a.dts: tag serial nodes with bootph-all
Ioana Ciornei [Tue, 28 Feb 2023 16:32:11 +0000 (18:32 +0200)]
arch: arm: dst: fsl-ls2080a.dts: tag serial nodes with bootph-all

Tag the serial nodes with bootph-all in order to have these nodes and
the drivers available before relocation.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
21 months agoarch: arm: dst: fsl-ls2080a.dts: sync serial nodes with Linux
Ioana Ciornei [Tue, 28 Feb 2023 16:32:10 +0000 (18:32 +0200)]
arch: arm: dst: fsl-ls2080a.dts: sync serial nodes with Linux

Sync the serial nodes of the LS208XA RDB/QDS boards with their
representation in Linux. We also imported the clockgen and sysclk nodes
which are dependencies.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
21 months agoarch: arm: dst: fsl-ls2080a.dtsi: move the serial nodes under soc
Ioana Ciornei [Tue, 28 Feb 2023 16:32:09 +0000 (18:32 +0200)]
arch: arm: dst: fsl-ls2080a.dtsi: move the serial nodes under soc

Move the serial nodes under the soc node. No changes are made to the
nodes, just their location is changed.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
21 months agoarch: arm: dst: fsl-ls2080a.dtsi: add an 'soc' node
Ioana Ciornei [Tue, 28 Feb 2023 16:32:08 +0000 (18:32 +0200)]
arch: arm: dst: fsl-ls2080a.dtsi: add an 'soc' node

The u-boot dts for these boards do not have an soc node, unlike its
Linux counterpart. This patch just adds the soc node as seen in Linux,
the next patches will move some nodes under it.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
21 months agoarm: dts: ls1088a-rdb: replace 'xgmii' with '10gbase-r'
Ioana Ciornei [Wed, 22 Feb 2023 14:17:40 +0000 (16:17 +0200)]
arm: dts: ls1088a-rdb: replace 'xgmii' with '10gbase-r'

When the first device tree description was added for the ethernet nodes,
the 2 10G ports on the LS1088ARDB were wrongly described as 'xgmii'.

Fix this by replacing the two last occurrences of 'xgmii' in the device
trees of the Layerscape DPAA2 devices.

Fixes: 68c7c008e84a ("arm: dts: ls1088ardb: add DPMAC and PHY nodes")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
21 months agoboard: freescale: ls1088a: remove code under !CONFIG_DM_ETH
Ioana Ciornei [Wed, 15 Feb 2023 15:31:19 +0000 (17:31 +0200)]
board: freescale: ls1088a: remove code under !CONFIG_DM_ETH

Now that DM_ETH is enabled by default, there is no point in keeping the
non-DM_ETH code which initialized the ethernet interfaces.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
21 months agoboard: freescale: ls2080aqds: remove code under !CONFIG_DM_ETH
Ioana Ciornei [Wed, 15 Feb 2023 15:31:18 +0000 (17:31 +0200)]
board: freescale: ls2080aqds: remove code under !CONFIG_DM_ETH

Now that DM_ETH is enabled by default, there is no point in keeping the
non-DM_ETH code which initialized the ethernet interfaces.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
21 months agoboard: freescale: ls2080rdb: remove code under !CONFIG_DM_ETH
Ioana Ciornei [Wed, 15 Feb 2023 15:31:17 +0000 (17:31 +0200)]
board: freescale: ls2080rdb: remove code under !CONFIG_DM_ETH

Now that DM_ETH is enabled by default, there is no point in keeping the
non-DM_ETH code which initialized the ethernet interfaces.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
21 months agoboard: freescale: lx2160a: remove code under !CONFIG_DM_ETH
Ioana Ciornei [Wed, 15 Feb 2023 15:31:16 +0000 (17:31 +0200)]
board: freescale: lx2160a: remove code under !CONFIG_DM_ETH

Now that DM_ETH is enabled by default, there is no point in keeping the
non-DM_ETH code which initialized the ethernet interfaces.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
21 months agoboard: freescale: lx2160a: remove hardcoded ethernet initialization
Ioana Ciornei [Wed, 15 Feb 2023 15:31:15 +0000 (17:31 +0200)]
board: freescale: lx2160a: remove hardcoded ethernet initialization

The LX2160ARDB board has support for DM_ETH probed devices, which means
that we do not need to manually create an MDIO controller, register it,
create PHYs on it etc.

In order to cleanup the board file a bit, just remove this code entirely.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
21 months agoPrepare v2023.04-rc4
Tom Rini [Tue, 14 Mar 2023 00:52:48 +0000 (20:52 -0400)]
Prepare v2023.04-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
21 months agoMerge tag 'efi-next-20230313' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Mon, 13 Mar 2023 19:36:52 +0000 (15:36 -0400)]
Merge tag 'efi-next-20230313' of https://source.denx.de/u-boot/custodians/u-boot-efi into next

Pull request efi-next-20230313

UEFI:

* Improve graphics support in EFI app

Others:

* x86: Add a few more items to bdinfo
* video: Remove duplicate cursor-positioning function
* video: Clear the vidconsole rather than the video

21 months agoMerge tag 'efi-2023-04-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Mon, 13 Mar 2023 15:39:21 +0000 (11:39 -0400)]
Merge tag 'efi-2023-04-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2023-04-rc4

Documentation:

* man-page for panic command

UEFI:

* Correct parameter check for SetVariable()

Other:

 * Provide unit test for crc8

21 months agoefi_loader: describe term_get_char()
Heinrich Schuchardt [Fri, 3 Mar 2023 21:04:26 +0000 (22:04 +0100)]
efi_loader: describe term_get_char()

Add a function description.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
21 months agoefi_loader: update SetVariable attribute check
Masahisa Kojima [Tue, 21 Feb 2023 02:33:17 +0000 (11:33 +0900)]
efi_loader: update SetVariable attribute check

UEFI specification v2.10 says that
EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and
EFI_UNSUPPORTED should be returned in SetVariable variable service.
Current implementation returns EFI_INVALID_PARAMETER,
let's fix the return value.

Together with above change, this commit also updates the SetVariable
attribute check to be aligned with the EDK2 reference implementation.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
21 months agodoc: man-page for panic command
Heinrich Schuchardt [Fri, 3 Mar 2023 21:48:27 +0000 (22:48 +0100)]
doc: man-page for panic command

Provide a man-page for the panic command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agodoc: uefi: fix links
Vincent Stehlé [Mon, 20 Feb 2023 14:37:29 +0000 (15:37 +0100)]
doc: uefi: fix links

Fix a couple of links so that they are rendered correctly with sphinx.

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
21 months agotest: unit test for crc8
Heinrich Schuchardt [Wed, 22 Feb 2023 01:10:20 +0000 (02:10 +0100)]
test: unit test for crc8

Add a unit test for the crc8() function.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agovideo: Add a note about the broken implementation
Simon Glass [Fri, 10 Mar 2023 20:47:23 +0000 (12:47 -0800)]
video: Add a note about the broken implementation

The cls command is broken. Previous discussion about this was at [1] and
[2]. For now, add a note to the source code.

[1] https://patchwork.ozlabs.org/project/uboot/patch/
       20221022092058.106052-1-heinrich.schuchardt@canonical.com/
[2] https://patchwork.ozlabs.org/project/uboot/patch/
       20230106145243.411626-12-sjg@chromium.org/

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoefi: Add dhrystone, dcache and scroll lines to app
Simon Glass [Fri, 10 Mar 2023 20:47:22 +0000 (12:47 -0800)]
efi: Add dhrystone, dcache and scroll lines to app

Add these options to provide some performance measurement, see cache
status and slightly speed up the appallingly slow console.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agovideo: Clear the vidconsole rather than the video
Simon Glass [Fri, 10 Mar 2023 20:47:21 +0000 (12:47 -0800)]
video: Clear the vidconsole rather than the video

It is better to clear the console device rather than the video device,
since the console has the text display. We also need to reset the cursor
position with the console, but not with the video device.

Add a new function to handle this and update the 'cls' command to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agovideo: Remove duplicate cursor-positioning function
Simon Glass [Fri, 10 Mar 2023 20:47:20 +0000 (12:47 -0800)]
video: Remove duplicate cursor-positioning function

There are two functions for positioning the cursor on the console. Remove
one of them.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoefi: Adjust script to show pre-relocation output on terminal
Simon Glass [Fri, 10 Mar 2023 20:47:19 +0000 (12:47 -0800)]
efi: Adjust script to show pre-relocation output on terminal

When running with video enabled, the pre-relocation output of U-Boot is
currently lost. Add a -serial flag to show it on the terminal.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agobbinfo: Show the size of the copy framebuffer
Simon Glass [Fri, 10 Mar 2023 20:47:18 +0000 (12:47 -0800)]
bbinfo: Show the size of the copy framebuffer

If the copy framebuffer is enabled, show its size.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agovideo: Allow a copy framebuffer with pre-allocated fb
Simon Glass [Fri, 10 Mar 2023 20:47:17 +0000 (12:47 -0800)]
video: Allow a copy framebuffer with pre-allocated fb

At present it is not possible for the video driver to use a pre-allocated
frame buffer (such as is done with EFI) with the copy framebuffer. This
can be useful to speed up the display.

Adjust the implementation so that copy_size can be set to the required
size, with this being allocated if the normal framebuffer size is 0.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoefi: Support copy framebuffer
Simon Glass [Fri, 10 Mar 2023 20:47:16 +0000 (12:47 -0800)]
efi: Support copy framebuffer

Add support for this to EFI in case it becomes useful. At present it just
slows things down. You can enable CONFIG_VIDEO_COPY to turn it on.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoefi: Use a fixed value for the timer clock
Simon Glass [Fri, 10 Mar 2023 20:47:15 +0000 (12:47 -0800)]
efi: Use a fixed value for the timer clock

It is not yet clear how to read the timer via EFI. The current value seems
much too high on a Framework laptop I tried. Adjust it to a lower
hard-coded value for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agox86: Add a few more items to bdinfo
Simon Glass [Fri, 10 Mar 2023 20:47:14 +0000 (12:47 -0800)]
x86: Add a few more items to bdinfo

Add the timer and vendor/model information.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoefi: Support a 64-bit frame buffer address
Simon Glass [Fri, 10 Mar 2023 20:47:13 +0000 (12:47 -0800)]
efi: Support a 64-bit frame buffer address

The current vesa structure only provides a 32-bit value for the frame
buffer. Many modern machines use an address outside the range.

It is still useful to have this common struct, but add a separate
frame-buffer address as well.

Add a comment for vesa_setup_video_priv() while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoefi: video: Return mode info for app also
Simon Glass [Fri, 10 Mar 2023 20:47:12 +0000 (12:47 -0800)]
efi: video: Return mode info for app also

The mode info is currently not initialised for the app. Fix this by
returning it from the function.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoefi: video: Move payload code into a function
Simon Glass [Fri, 10 Mar 2023 20:47:11 +0000 (12:47 -0800)]
efi: video: Move payload code into a function

Put this into a function, as we have done for the app implementation.
Comment both functions. FOr now the app still does not access it
correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agomicroblaze: drop remnants of manual reloc
Ovidiu Panait [Sat, 11 Mar 2023 17:38:38 +0000 (19:38 +0200)]
microblaze: drop remnants of manual reloc

Runtime relocation has been made the default for microblaze, so do the
following cleanups:
- drop all manual reloc codepaths in start.S
- drop all STATIC_RELA ifdefs, as it is now enabled unconditionally in
Kconfig

Reviewed-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Link: https://lore.kernel.org/r/20230311173838.521804-5-ovpanait@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
21 months agomicroblaze: drop CONFIG_NEEDS_MANUAL_RELOC
Ovidiu Panait [Sat, 11 Mar 2023 17:38:37 +0000 (19:38 +0200)]
microblaze: drop CONFIG_NEEDS_MANUAL_RELOC

Microblaze and m68k are the only remaining architectures that still enable
CONFIG_NEEDS_MANUAL_RELOC by default.

Microblaze has had runtime relocation support using CONFIG_STATIC_RELA for
quite some time, since commit d58c007498 ("microblaze: Add support for run
time relocation"). Drop support for CONFIG_NEEDS_MANUAL_RELOC and make
runtime relocation the default, as the rest of the architectures do.

Reviewed-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Link: https://lore.kernel.org/r/20230311173838.521804-4-ovpanait@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
21 months agotools: relocate-rela: add support for handling 32-bit big endian files
Ovidiu Panait [Sat, 11 Mar 2023 17:38:36 +0000 (19:38 +0200)]
tools: relocate-rela: add support for handling 32-bit big endian files

Currently, a microblaze build with CONFIG_SYS_BIG_ENDIAN=y and
CONFIG_STATIC_RELA=y fails with:
tools/relocate-rela: Not supported machine type
ELF decoding failed
make[2]: *** [u-boot/Makefile:1306: u-boot-nodtb.bin] Error 1

To fix this, convert the 32-bit codepath to use the previously added
elf{16,32}_to_cpu() functions. The aarch64 codepath is left untouched.

This commit ensures that CI doesn't fail for the next patches which enable
runtime relocation by default for microblaze.

Reviewed-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Link: https://lore.kernel.org/r/20230311173838.521804-3-ovpanait@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>