]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
7 weeks agousb: Fix test dependency on ext4write command
Andrew Goodbody [Tue, 15 Oct 2024 14:17:37 +0000 (15:17 +0100)]
usb: Fix test dependency on ext4write command

The tests test_usb_ext4load_ext4write, test_usb_ext2load and
test_usb_load depend on the command ext4write being present not just
the feature of being able to write to an ext4 file system. So update
their dependencies to include the ext4write command itself. This will
prevent spurious test failures when running the USB tests against USB
storage with an ext2/ext4 partition but no ext4write command available.

Fixes: 1c5b6edad381 ("test/py: usb: Add tests for USB device")
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Love Kumar <love.kumar@amd.com>
7 weeks agousb: Fix test failure with multiple partitions
Andrew Goodbody [Tue, 15 Oct 2024 12:19:16 +0000 (13:19 +0100)]
usb: Fix test failure with multiple partitions

When test_usb_load finds multiple partitions of the same type then
it will cause a test failure. The call to write the test file will
write a different test file to each partition but only return the
name and size of the last one written. So the test then fails to
load the test file from the first partition as it uses the name of
a file on a different partition.

Refactor the code so that only one test file is written at a time
and is written to only the partition being tested at that time. This
allows the correct file name to always be available to the code that
runs the load command. This reduces the number of files written and
also the number of calls to crc32 needed.

Fixes: 1c5b6edad381 ("test/py: usb: Add tests for USB device")
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Love Kumar <love.kumar@amd.com>
7 weeks agoMerge tag 'dm-pull-2nov24' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Sun, 3 Nov 2024 23:23:29 +0000 (17:23 -0600)]
Merge tag 'dm-pull-2nov24' of https://source.denx.de/u-boot/custodians/u-boot-dm

CI: https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/23152
CI: https://dev.azure.com/simon0972/u-boot/_build/results?buildId=71&view=results

- alist enhancements and fixes
- minor test and sandbox fixes
- some more x86/coreboot patches

7 weeks agosandbox: Fix comment for nomap_sysmem() function
Simon Glass [Mon, 28 Oct 2024 12:47:58 +0000 (13:47 +0100)]
sandbox: Fix comment for nomap_sysmem() function

This should say 'cast' rather than 'case', so fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agosandbox: Add a way to show the sandbox memory-mapping
Simon Glass [Mon, 28 Oct 2024 12:47:57 +0000 (13:47 +0100)]
sandbox: Add a way to show the sandbox memory-mapping

This is mostly hidden in the background, but it is sometimes useful to
look at it. Add a function to allow this.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agodoc: sandbox: Add docs for the sb command
Simon Glass [Mon, 28 Oct 2024 12:47:56 +0000 (13:47 +0100)]
doc: sandbox: Add docs for the sb command

This command has a few small features, so document it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agosandbox: Convert sb command to use new macro
Simon Glass [Mon, 28 Oct 2024 12:47:55 +0000 (13:47 +0100)]
sandbox: Convert sb command to use new macro

Ise the new U_BOOT_CMD_WITH_SUBCMDS() macro instead of writing the code
out manually.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agobloblist: test: Mark tests with UTF_BLOBLIST
Simon Glass [Mon, 28 Oct 2024 12:47:54 +0000 (13:47 +0100)]
bloblist: test: Mark tests with UTF_BLOBLIST

Mark bloblist tests with this flag so that other tests which use
bloblist remain unaffected.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agotest: Allow saving and restoring the bloblist
Simon Glass [Mon, 28 Oct 2024 12:47:53 +0000 (13:47 +0100)]
test: Allow saving and restoring the bloblist

Tests which create a new bloblist overwrite the existing one in sandbox.
Provide a flag for tests to declare this behaviour. Save and restore the
bloblist pointer so that other tests remain unaffected.

Note that when sandbox is running normally, the bloblist has been
relocated to high in memory. The existing bloblist tests create a new
bloblist low in memory, so they do not conflict.

Correct a build error on coreboot by using accessors for gd->bloblist:
Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agolog: Add a new category for tests
Simon Glass [Mon, 28 Oct 2024 12:47:52 +0000 (13:47 +0100)]
log: Add a new category for tests

In some core test code, no existing categories make sense. Add a new one
for testing.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agox86: coreboot: Allow building an expo for editing CMOS config
Simon Glass [Mon, 14 Oct 2024 22:32:11 +0000 (16:32 -0600)]
x86: coreboot: Allow building an expo for editing CMOS config

Coreboot provides the CMOS layout in the tables it passes to U-Boot.
Use that to build an editor for the CMOS settings.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agox86: coreboot: Add a command to check and update CMOS RAM
Simon Glass [Mon, 14 Oct 2024 22:32:10 +0000 (16:32 -0600)]
x86: coreboot: Add a command to check and update CMOS RAM

Coreboot tables provide information about the CMOS-RAM checksum. Add a
command which can check and update this.

With this it is possible to adjust CMOS-RAM settings and tidy up the
checksum afterwards.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agox86: coreboot: Enable support for the configuration editor
Simon Glass [Mon, 14 Oct 2024 22:32:09 +0000 (16:32 -0600)]
x86: coreboot: Enable support for the configuration editor

Enable cedit support along with required options and a simple style.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agox86: coreboot: Show the option table
Simon Glass [Mon, 14 Oct 2024 22:32:08 +0000 (16:32 -0600)]
x86: coreboot: Show the option table

Update the cbsysinfo command to show the contents of the CMOS option
table.

While we are here, add some example output for this command, along with
mention of what the unimplemented tags are.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agox86: coreboot: Add a test for cbsysinfo command
Simon Glass [Mon, 14 Oct 2024 22:32:07 +0000 (16:32 -0600)]
x86: coreboot: Add a test for cbsysinfo command

Add a simple test for this command, checking that coreboot has the
required features.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agobootstage: Do not sort records
Jonas Karlman [Sat, 3 Aug 2024 12:41:45 +0000 (12:41 +0000)]
bootstage: Do not sort records

The timer counter on Rockchip SoCs may be reset in TF-A, this may cause
the bootstage records to be printed out of order and with an incorrect
elapsed time.

Fix this by not sorting the bootstage records.

Before on a Radxa ZERO 3W (RK3566) board:

  => bootstage report
  Timer summary in microseconds (12 records):
         Mark    Elapsed  Stage
            0          0  reset
        7,436      7,436  board_init_f
      164,826    157,390  SPL
      375,392    210,566  end phase
      423,909     48,517  board_init_r
      472,973     49,064  eth_common_init
      476,848      3,875  main_loop
      477,003        155  cli_loop

  Accumulated time:
                   7,181  of_live
                  14,739  dm_spl
                  15,029  dm_r
                 315,150  dm_f

With this the records can be printed in chronological order when the
counter is reset and SPL and board_init_r records show correct elapsed
time.

  => bootstage report
  Timer summary in microseconds (12 records):
         Mark    Elapsed  Stage
            0          0  reset
      164,437    164,437  SPL
      375,023    210,586  end phase
        7,437      7,437  board_init_f
      424,390    416,953  board_init_r
      473,515     49,125  eth_common_init
      477,402      3,887  main_loop
      477,571        169  cli_loop

  Accumulated time:
                  14,734  dm_spl
                 315,646  dm_f
                   7,339  of_live
                  14,977  dm_r

For the tested board external TPL and BROM take ~164 ms to initialize
DRAM and load SPL, SPL take ~210ms to load images from FIT and U-Boot
proper take ~477ms to reach cli prompt.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
7 weeks agobootstd: Avoid showing an invalid buffer address
Simon Glass [Sat, 19 Oct 2024 15:22:09 +0000 (09:22 -0600)]
bootstd: Avoid showing an invalid buffer address

When the buffer address is not set, say so, rather than showing an
address which looks very strange, on sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agobootstd: cros: Correct the x86-setup address
Simon Glass [Sat, 19 Oct 2024 15:21:59 +0000 (09:21 -0600)]
bootstd: cros: Correct the x86-setup address

This should really use an address rather than the buffer. Update it in
the command.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agotest: boot: Update bootflow_iter() for console checking
Simon Glass [Sat, 19 Oct 2024 15:21:58 +0000 (09:21 -0600)]
test: boot: Update bootflow_iter() for console checking

This test checks console output so should have the UTF_CONSOLE flag. Add
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agotest: Drop the duplicate line in setup_bootmenu_image()
Simon Glass [Sat, 19 Oct 2024 15:21:57 +0000 (09:21 -0600)]
test: Drop the duplicate line in setup_bootmenu_image()

The mkimage call is done twice. Remove the duplicate.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agotest: Expand implementation of ut_list_has_dm_tests()
Simon Glass [Sat, 19 Oct 2024 15:21:56 +0000 (09:21 -0600)]
test: Expand implementation of ut_list_has_dm_tests()

This function assumes that all tests in a suite are being run. This
means that it can sometimes call dm_test_restore() when it should not.

The impact of this is that it is not possible, for example, to run
'ut bootstd bootflow_cros' and then check the state of bootstd
afterwards, since all devices are removed and recreated.

Update the function to take account of any selected test, to avoid this
problem.

Add a comment for test_insert while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agotest: boot: Use a consistent name for the script bootmeth
Simon Glass [Sat, 19 Oct 2024 15:21:50 +0000 (09:21 -0600)]
test: boot: Use a consistent name for the script bootmeth

In the bootflow tests the script bootmeth is bound with the name
bootmeth_script whereas the others have a name without the bootmeth_
prefix. Adjust it to be the same.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
7 weeks agodm: core: Add a function to see if a device exists
Simon Glass [Sat, 19 Oct 2024 15:21:49 +0000 (09:21 -0600)]
dm: core: Add a function to see if a device exists

All the uclass functions for finding a device end up creating a uclass
if it doesn't exist. Add a function which instead returns NULL in this
case.

This is useful when in the 'unbind' path, since we don't want to undo
any unbinding which has already happened.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agoalist: Add maintainer
Simon Glass [Sat, 19 Oct 2024 15:21:48 +0000 (09:21 -0600)]
alist: Add maintainer

Add myself as maintainer of alist

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agoalist: Add a way to efficiently filter an alist
Simon Glass [Sat, 19 Oct 2024 15:21:47 +0000 (09:21 -0600)]
alist: Add a way to efficiently filter an alist

Unlike linked lists, it is inefficient to remove items from an alist,
particularly if it is large. If most items need to be removed, then the
time-complexity approaches O(n2).

Provide a way to do this efficiently, by working through the alist once
and copying elements down.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agoalist: Add a function to empty the list
Simon Glass [Sat, 19 Oct 2024 15:21:46 +0000 (09:21 -0600)]
alist: Add a function to empty the list

Sometimes it is useful to empty the list without de-allocating any of
the memory used, e.g. when the list will be re-populated immediately
afterwards.

Add a new function for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agoalist: Add for-loop helpers
Simon Glass [Sat, 19 Oct 2024 15:21:45 +0000 (09:21 -0600)]
alist: Add for-loop helpers

Add some macros which permit easy iteration through an alist, similar to
those provided by the 'list' implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agoalist: Add a way to get the next element
Simon Glass [Sat, 19 Oct 2024 15:21:44 +0000 (09:21 -0600)]
alist: Add a way to get the next element

Add a new function which returns the next element after the one
provided, if it exists in the list.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agoalist: Expand the comment for alist_get()
Simon Glass [Sat, 19 Oct 2024 15:21:43 +0000 (09:21 -0600)]
alist: Expand the comment for alist_get()

Add a better description for this macro.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agoalist: Add a comment for alist_init_struct()
Simon Glass [Sat, 19 Oct 2024 15:21:42 +0000 (09:21 -0600)]
alist: Add a comment for alist_init_struct()

Comment this macro so that it is clear how to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks agoalist: Mention the error condition in alist_add_placeholder()
Simon Glass [Sat, 19 Oct 2024 15:21:41 +0000 (09:21 -0600)]
alist: Mention the error condition in alist_add_placeholder()

Update the function comment to note that this function can return NULL
if it runs out of memory.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 weeks ago.readthedocs.yml: update Python version and Ubuntu release
Heinrich Schuchardt [Sun, 3 Nov 2024 10:56:35 +0000 (11:56 +0100)]
.readthedocs.yml: update Python version and Ubuntu release

The current documentation build dependencies are not compatible with
Python 3.9. Update to Python 3.12.

Use the current Ubuntu LTS release, i.e. 24.04 Noble Numbat.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sun, 3 Nov 2024 17:05:20 +0000 (11:05 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

7 weeks agoARM: renesas: Deduplicate common Renesas defconfig
Marek Vasut [Sun, 27 Oct 2024 02:20:07 +0000 (03:20 +0100)]
ARM: renesas: Deduplicate common Renesas defconfig

Deduplicate common Renesas defconfig by factoring out the common
parts into generic renesas_rcar_defconfig and including those using
the #include <configs/...> preprocessor macro in the current set of
board specific defconfigs. The preprocessor macro is applicable
to defconfigs as well.

This introduces no functional change, the resulting .config are
identical for all Renesas systems.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agoARM: renesas: Deduplicate Renesas R-Car 64bit defconfigs
Marek Vasut [Sun, 27 Oct 2024 02:20:06 +0000 (03:20 +0100)]
ARM: renesas: Deduplicate Renesas R-Car 64bit defconfigs

Deduplicate defconfigs for all Renesas R-Car 64bit systems by factoring
out the common parts into generic renesas_rcar64.config and including
those using the #include <configs/...> preprocessor macro in the current
set of board specific defconfigs. The preprocessor macro is applicable
to defconfigs as well.

This introduces no functional change, the resulting .config is identical
for all Renesas R-Car 64bit systems.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agoARM: renesas: Deduplicate Renesas R-Car Gen4 defconfigs
Marek Vasut [Sun, 27 Oct 2024 02:20:05 +0000 (03:20 +0100)]
ARM: renesas: Deduplicate Renesas R-Car Gen4 defconfigs

Deduplicate defconfigs for all Renesas R-Car Gen4 systems by factoring
out the common parts into generic renesas_rcar4.config and including
those using the #include <configs/...> preprocessor macro in the current
set of board specific defconfigs. The preprocessor macro is applicable
to defconfigs as well.

This introduces no functional change, the resulting .config is identical
for all Renesas R-Car Gen4 systems.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agoARM: renesas: Deduplicate Renesas R-Car Gen3 defconfigs
Marek Vasut [Sun, 27 Oct 2024 02:20:04 +0000 (03:20 +0100)]
ARM: renesas: Deduplicate Renesas R-Car Gen3 defconfigs

Deduplicate defconfigs for all Renesas R-Car Gen3 systems by factoring
out the common parts into generic renesas_rcar3.config and including
those using the #include <configs/...> preprocessor macro in the current
set of board specific defconfigs. The preprocessor macro is applicable
to defconfigs as well.

This introduces no functional change, the resulting .config is identical
for all Renesas R-Car Gen3 systems.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agoARM: renesas: Deduplicate Renesas R-Car Gen2 defconfigs
Marek Vasut [Sun, 27 Oct 2024 02:20:03 +0000 (03:20 +0100)]
ARM: renesas: Deduplicate Renesas R-Car Gen2 defconfigs

Deduplicate defconfigs for all Renesas R-Car Gen2 systems by factoring
out the common parts into generic renesas_rcar2.config and including
those using the #include <configs/...> preprocessor macro in the current
set of board specific defconfigs. The preprocessor macro is applicable
to defconfigs as well.

This introduces no functional change, the resulting .config is identical
for all Renesas R-Car Gen2 systems.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agoclk: renesas: Fix missing unbind on driver look up failure
Marek Vasut [Wed, 4 Sep 2024 22:34:20 +0000 (00:34 +0200)]
clk: renesas: Fix missing unbind on driver look up failure

In case lists_driver_lookup_name("rst_gen3") fails, the clk_gen3 driver
has to be unbound before erroring out. Reorder the function such that
both clk_gen3 and rst_gen3 drivers are looked up first, if either look
up fails then the function errors out right away. Second, the clk_gen3
is bound, if binding fails, the function still errors out right away
because there is nothing to undo after either lists_driver_lookup_name()
call. Finally, rst_gen3 is bound and if this binding fails, then that
is the only place where clk_gen3 has to be unbound before erroring out.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agoMerge patch series "fs: ext4: implement opendir, readdir, closedir"
Tom Rini [Fri, 1 Nov 2024 19:38:05 +0000 (13:38 -0600)]
Merge patch series "fs: ext4: implement opendir, readdir, closedir"

Heinrich Schuchardt <heinrich.schuchardt@canonical.com> says:

With this series opendir, readdir, closedir are implemented for ext4.
These functions are needed for the UEFI sub-system to interact with
the ext4 file system.

To reduce code growth the functions are reused to implement the ls
command for ext4.

A memory leak in ext4fs_exists is resolved.

ext4fs_iterate_dir is simplified by removing a redundant pointer copy.

Link: https://lore.kernel.org/r/20241026064048.370062-1-heinrich.schuchardt@canonical.com
7 weeks agofs: ext4: use fs_ls_generic
Heinrich Schuchardt [Sat, 26 Oct 2024 06:40:48 +0000 (08:40 +0200)]
fs: ext4: use fs_ls_generic

Now that opendir, readir, closedir are implemented for ext4 we can use
fs_ls_generic() for implementing the ls command.

Adjust the unit tests:

* fs_ls_generic() produces more spaces between file size and name.
* The ext4 specific message "** Can not find directory. **\n" is not
  written anymore.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 weeks agoefi_loader: fix GetInfo and SetInfo
Heinrich Schuchardt [Sat, 26 Oct 2024 06:40:47 +0000 (08:40 +0200)]
efi_loader: fix GetInfo and SetInfo

* Some of our file system drivers cannot report a file size for
  directories. Use a dummy value in this case.
* For SetInfo the UEFI spec requires to ignore the file size field.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 weeks agofs: ext4: implement opendir, readdir, closedir
Heinrich Schuchardt [Sat, 26 Oct 2024 06:40:46 +0000 (08:40 +0200)]
fs: ext4: implement opendir, readdir, closedir

For accessing directories from the EFI sub-system a file system must
implement opendir, readdir, closedir. Provide the missing implementation.

With this patch the eficonfig command can be used to define load options
for the ext4 file system.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 weeks agofs: ext4: free directory node in ext4fs_exists()
Heinrich Schuchardt [Sat, 26 Oct 2024 06:40:45 +0000 (08:40 +0200)]
fs: ext4: free directory node in ext4fs_exists()

The directory retrieved in ext4fs_exists() should be freed to avoid a
memory leak.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 weeks agofs: ext4: simplify ext4fs_iterate_dir()
Heinrich Schuchardt [Sat, 26 Oct 2024 06:40:44 +0000 (08:40 +0200)]
fs: ext4: simplify ext4fs_iterate_dir()

Remove copying a pointer with a cast to the very same type.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 weeks agotest/cmd/mem_copy.c: Use CONFIG_SYS_LOAD_ADDR for base
Tom Rini [Wed, 30 Oct 2024 00:36:49 +0000 (18:36 -0600)]
test/cmd/mem_copy.c: Use CONFIG_SYS_LOAD_ADDR for base

When reading/writing to memory we cannot assume that a base address of
0x0 is correct and functional. So use CONFIG_SYS_LOAD_ADDR as the base
from which we add a bit more padding and being our tests.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agotest/py: spi: prevent overwriting relocation memory
Padmarao Begari [Tue, 29 Oct 2024 11:47:09 +0000 (17:17 +0530)]
test/py: spi: prevent overwriting relocation memory

Update spi negative test case to prevent SF command
from overwriting relocation memory area.

Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Love Kumar <love.kumar@amd.com>
7 weeks agolmb: remove __maybe_unused from lmb_map_update_notify
Heinrich Schuchardt [Mon, 28 Oct 2024 06:21:36 +0000 (07:21 +0100)]
lmb: remove __maybe_unused from lmb_map_update_notify

Function lmb_map_update_notify() is always referenced.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 weeks agoscsi: fix disk capacity too small by one sector
Julius Lehmann [Sat, 26 Oct 2024 18:06:44 +0000 (20:06 +0200)]
scsi: fix disk capacity too small by one sector

SCSI READ CAPACITY reports the address of the last block and the block
size. The total number of blocks is thus last block address plus one.

This also fixes the corresponding test case.

7 weeks agoacpi_table: Fix coverity defect in acpi_write_spcr
Patrick Rudolph [Wed, 30 Oct 2024 13:11:46 +0000 (14:11 +0100)]
acpi_table: Fix coverity defect in acpi_write_spcr

Fix "Integer handling issues  (SIGN_EXTENSION)" in newly added code:
Cast serial_info.reg_offset to u64 to prevent an integer overflow when
shifted too many bits to the left. Currently this never happens as the
shift is supposed to be less than 4.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
7 weeks agomtd: spi-nor: Guard SPI_STACKED_PARALLEL with DM_SPI check
Tom Rini [Thu, 31 Oct 2024 17:47:25 +0000 (11:47 -0600)]
mtd: spi-nor: Guard SPI_STACKED_PARALLEL with DM_SPI check

While we want to compile the SPI_STACKED_PARALLEL code everywhere we
can, it must first be guarded with an #if for DM_SPI as not all cases
where we have this code built, such as in SPL, will have the relevant
DM_SPI option enabled.

Fixes: 43423cdc5dc1 ("mtd: spi-nor: Always build SPI_STACKED_PARALLEL code")
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agoMerge patch series "mtd: spi-nor: Remove recently added nor->addr_width == 3 test"
Tom Rini [Thu, 31 Oct 2024 16:50:25 +0000 (10:50 -0600)]
Merge patch series "mtd: spi-nor: Remove recently added nor->addr_width == 3 test"

Tom Rini <trini@konsulko.com> says:

In the patch series "spi-nor: Add parallel and stacked memories support"
a number of issues have since been raised about problems that now exist
on a large number of previously working platforms. Marek Vasut has gone
and identified a number of issues and this series is the starting point
of attempting to address them and fix the problems with previously
existing platforms.

Link: https://patchwork.ozlabs.org/project/uboot/list/?series=429932&state=*
Link: https://lore.kernel.org/r/20241026201741.171073-1-marek.vasut+renesas@mailbox.org
7 weeks agomtd: spi-nor: Always build SPI_STACKED_PARALLEL code
Marek Vasut [Sat, 26 Oct 2024 20:16:26 +0000 (22:16 +0200)]
mtd: spi-nor: Always build SPI_STACKED_PARALLEL code

Prevent the code gated by SPI_STACKED_PARALLEL from bitrot
by using if (CONFIG_IS_ENABLED(SPI_STACKED_PARALLEL)) around
it. That way, it is always at least compiled.

Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agomtd: spi-nor: Rename SPI_ADVANCE to SPI_STACKED_PARALLEL
Marek Vasut [Sat, 26 Oct 2024 20:16:25 +0000 (22:16 +0200)]
mtd: spi-nor: Rename SPI_ADVANCE to SPI_STACKED_PARALLEL

The SPI_ADVANCE description does not explain what the switch does.
It does not have anything to do with any advanced functionality, it
only gates off support for stacked and parallel SPI NORs. Rename the
Kconfig symbol, update description, and move it right next to Xilinx
hardware as it seems to be specific to this hardware. Make sure the
symbol is also protected by if DM_SPI in Kconfig.

Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agomtd: spi-nor: Rewrite rem_bank_len calculation
Marek Vasut [Sat, 26 Oct 2024 20:16:24 +0000 (22:16 +0200)]
mtd: spi-nor: Rewrite rem_bank_len calculation

Rewrite the code to make it clear exactly where the
SNOR_F_HAS_PARALLEL flag leads to *2 and /2 operation
compared to regular code path. No functional change.

Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agomtd: spi-nor: Fix multiple coding style issues
Marek Vasut [Sat, 26 Oct 2024 20:16:23 +0000 (22:16 +0200)]
mtd: spi-nor: Fix multiple coding style issues

The offset variable is set, but never used afterward.
Fix indent. Fix predecrement without justification.
Remove use of parenthesis where unnecessary.

Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agomtd: spi-nor: Remove recently added SST special case
Marek Vasut [Sat, 26 Oct 2024 20:16:22 +0000 (22:16 +0200)]
mtd: spi-nor: Remove recently added SST special case

Remove undocumented SST special case. This was added in commit
5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
without any explanation in the commit message. Remove it.

Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agomtd: spi-nor: Remove recently added write_disable() call
Marek Vasut [Sat, 26 Oct 2024 20:16:21 +0000 (22:16 +0200)]
mtd: spi-nor: Remove recently added write_disable() call

Remove undocumented write_disable() call. This was added in commit
5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
without any explanation in the commit message. Remove it.

Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agomtd: spi-nor: Remove recently added set_4byte() call
Marek Vasut [Sat, 26 Oct 2024 20:16:20 +0000 (22:16 +0200)]
mtd: spi-nor: Remove recently added set_4byte() call

Remove undocumented set_4byte() call. This was added in commit
5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
without any explanation in the commit message. Remove it.

Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agomtd: spi-nor: Remove recently added spi_nor_wait_till_ready() call
Marek Vasut [Sat, 26 Oct 2024 20:16:19 +0000 (22:16 +0200)]
mtd: spi-nor: Remove recently added spi_nor_wait_till_ready() call

Remove undocumented spi_nor_wait_till_ready() call. This was added in commit
5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
without any explanation in the commit message. Remove it.

Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agomtd: spi-nor: Remove recently added nor->addr_width == 3 test
Marek Vasut [Sat, 26 Oct 2024 20:16:18 +0000 (22:16 +0200)]
mtd: spi-nor: Remove recently added nor->addr_width == 3 test

Remove undocumented nor->addr_width == 3 test. This was added in commit
5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
without any explanation in the commit message. Remove it.

This also has a bad side-effect which breaks READ operation of every SPI NOR
which does not use addr_width == 3, e.g. s25fs512s does not work at all. This
is because if addr_width != 3, rem_bank_len is always 0, and if rem_bank_len
is 0, then read_len is 0 and if read_len is 0, then the spi_nor_read() returns
-EIO.

Basic reproducer is as follows:
"
=> sf probe ; sf read 0x50000000 0 0x10000
SF: Detected s25fs512s with page size 256 Bytes, erase size 256 KiB, total 64 MiB
device 0 offset 0x0, size 0x10000
SF: 65536 bytes @ 0x0 Read: ERROR -5
"

Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
7 weeks agoMerge tag 'efi-2025-01-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 31 Oct 2024 14:33:24 +0000 (08:33 -0600)]
Merge tag 'efi-2025-01-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2025-01-rc2

Documentation:

* include semihosting and K3 boards only once in table of contents
* include file-system API into HTML docs
* describe struct ext2_inode
* update Python requirements

UEFI:

* mark local functions static
* simplify efi_free_pages()
* pass correct end address value to  efi_dp_from_mem()
* fix typos in HII test and eficonfig command

7 weeks agolib: efi_loader: Fix efi_dp_from_mem() calls
Moritz Fischer [Wed, 30 Oct 2024 21:17:48 +0000 (21:17 +0000)]
lib: efi_loader: Fix efi_dp_from_mem() calls

The function expects an end address but is being called with
an size instead.

Fixes: 6422820ac3 ("efi_loader: split unrelated code from efi_bootmgr.c")
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Moritz Fischer <moritzf@google.com>
Reviewed-by: Patrick Wildt <pwildt@google.com>
7 weeks agoefi_loader: Make tcg2_uninit() static
Ilias Apalodimas [Wed, 30 Oct 2024 20:40:59 +0000 (22:40 +0200)]
efi_loader: Make tcg2_uninit() static

This function is only used locally, so make it static and quiesce
the W=1 warning

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
8 weeks agoefi_loader: Remove unused diskid
Ilias Apalodimas [Sat, 26 Oct 2024 08:00:49 +0000 (11:00 +0300)]
efi_loader: Remove unused diskid

That variable is defined and assigned a value in two functions
but it's never used.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
8 weeks agoefi_loader: Mark static functions in smbiosdump
Ilias Apalodimas [Sat, 26 Oct 2024 07:57:41 +0000 (10:57 +0300)]
efi_loader: Mark static functions in smbiosdump

Mark functions that are only used locally as static and
quiesce W=1 warnings

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
8 weeks agoefi_loader: Mark static function in dumpdtb
Ilias Apalodimas [Sat, 26 Oct 2024 07:43:17 +0000 (10:43 +0300)]
efi_loader: Mark static function in dumpdtb

A few functions are only used locally but miss the 'static' keyword.
Add it and quiesce W=1 build wanrings

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 weeks agoefi_loader: Mark efi_bootmgr_release_uridp as static
Ilias Apalodimas [Sat, 26 Oct 2024 07:37:32 +0000 (10:37 +0300)]
efi_loader: Mark efi_bootmgr_release_uridp as static

This is only used locally so make it static

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
8 weeks agocmd/eficonfig: capitalize 'enter description'
Heinrich Schuchardt [Fri, 25 Oct 2024 21:15:05 +0000 (23:15 +0200)]
cmd/eficonfig: capitalize 'enter description'

To conform with other messages capitalize the first letter:
%s/enter description/Enter description/g

Adjust the unit tests accordingly.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 weeks agofs: ext4: document struct ext2_inode
Heinrich Schuchardt [Fri, 25 Oct 2024 04:56:01 +0000 (06:56 +0200)]
fs: ext4: document struct ext2_inode

Provide Sphinx style documentation for struct ext2_inode.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 weeks agoefi_loader: Simplify efi_free_pages()
Ilias Apalodimas [Thu, 24 Oct 2024 11:01:55 +0000 (14:01 +0300)]
efi_loader: Simplify efi_free_pages()

We currently call efi_free_pages() with a notify flag and explicitly
update the efi memory map. That's not needed as lmb_free_flags() will do
that for us if the LMB_NONOTIFY flag is removed

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
8 weeks agodoc: include file-system API into HTML docs
Heinrich Schuchardt [Thu, 24 Oct 2024 09:15:29 +0000 (11:15 +0200)]
doc: include file-system API into HTML docs

Add include/fs.h to the API documentation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
8 weeks agofs: improve API documentation
Heinrich Schuchardt [Thu, 24 Oct 2024 09:15:28 +0000 (11:15 +0200)]
fs: improve API documentation

* Describe the fields of struct fs_dir_stream.
* Update fs_readdir() and fs_opendir() description.
* Fix Sphinx errors.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
8 weeks agodoc: update Python requirements
Heinrich Schuchardt [Mon, 21 Oct 2024 18:08:31 +0000 (20:08 +0200)]
doc: update Python requirements

Update Sphinx, sphinx-rtd-theme, and their dependencies.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 weeks agodoc: do not include K3 boards twice in TOC
Heinrich Schuchardt [Mon, 21 Oct 2024 18:01:01 +0000 (20:01 +0200)]
doc: do not include K3 boards twice in TOC

Sphinx writes a warning if a page is included twice in the table of
contents. Use references instead.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Neha Malcom Francis <n-francis@ti.com>
8 weeks agodoc: semihosting can only be once in TOC
Heinrich Schuchardt [Mon, 21 Oct 2024 18:01:00 +0000 (20:01 +0200)]
doc: semihosting can only be once in TOC

Sphinx warns if a page is added to the table of contents twice.
Add a reference instead.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
8 weeks agoboot/Kconfig: correct fdt_fixup_memory_banks name typo
Baruch Siach [Mon, 28 Oct 2024 16:44:35 +0000 (18:44 +0200)]
boot/Kconfig: correct fdt_fixup_memory_banks name typo

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
8 weeks agoscripts/dtc/pylibfdt/libfdt.i_shipped: Use SWIG_AppendOutput
Markus Volk [Wed, 30 Oct 2024 05:07:16 +0000 (06:07 +0100)]
scripts/dtc/pylibfdt/libfdt.i_shipped: Use SWIG_AppendOutput

Swig has changed language specific AppendOutput functions. The helper
macro SWIG_AppendOutput remains unchanged. Use that instead
of SWIG_Python_AppendOutput, which would require an extra parameter
since swig 4.3.0.

/home/flk/poky/build-test/tmp/work/qemux86_64-poky-linux/u-boot/2024.10/git/arch/x86/cpu/u-boot-64.lds
| scripts/dtc/pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_next_node’:
| scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’
|  5581 |     resultobj = SWIG_Python_AppendOutput(resultobj, val);
|       |                 ^~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Reported-by: Rudi Heitbaum <rudi@heitbaum.com>
Link: https://github.com/dgibson/dtc/pull/154
8 weeks agolmb: Correctly unmap memory after notifications
Ilias Apalodimas [Thu, 24 Oct 2024 10:46:25 +0000 (13:46 +0300)]
lmb: Correctly unmap memory after notifications

We never unmap the memory used to update the EFI memory map after
notifications

Fixes: commit 2f6191526a13 ("lmb: notify of any changes to the LMB memory map")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
8 weeks agoarch: arm: dts: k3-j784s4-r5: Introduce k3-j784s4-r5.dtsi
Manorit Chawdhry [Thu, 24 Oct 2024 10:00:04 +0000 (15:30 +0530)]
arch: arm: dts: k3-j784s4-r5: Introduce k3-j784s4-r5.dtsi

Create an SoC R5 dtsi file that could be used at board level R5 files. This
would help in keeping the SoC level changes in sync across board files.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
8 weeks agoMAINTAINERS: add tambarus as reviewer for SPI NOR
Tudor Ambarus [Wed, 30 Oct 2024 11:02:21 +0000 (11:02 +0000)]
MAINTAINERS: add tambarus as reviewer for SPI NOR

I'd like to get Cc'ed to u-boot's SPI NOR patches to help review them.
The ultimate goal is to have an aligned approach in u-boot and linux.

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 weeks agoefi_loader: fix CONFIG_EFI_HTTP dependencies
Heinrich Schuchardt [Sat, 19 Oct 2024 10:59:57 +0000 (12:59 +0200)]
efi_loader: fix CONFIG_EFI_HTTP dependencies

CONFIG_CMD_DNS and CONFIG_CMD_WGET depend on CONFIG_CMD_NET.
CONFIG_CMD_NET depends on CONFIG_NET or CONFIG_NET_LWIP.

We shall only enable CONFIG_EFI_HTTP if there is network support.
We have to select CONFIG_CMD_NET.

Fixes: d7d07a8b508b ("efi_loader: support boot from URI device path")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 weeks agoefi_selftest: make HII test data static
Heinrich Schuchardt [Sat, 19 Oct 2024 09:03:56 +0000 (11:03 +0200)]
efi_selftest: make HII test data static

Variables that are only used locally in a module should not be exported.

* Make the HII test data variables static.
* Remove unused GUIDs.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 weeks agoefi_selftest: fix typo 'got languages' in HII test
Heinrich Schuchardt [Sat, 19 Oct 2024 08:50:29 +0000 (10:50 +0200)]
efi_selftest: fix typo 'got languages' in HII test

%s/got languages are/Available languages:/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 weeks agoMerge tag 'u-boot-imx-master-20241029' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Wed, 30 Oct 2024 00:46:08 +0000 (18:46 -0600)]
Merge tag 'u-boot-imx-master-20241029' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

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

- Implement i.MX93 erratum fix on the dwc_eth_qos driver to fix RMII.
- Add support for Emcraft Systems NavQ+.
- Fix the size of IVT + CSF blob tacked on to u-boot.itb.

8 weeks agoMerge patch series "memory: ti-aemif: Add DM support"
Tom Rini [Wed, 30 Oct 2024 00:45:51 +0000 (18:45 -0600)]
Merge patch series "memory: ti-aemif: Add DM support"

Bastien Curutchet <bastien.curutchet@bootlin.com> says:

Hi all,

This patch series aims to add DM support for the AEMIF controller that
can be found in the DaVinci SoCs.

This controller has already a driver used by the Keystone SoCs so I
add my work to it.

As we can now easily import Linux device-trees, I try to stick the
most I can to the Linux bindings of the AEMIF controller. To do so I add
an 'intermediate' driver called 'ti-aemif-cs'. It's in charge of
configuring timings for a given chip select of the AEMIF controller.

Link: https://lore.kernel.org/r/20241021151330.1860929-1-bastien.curutchet@bootlin.com
8 weeks agomemory: ti-aemif-cs: Compute timing configuration from DT parsing
Bastien Curutchet [Mon, 21 Oct 2024 15:13:30 +0000 (17:13 +0200)]
memory: ti-aemif-cs: Compute timing configuration from DT parsing

The Linux bindings of the AEMIF offer properties that specify the
transaction timings for each chips select.

Add parsing of these properties to calculate the chip select's
configuration from them and the rate of the AEMIF's reference clock.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
8 weeks agomemory: ti-aemif: Add DM support
Bastien Curutchet [Mon, 21 Oct 2024 15:13:29 +0000 (17:13 +0200)]
memory: ti-aemif: Add DM support

The AEMIF's bindings in the Linux tree have a node for the AEMIF
controller and then a node for each AEMIF's chip select. This CS node
doesn't have a compatible property but describes the timing parameters
used by a given chip select.
The U-Boot DM framework expects every node to have a 'compatible'
property. If no 'compatible' is present in a node, its children won't be
parsed by u-boot.

Add DM support to the ti-aemif driver.
Add a new ti-aemif-cs driver to comply with the Linux bindings and the
U-Boot's DM philosophy. This driver handles the timing parameters
of an AEMIF's chip select so move aemif_cs_configure() from ti-aemif.c
to ti-aemif-cs.c.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
8 weeks agomemory: ti-aemif: Wrap the CS configuration into a function
Bastien Curutchet [Mon, 21 Oct 2024 15:13:28 +0000 (17:13 +0200)]
memory: ti-aemif: Wrap the CS configuration into a function

Wrap the CS configuration into a aemif_configure_cs() to ease its
migration to another driver when adding DM support.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
8 weeks agomemory: ti-aemif: Add ARCH_DAVINCI to architectures that uses TI_AEMIF
Bastien Curutchet [Mon, 21 Oct 2024 15:13:27 +0000 (17:13 +0200)]
memory: ti-aemif: Add ARCH_DAVINCI to architectures that uses TI_AEMIF

TI_AEMIF configuration doesn't depend on ARCH_DAVINCI while the AEMIF
controller is present in the DaVinci SoCs.

Add ARCH_DAVINCI to the potential users of the TI_AEMIF driver
Add <asm/io.h> to driver's includes to fix build issue on ARCH_DAVINCI

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 weeks agomemory: ti-aemif: Make AEMIF driver architecture agnostic
Bastien Curutchet [Mon, 21 Oct 2024 15:13:26 +0000 (17:13 +0200)]
memory: ti-aemif: Make AEMIF driver architecture agnostic

AEMIF controller is present on other SoCs than the Keystone ones.

Remove Keystone specificities from the driver to be able to use it from
other architectures.
Adapt the ks2_evm/board.c to fit the new driver.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 weeks agomemory: ti-aemif: Correct macro to ensure avoiding precedence issues
Bastien Curutchet [Mon, 21 Oct 2024 15:13:25 +0000 (17:13 +0200)]
memory: ti-aemif: Correct macro to ensure avoiding precedence issues

Fix following CHECK pointed out by checkpatch:

   CHECK: Macro argument 'cs' may be better as '(cs)' to avoid precedence issues
   #62: FILE: drivers/memory/ti-aemif.c:15:
   +#define AEMIF_CONFIG(cs)               (0x10 + (cs * 4))

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 weeks agoMerge patch series "Support Aspeed SGPIO controller"
Tom Rini [Tue, 29 Oct 2024 18:12:09 +0000 (12:12 -0600)]
Merge patch series "Support Aspeed SGPIO controller"

Billy Tsai <billy_tsai@aspeedtech.com> says:

AST2600 SoC has 2 SGPIO master interfaces one with 128 pins another one
with 80 pins, AST2500/AST2400 SoC has 1 SGPIO master interface that
supports up to 80 pins.

Link: https://lore.kernel.org/r/20241016085955.314236-1-billy_tsai@aspeedtech.com
8 weeks agotest/hush: Add CONFIG_CONSOLE_RECORD where required
Tom Rini [Mon, 28 Oct 2024 16:48:43 +0000 (10:48 -0600)]
test/hush: Add CONFIG_CONSOLE_RECORD where required

The "dollar" tests require CONFIG_CONSOLE_RECORD to be enabled so guard
with that.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 weeks agotest/cmd: Make some "ut dm" tests only available on sandbox
Tom Rini [Mon, 28 Oct 2024 16:48:42 +0000 (10:48 -0600)]
test/cmd: Make some "ut dm" tests only available on sandbox

Currently, the "dm" suite in unit tests (ut) is only available on
sandbox. Make sure that all cmd tests that are part of this suite are
only available on sandbox and not attempted to be run on hardware (where
it will fail to be able to be started).

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 weeks agoKconfig: Remove TARGET_TRICORDER references
Tom Rini [Sat, 26 Oct 2024 14:09:59 +0000 (08:09 -0600)]
Kconfig: Remove TARGET_TRICORDER references

These were missed when removing the rest of the tricorder platform.

Fixes: d137604c20a4 ("arm: Remove tricorder board")
Signed-off-by: Tom Rini <trini@konsulko.com>
8 weeks agodisk: Mark static functions in part_efi.c
Ilias Apalodimas [Sat, 26 Oct 2024 08:05:53 +0000 (11:05 +0300)]
disk: Mark static functions in part_efi.c

Mark all the functions that are only defined locally as static and
quiesce W=1 warnings

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[trini: Add __maybe_unused as it's now seen as unused in some cases]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 weeks agocmd: fat: Make do_fat_size static
Ilias Apalodimas [Sat, 26 Oct 2024 07:33:09 +0000 (10:33 +0300)]
cmd: fat: Make do_fat_size static

This is only used locally,so make it static

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 weeks agolmb: Remove lmb_alloc_flags()
Ilias Apalodimas [Wed, 23 Oct 2024 15:26:36 +0000 (18:26 +0300)]
lmb: Remove lmb_alloc_flags()

lmb_alloc_flags() & lmb_alloc_base_flags() are just a wrappers for
_lmb_alloc_base(). Since the only difference is the max address of the
allowed allocation which _lmb_alloc_base() already supports with the
LMB_ALLOC_ANYWHERE flag, remove one of them.

Keep the lmb_alloc_base_flags() which also prints an error on failures
and adjust efi_allocate_pages() to only use one of them.

While at it clean up the duplicate function description from the header
file.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 weeks agolmb: Simplify lmb_should_notify usage
Ilias Apalodimas [Wed, 23 Oct 2024 15:22:01 +0000 (18:22 +0300)]
lmb: Simplify lmb_should_notify usage

We never call lmb_map_update_notify() without checking the result of
lmb_should_notify(). Instead of running that function everytime fold it
in there and add the additional flags parameter

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>