]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
12 months agocli: hush_modern: Add functions to be called from run_command()
Francis Laniel [Fri, 22 Dec 2023 21:02:34 +0000 (22:02 +0100)]
cli: hush_modern: Add functions to be called from run_command()

run_command() is called internally by the command run and it can also be called
directly from U-Boot code, e.g. to do unit tests.
This commit adds this path to go to modern hush.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agocli: hush_modern: Enable variables expansion for modern hush
Francis Laniel [Fri, 22 Dec 2023 21:02:33 +0000 (22:02 +0100)]
cli: hush_modern: Enable variables expansion for modern hush

Enables variables expansion for modern hush, both for local and environment
variables.
So the following commands:
foo=bar
echo $foo
setenv bar foo
echo $bar
leads to "bar" and "foo" being printed on console output.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agocli: Enables using modern hush parser as command line parser
Francis Laniel [Fri, 22 Dec 2023 21:02:32 +0000 (22:02 +0100)]
cli: Enables using modern hush parser as command line parser

If one defines HUSH_MODERN_PARSER, it is then possible to use modern parser with:
=> cli get
old
=> cli set modern
=> cli get
modern

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
12 months agocmd: Add new cli command
Francis Laniel [Fri, 22 Dec 2023 21:02:31 +0000 (22:02 +0100)]
cmd: Add new cli command

This command can be used to print the current parser with 'cli get'.
It can also be used to set the current parser with 'cli set'.
For the moment, only one value is valid for set: old.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
12 months agoglobal_data.h: add GD_FLG_HUSH_OLD_PARSER flag
Francis Laniel [Fri, 22 Dec 2023 21:02:30 +0000 (22:02 +0100)]
global_data.h: add GD_FLG_HUSH_OLD_PARSER flag

This flag is used to indicate we are using the hush parser.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
12 months agocli: Add menu for hush parser
Francis Laniel [Fri, 22 Dec 2023 21:02:29 +0000 (22:02 +0100)]
cli: Add menu for hush parser

For the moment, the menu contains only entry: HUSH_OLD_PARSER which is the
default.
The goal is to prepare the field to add a new hush parser which guarantees
actual behavior is still correct.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
12 months agocli: Port upstream Busybox hush to U-Boot
Francis Laniel [Fri, 22 Dec 2023 21:02:28 +0000 (22:02 +0100)]
cli: Port upstream Busybox hush to U-Boot

Adds new file cli_hush_upstream.c, it is a copy of Busybox hush file as it was of
time to commit 37460f5da.
This commit modifies Busybox hush to not compile some part specific to Busybox
and adds some code needed by U-Boot.
The modifications consists mainly on adding code #if(n)def guards.

For the moment, this refurbished flavor of hush only permits running command
without any keywords (i.e., if and for are not recognized) or variable expansion
(i.e., echo $foo prints foo and not value stored in variable foo).

A new file was also added to define some functions specific to U-Boot.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
Signed-off-by: Harald Seiler <hws@denx.de>
12 months agocli: Add Busybox upstream hush.c file
Francis Laniel [Fri, 22 Dec 2023 21:02:27 +0000 (22:02 +0100)]
cli: Add Busybox upstream hush.c file

This commit adds new file cli_hush_upstream.c, it is a copy of Busybox hush
file it was of time to Busybox commit 37460f5da.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agotest: hush: Test hush loops
Francis Laniel [Fri, 22 Dec 2023 21:02:26 +0000 (22:02 +0100)]
test: hush: Test hush loops

The added tests verifies correct behavior of for, while and until loops.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agotest: hush: Test hush commands list
Francis Laniel [Fri, 22 Dec 2023 21:02:25 +0000 (22:02 +0100)]
test: hush: Test hush commands list

Verifies behavior of commands separated by ';', '&&' and '||'.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agotest: hush: Test hush variable expansion
Francis Laniel [Fri, 22 Dec 2023 21:02:24 +0000 (22:02 +0100)]
test: hush: Test hush variable expansion

Verifies shell variables are replaced by their values.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
12 months agotest/py: hush_if_test: Remove the test file
Francis Laniel [Fri, 22 Dec 2023 21:02:23 +0000 (22:02 +0100)]
test/py: hush_if_test: Remove the test file

5804ebfeb1ce ("test: hush: Test hush if/else") translated this test to a C test,
so this python file is no more needed.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agotest: hush: Test hush if/else
Francis Laniel [Fri, 22 Dec 2023 21:02:22 +0000 (22:02 +0100)]
test: hush: Test hush if/else

As asked in commit 9c6bf1715f6a ("test/py: hush_if_test: Add tests to cover
octal/hex values"), this commit translates test_hush_if_test.py to a C test.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agotest: Add framework to test hush behavior
Francis Laniel [Fri, 22 Dec 2023 21:02:21 +0000 (22:02 +0100)]
test: Add framework to test hush behavior

Introduce a new subcommand to ut: ut hush.
For the moment, this command does nothing, future commits will add tests which
will be run on command call.

Note that CONFIG_HUSH_PARSER must be defined to compile this new subcommand.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agobootmeth: pass size to efi_binary_run()
Heinrich Schuchardt [Fri, 22 Dec 2023 15:01:56 +0000 (16:01 +0100)]
bootmeth: pass size to efi_binary_run()

If we call efi_binary_run() with size parameter set to zero, we get an error

     Not a PE-COFF file

Fill the missing value.

Fixes: 1373ffde52e1 ("Merge tag 'v2024.01-rc5' into next")
Fixes: 7017fc54a5bc ("bootmeth: use efi_loader interfaces instead of bootefi command")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
12 months agoMerge patch series "Complete decoupling of bootm logic from commands"
Tom Rini [Thu, 21 Dec 2023 21:10:00 +0000 (16:10 -0500)]
Merge patch series "Complete decoupling of bootm logic from commands"

Simon Glass <sjg@chromium.org> says:

This series continues refactoring the bootm code to allow it to be used
with CONFIG_COMMAND disabled. The OS-handling code is refactored and
a new bootm_run() function is created to run through the bootm stages.
This completes the work.

A booti_go() function is created also, in case it proves useful, but at
last for now standard boot does not use this.

This is cmdd (part d of CMDLINE refactoring)
It depends on dm/bootstda-working
which depends on dm/cmdc-working

12 months agobootm: Create a new boot_run() function to handle booting
Simon Glass [Sat, 16 Dec 2023 03:14:26 +0000 (20:14 -0700)]
bootm: Create a new boot_run() function to handle booting

Create a common function used by the three existing bootz/i/m_run()
functions, to reduce duplicated code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agobootm: Create a function to run through the booti states
Simon Glass [Sat, 16 Dec 2023 03:14:25 +0000 (20:14 -0700)]
bootm: Create a function to run through the booti states

In a few places, the booti command is used to handle a boot. We want
these to be done without needing CONFIG_CMDLINE, so add a new
booti_run() function to handle this.

So far this is not used.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agostm32: Use bootm_run() and bootz_run()
Simon Glass [Sat, 16 Dec 2023 03:14:24 +0000 (20:14 -0700)]
stm32: Use bootm_run() and bootz_run()

Use the new bootm/z_run() functions to avoid having to create an
argument list for the stm32prog code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
12 months agobootm: Create a function to run through the bootz states
Simon Glass [Sat, 16 Dec 2023 03:14:23 +0000 (20:14 -0700)]
bootm: Create a function to run through the bootz states

In a few places, the bootz command is used to handle a boot. We want
these to be done without needing CONFIG_CMDLINE, so add a new
bootz_run() function to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agostm32: Use local vars in stm32prog for initrd and fdt
Simon Glass [Sat, 16 Dec 2023 03:14:22 +0000 (20:14 -0700)]
stm32: Use local vars in stm32prog for initrd and fdt

Rather than assigning to the bootm_argv[] array multiple times, use
local variables for the two things that can change and assign them at
the end.

This makes it easier to drop the array eventually.

Tidu up an overly short line while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
12 months agobootm: Create a function to run through the bootm states
Simon Glass [Sat, 16 Dec 2023 03:14:21 +0000 (20:14 -0700)]
bootm: Create a function to run through the bootm states

In quite a few places, the bootm command is used to handle a boot. We
want these to be done without needing CONFIG_CMDLINE, so add a new
bootm_run() function to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agobootm: Tidy up boot_selected_os()
Simon Glass [Sat, 16 Dec 2023 03:14:20 +0000 (20:14 -0700)]
bootm: Tidy up boot_selected_os()

Use struct bootm_info with this function, to avoiding needing to
create a new one.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agobootm: Rename do_bootm_states() to bootm_run_states()
Simon Glass [Sat, 16 Dec 2023 03:14:19 +0000 (20:14 -0700)]
bootm: Rename do_bootm_states() to bootm_run_states()

Rename the function to bootm_run_states() to better indicate ts
purpose. The 'do_' prefix is used to indicate a command processor,
which this is now not.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agobootm: Drop arguments from do_bootm_states()
Simon Glass [Sat, 16 Dec 2023 03:14:18 +0000 (20:14 -0700)]
bootm: Drop arguments from do_bootm_states()

Use the bootm_info struct to hold the information required by bootm.

Now that none of the functions called from do_bootm_states() needs an
argv[] list, change the arguments of do_bootm_states() as well. Take
care to use the same value for boot_progress even though it is a little
inconsistent.

For booti make sure it only uses argv[] and argc at the top of the
function, so we can eventually refactor to remove these parameters.

With bootm, some OSes need access to the arguments provided to the
command, so set these up in the bootm_info struct, for bootm only.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agobootz: Avoid use of #ifdef
Simon Glass [Sat, 16 Dec 2023 03:14:17 +0000 (20:14 -0700)]
bootz: Avoid use of #ifdef

Use the compiler to get the set of states, instead of the preprocessor.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agobooti: Avoid use of #ifdef
Simon Glass [Sat, 16 Dec 2023 03:14:16 +0000 (20:14 -0700)]
booti: Avoid use of #ifdef

Use the compiler to get the set of states, instead of the preprocessor.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agobootm: Move do_bootm_states() comment to header file
Simon Glass [Sat, 16 Dec 2023 03:14:15 +0000 (20:14 -0700)]
bootm: Move do_bootm_states() comment to header file

This is an exported function, so move the function comment to the
bootm.h header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agobootm: Add more fields to bootm_info
Simon Glass [Sat, 16 Dec 2023 03:14:14 +0000 (20:14 -0700)]
bootm: Add more fields to bootm_info

Add fields for the three bootm parameters and other things needed for
booting. Also add a helper to set up the struct correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agobootm: Adjust arguments of boot_os_fn
Simon Glass [Sat, 16 Dec 2023 03:14:13 +0000 (20:14 -0700)]
bootm: Adjust arguments of boot_os_fn

Adjust boot_os_fn to use struct bootm_info instead of the separate
argc, argv and image parameters. Update the handlers accordingly. Few
of the functions make use of the arguments, so this improves code size
slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agobootm: Create a struct for argument information
Simon Glass [Sat, 16 Dec 2023 03:14:12 +0000 (20:14 -0700)]
bootm: Create a struct for argument information

Some OS functions require the arguments to the 'bootm' command. This is
inconvenient for two reasons.

Firstly, there may not be any actual command, if CMDLINE is not enabled
and programmatic boot is being used.

Secondly, most functions don't require the arguments, so it is
inefficient to pass them when not needed. For example it increases code
size.

Create a new struct which holds the arguments, which can be used if
needed.

Add the images pointer as well, since this is commonly needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agosandbox: bootm: Enable more bootm OS methods
Simon Glass [Sat, 16 Dec 2023 03:14:11 +0000 (20:14 -0700)]
sandbox: bootm: Enable more bootm OS methods

It is useful for sandbox to build as much code as possible. Enable
support for booting various other operating systems. Add the missing
cache functions.

These operating systems do not actually boot on sandbox, of course.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 months agobootm: Adjust how the board is reset
Simon Glass [Sat, 16 Dec 2023 03:14:10 +0000 (20:14 -0700)]
bootm: Adjust how the board is reset

Use reset_cpu() to reset the board, copying the logic from the 'reset'
command. This makes more sense than directly calling the do_reset()
function with the arguments passsed to the bootm command.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
12 months agoriscv: Add a reset_cpu() function
Simon Glass [Sat, 16 Dec 2023 03:14:09 +0000 (20:14 -0700)]
riscv: Add a reset_cpu() function

The current do_reset() is called from a command context. Add a function
which can be used from anywhere, as is done on ARM. Adjust do_reset()
to call it.

Note that reset_cpu() is normally provided by SYSRESET so make this
declaration conditional on that being disabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Tested-by: Chanho Park <chanho61.park@samsung.com>
12 months agonios2: Add a reset_cpu() function
Simon Glass [Sat, 16 Dec 2023 03:14:08 +0000 (20:14 -0700)]
nios2: Add a reset_cpu() function

The current do_reset() is called from a command context. Add a function
which can be used from anywhere, as is done on ARM.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 months agoppc: Add a reset_cpu() function
Simon Glass [Sat, 16 Dec 2023 03:14:07 +0000 (20:14 -0700)]
ppc: Add a reset_cpu() function

The current do_reset() is called from a command context. Add a function
which can be used from anywhere, as is done on ARM.

This is only needed if CONFIG_SYSRESET is disabled.

Since there are lots of reset functions, this one actually just calls
do_reset(). Future refactoring could correct this.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 months agom68k: Add a reset_cpu() function
Simon Glass [Sat, 16 Dec 2023 03:14:06 +0000 (20:14 -0700)]
m68k: Add a reset_cpu() function

The current do_reset() is called from a command context. Add a function
which can be used from anywhere, as is done on ARM.

Since there are lots of reset functions, this one actually just calls
do_reset(). Future refactoring could correct this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Angelo Dureghello <angelo@kernel-spcece.org>
12 months agomips: Add a reset_cpu() function
Simon Glass [Sat, 16 Dec 2023 03:14:05 +0000 (20:14 -0700)]
mips: Add a reset_cpu() function

The current do_reset() is called from a command context. Add a function
which can be used from anywhere, as is done on ARM.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 months agoMerge branch '2023-12-21-assorted-updates-and-fixes' into next
Tom Rini [Thu, 21 Dec 2023 20:35:03 +0000 (15:35 -0500)]
Merge branch '2023-12-21-assorted-updates-and-fixes' into next

- A few board fixes along with IOMMU enhancements and general fixes

12 months agolib: rsa: Print detailed error info in rsa_engine_init() on engine resolution failure
Csókás Bence [Thu, 14 Dec 2023 16:54:17 +0000 (17:54 +0100)]
lib: rsa: Print detailed error info in rsa_engine_init() on engine resolution failure

Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agoboard/keymile/kmcent2: fix update-nor indentation
Tomas Alvarez Vanoli [Tue, 12 Dec 2023 14:39:27 +0000 (15:39 +0100)]
board/keymile/kmcent2: fix update-nor indentation

variable was indented as part of the value of the previous variable.

Signed-off-by: Tomas Alvarez Vanoli <tomas.alvarez-vanoli@hitachienergy.com>
Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
12 months agoiommu: add qcom-hyp-smmu
Caleb Connolly [Mon, 11 Dec 2023 18:41:42 +0000 (18:41 +0000)]
iommu: add qcom-hyp-smmu

Add a basic implementation of the ARM SMMU. This driver is intended for
use on Qualcomm platforms where the SMMU has been configured by a previous
bootloader, cannot be turned off, and doesn't support BYPASS streams.
It keeps all existing stream mappings and only creates new ones for stream
ids that aren't already configured.

This driver is necessary to support peripherals that perform DMA which
weren't configured by the previous stage bootloader (for example USB).
It works by allocating a context bank using identity mapping (as U-Boot
doesn't use virtual addresses).

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
12 months agoiommu: add a connect op
Caleb Connolly [Mon, 11 Dec 2023 18:41:41 +0000 (18:41 +0000)]
iommu: add a connect op

Add an optional iommu callback to be invoked before a device probes.
This can be used to configure the IOMMU in preparation for the device
(e.g. by allocating a context bank)

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
12 months agoiommu: fix compilation when CONFIG_PCI disabled
Caleb Connolly [Mon, 11 Dec 2023 18:41:40 +0000 (18:41 +0000)]
iommu: fix compilation when CONFIG_PCI disabled

The dev_pci_iommu_enable() function is only available when CONFIG_PCI is
enabled, replace the runtime check with a preprocessor one to fix
compilation with pci disabled.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
12 months agoconfigs: verdin-am62: Disable SPL FIT Overlay
Francesco Dolcini [Mon, 11 Dec 2023 13:45:20 +0000 (14:45 +0100)]
configs: verdin-am62: Disable SPL FIT Overlay

Disable CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY, this is not required nor used
on verdin am62, disable it to save precious binary size.

Update defconfig using savedefconfig, this adds CONFIG_OF_LIBFDT_OVERLAY
explicitly.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
12 months agoboot: add support for fdt_fixup command in environment
Matthias Schiffer [Mon, 11 Dec 2023 11:03:17 +0000 (12:03 +0100)]
boot: add support for fdt_fixup command in environment

The "fdt" command is convenient for making small changes to the OS FDT,
especially during development. This is easy when the kernel and FDT are
loaded separately, but can be cumbersome for FIT images, requiring to
unpack the image, manually apply overlays, etc.

Add an option to execute a command "fdt_fixup" from the environment at
the beginning of image_setup_libfdt() (after overlays are applied, and
before the other fixups).

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agoinclude: env: ti: ti_common: Run main_cpsw0_qsgmii_phyinit conditionally
Manorit Chawdhry [Mon, 11 Dec 2023 10:42:09 +0000 (16:12 +0530)]
include: env: ti: ti_common: Run main_cpsw0_qsgmii_phyinit conditionally

The main_cpsw0_qsgmii_phyinit command is defined only for certain TI
SoCs which have the do_main_cpsw0_qsgmii_phyinit variable set.

Add a check to ensure that the main_cpsw0_qsgmii_phyinit command is run
only for such SoCs.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
12 months agofs: Fix SPL build if FS_LOADER is enabled
Mayuresh Chitale [Thu, 16 Nov 2023 17:16:12 +0000 (22:46 +0530)]
fs: Fix SPL build if FS_LOADER is enabled

If FS_LOADER is enabled for the SPL then the build fails with the error:

fs/fs.o:(.data.rel.fstypes+0x128):
undefined reference to `smh_fs_set_blk_dev'
fs/fs.o:(.data.rel.fstypes+0x140):
undefined reference to `smh_fs_size'
fs/fs.o:(.data.rel.fstypes+0x148):
undefined reference to `smh_fs_read'
fs/fs.o:(.data.rel.fstypes+0x150):
undefined reference to `smh_fs_write'

Fix the error by populating the semihosting entry in the fs_types array
only for non-SPL builds.

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
12 months agoMerge branch '2023-12-21-header-inclusion-cleanup' into next
Tom Rini [Thu, 21 Dec 2023 16:51:58 +0000 (11:51 -0500)]
Merge branch '2023-12-21-header-inclusion-cleanup' into next

- Merge in changes to clean up various places that used <common.h> or
  <linux/kconfig.h>

12 months agolib: Remove <common.h> inclusion from these files
Tom Rini [Thu, 14 Dec 2023 18:16:58 +0000 (13:16 -0500)]
lib: Remove <common.h> inclusion from these files

After some header file cleanups to add missing include files, remove
common.h from all files in the lib directory. This primarily means just
dropping the line but in a few cases we need to add in other header
files now.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoinclude: Further cleanup includes
Tom Rini [Thu, 14 Dec 2023 18:16:57 +0000 (13:16 -0500)]
include: Further cleanup includes

Add some missing headers such as <linux/errno.h> or <linux/types.h> or
<linux/kernel.h> to header files that make direct usage of things
provided by these headers.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agodisplay_options: Clean up headers
Tom Rini [Thu, 14 Dec 2023 18:16:56 +0000 (13:16 -0500)]
display_options: Clean up headers

In include/display_options.h we cannot include ourself, but do need
<linux/types.h> directly. Then in lib/display_options.c we further clean
the list to remove common.h.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoefi_loader: Remove <common.h>
Tom Rini [Thu, 14 Dec 2023 18:16:55 +0000 (13:16 -0500)]
efi_loader: Remove <common.h>

We largely do not need <common.h> in these files, so drop it. The only
exception here is that efi_freestanding.c needs <linux/types.h> and had
been getting that via <common.h>.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agormobile: Add <mach/rmobile.h> to cpu_info-rzg2l.c
Tom Rini [Thu, 14 Dec 2023 18:16:54 +0000 (13:16 -0500)]
rmobile: Add <mach/rmobile.h> to cpu_info-rzg2l.c

In order for RMOBILE_CPU_TYPE_R9A07G044L to be defined we need to
include <mach/rmobile.h> here.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agolib/sha*.c: Update header list
Tom Rini [Thu, 14 Dec 2023 18:16:53 +0000 (13:16 -0500)]
lib/sha*.c: Update header list

Cleanup the list of headers we include here. For the tools build we only
need to exclude <cyclic.h> as that's used by the target build for the
prototype for schedule(), and we don't need to get that via
<watchdog.h>. We can also make use of our <string.h> intentionally
existing as a redirection to <linux/string.h> to reduce ifdef'd lines.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoglobal: Rework architecture global_data.h to include <linux/types.h>
Tom Rini [Thu, 14 Dec 2023 18:16:52 +0000 (13:16 -0500)]
global: Rework architecture global_data.h to include <linux/types.h>

In most cases, the architecture global data currently makes use of
assorted linux types, but does not include <linux/types.h> to provide
them. Add <linux/types.h> instead of relying on indirect inclusion.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agom68k: Rework asm/global_data.h slightly
Tom Rini [Thu, 14 Dec 2023 18:16:51 +0000 (13:16 -0500)]
m68k: Rework asm/global_data.h slightly

In the architecture global data, replace the one case of u32 with
unsigned long. Now, we can drop config.h here but then do need to add it
in two m68k-centric spaces.

Acked-by: Angelo Dureghello <angelo@kernel-space.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agosandbox: Add <linux/types.h> to asm/global_data.h and asm/io.h
Tom Rini [Thu, 14 Dec 2023 18:16:50 +0000 (13:16 -0500)]
sandbox: Add <linux/types.h> to asm/global_data.h and asm/io.h

We need <linux/types.h> in these files as we reference Linux types.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoarm: Remove <asm/types.h> from asm/global_data.h
Tom Rini [Thu, 14 Dec 2023 18:16:49 +0000 (13:16 -0500)]
arm: Remove <asm/types.h> from asm/global_data.h

We need and include <linux/types.h> and this in turn already includes
<asm/types.h>, so drop it here.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoglobal: Remove duplicate common.h inclusions
Tom Rini [Thu, 14 Dec 2023 18:16:48 +0000 (13:16 -0500)]
global: Remove duplicate common.h inclusions

These files include <common.h> twice. Start by removing the second
inclusion of the file.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoglobal: Drop common.h inclusion
Tom Rini [Thu, 14 Dec 2023 18:16:47 +0000 (13:16 -0500)]
global: Drop common.h inclusion

In order to make it easier to move on to dropping common.h from code
directly, remove common.h inclusion from the rest of the header file
which had been including it.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agosandbox: Audit config.h and common.h usage
Tom Rini [Thu, 14 Dec 2023 18:16:46 +0000 (13:16 -0500)]
sandbox: Audit config.h and common.h usage

Remove and replace common.h and config.h in sandbox when it's not needed
and add some explicit includes where needed.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoarm: Partial cleanup and audit usage of <config.h>
Tom Rini [Thu, 14 Dec 2023 18:16:45 +0000 (13:16 -0500)]
arm: Partial cleanup and audit usage of <config.h>

We need to include <config.h> directly when a file needs to have
something such as CFG_SYS_SDRAM_SIZE referenced as this file is not
automatically globally included and is most commonly indirectly included
via common.h.  Remove most cases of arm including config.h directly, but
add it where needed. This includes a few board-specific fixes.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoarc: Cleanup and audit usage of <config.h>
Tom Rini [Thu, 14 Dec 2023 18:16:44 +0000 (13:16 -0500)]
arc: Cleanup and audit usage of <config.h>

We need to include <config.h> directly when a file needs to have
something such as CFG_SYS_SDRAM_SIZE referenced as this file is not
automatically globally included and is most commonly indirectly included
via common.h.  Remove most cases of arc including config.h directly, but
add it where needed. Further clean up the tb100 board config.h file so
that we don't rely on config.h being included there for a value used in
a single place.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoqe: Add <config.h> to linux/immap_qe.h
Tom Rini [Thu, 14 Dec 2023 18:16:43 +0000 (13:16 -0500)]
qe: Add <config.h> to linux/immap_qe.h

Given how we define QE_MURAM_SIZE today, this header needs to have
<config.h> added to it.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoglobal: Restrict use of '#include <linux/kconfig.h>'
Tom Rini [Thu, 14 Dec 2023 12:16:54 +0000 (07:16 -0500)]
global: Restrict use of '#include <linux/kconfig.h>'

In general terms, we -include include/linux/kconfig.h and so normal
U-Boot code does not need to also #include it. However, for code which
is shared with userspace we may need to add it so that either our full
config is available or so that macros such as CONFIG_IS_ENABLED() can be
evaluated. In this case make sure that we guard these includes with a
test for USE_HOSTCC so that it clear as to why we're doing this.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoMerge branch '2023-12-20-assorted-general-updates' into next
Tom Rini [Wed, 20 Dec 2023 21:00:22 +0000 (16:00 -0500)]
Merge branch '2023-12-20-assorted-general-updates' into next

- Assorted fixes around the tree

12 months agoMerge tag 'u-boot-imx-next-20231220' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Wed, 20 Dec 2023 19:14:46 +0000 (14:14 -0500)]
Merge tag 'u-boot-imx-next-20231220' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next

- Put the USB hub out of reset on colibri-imx8x
- Fix VDDx brownout interrupt register of i.MX23/i.MX28
- Fix Phytec imx8m SoM detection
- Add TPM support for gw72xx boards

12 months agocmd: part: Cover both part type entries with GUID ifdef
Marek Vasut [Sun, 10 Dec 2023 21:25:07 +0000 (22:25 +0100)]
cmd: part: Cover both part type entries with GUID ifdef

The 'part type' subcommand depends on GUID partition table support.
The help text exposes one of two 'part type' subcommand entries,
hide both in case GUID partition table support is not enabled to
avoid confusing users.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agosmbios: Fallback to the default DT if sysinfo nodes are missing
Ilias Apalodimas [Thu, 7 Dec 2023 09:18:50 +0000 (11:18 +0200)]
smbios: Fallback to the default DT if sysinfo nodes are missing

In order to fill in the SMBIOS tables U-Boot currently relies on a
"u-boot,sysinfo-smbios" compatible node.  This is fine for the boards
that already include such nodes.  However with some recent EFI changes,
the majority of boards can boot up distros, which usually rely on
things like dmidecode etc for their reporting.  For boards that
lack this special node the SMBIOS output looks like:

System Information
        Manufacturer: Unknown
        Product Name: Unknown
        Version: Unknown
        Serial Number: Unknown
        UUID: Not Settable
        Wake-up Type: Reserved
        SKU Number: Unknown
        Family: Unknown

This looks problematic since most of the info are "Unknown".  The DT spec
specifies standard properties containing relevant information like
'model' and 'compatible' for which the suggested format is
<manufacturer,model>. Unfortunately the 'model' string found in DTs is
usually lacking the manufacturer so we can't use it for both
'Manufacturer' and 'Product Name' SMBIOS entries reliably.

So let's add a last resort to our current smbios parsing.  If none of
the sysinfo properties are found, scan for those information in the
root node of the device tree. Use the 'model' to fill the 'Product
Name' and the first value of 'compatible' for the 'Manufacturer', since
that always contains one.

pre-patch:
Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Unknown
        Product Name: Unknown
        Version: Unknown
        Serial Number: 100000000bb24ceb
        UUID: 30303031-3030-3030-3061-613234636435
        Wake-up Type: Reserved
        SKU Number: Unknown
        Family: Unknown
[...]

and post patch:
Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: raspberrypi
        Product Name: Raspberry Pi 4 Model B Rev 1.1
        Version: Unknown
        Serial Number: 100000000bb24ceb
        UUID: 30303031-3030-3030-3061-613234636435
        Wake-up Type: Reserved
        SKU Number: Unknown
        Family: Unknown
[...]

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
12 months agosmbios: Simplify reporting of unknown values
Ilias Apalodimas [Thu, 7 Dec 2023 09:18:49 +0000 (11:18 +0200)]
smbios: Simplify reporting of unknown values

If a value is not valid during the DT or SYSINFO parsing,  we explicitly
set that to "Unknown Product" and "Unknown" for the product and
manufacturer respectively.  It's cleaner if we move the checks insisde
smbios_add_prop_si() and provide an alternative string in case the
primary is NULL or empty

pre-patch dmidecode
<snip>
Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Unknown
        Product Name: Unknown Product
        Version: Not Specified
        Serial Number: Not Specified
        UUID: Not Settable
        Wake-up Type: Reserved
        SKU Number: Not Specified
        Family: Not Specified

[...]

post-patch dmidecode:

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Unknown
        Product Name: Unknown
        Version: Unknown
        Serial Number: Unknown
        UUID: Not Settable
        Wake-up Type: Reserved
        SKU Number: Unknown
        Family: Unknown
[...]

While at it make smbios_add_prop_si() add a string directly if the prop
node is NULL and replace smbios_add_string() calls with
smbios_add_prop_si(ctx, NULL, ....)

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
12 months agopxe_utils: Increase feedback to user when fdt file is not found
Michael Trimarchi [Thu, 7 Dec 2023 14:28:19 +0000 (15:28 +0100)]
pxe_utils: Increase feedback to user when fdt file is not found

extlinux.conf can set fdtdir. fdtdir look for fdt file using
information found in the environment variable. The function does
not report any error in the case the file is not found

Scanning for bootflows in all bootdevs
Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------
Scanning global bootmeth 'efi_mgr':
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Scanning bootdev 'mmc@fa10000.bootdev':
  0  extlinux     ready   mmc          1  mmc@fa10000.bootdev.part_ /boot/extlinux/extlinux.conf
** Booting bootflow 'mmc@fa10000.bootdev.part_1' with extlinux
1:      am62x-sk-buildroot
Retrieving file: /boot/Image
append: console=ttyS2,115200n8 root=PARTUUID=c586a30c-0bf1-4323-aba8-779c814ee135 rw
rootfstype=ext4 rootwait earlycon=ns16550a,mmio32,0x02800000
Retrieving file: /boot/k3-am623_ccm_m3.dtb
Skipping fdtdir /boot/ for failure retrieving dts

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agocolibri-imx8x: configure usb hub to bypass mode
Andrejs Cainikovs [Wed, 20 Dec 2023 10:38:11 +0000 (11:38 +0100)]
colibri-imx8x: configure usb hub to bypass mode

This change configures Toradex Colibri iMX8X SoM USB
hub to bypass mode, and brings out of the reset state.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
12 months agocolibri-imx8x: remove -u-boot.dtsi include
Andrejs Cainikovs [Wed, 20 Dec 2023 10:38:10 +0000 (11:38 +0100)]
colibri-imx8x: remove -u-boot.dtsi include

This file is included automatically since quite some time now.

From documentation:

U-Boot automatically looks for and includes a file with updates
to the standard devicetree for your board, searching for them in
the same directory as the main file, in this order:

<orig_filename>-u-boot.dtsi
<CONFIG_SYS_SOC>-u-boot.dtsi
<CONFIG_SYS_CPU>-u-boot.dtsi
<CONFIG_SYS_VENDOR>-u-boot.dtsi
u-boot.dtsi

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
12 months agoapalis-imx8: remove -u-boot.dtsi include
Andrejs Cainikovs [Wed, 20 Dec 2023 10:38:09 +0000 (11:38 +0100)]
apalis-imx8: remove -u-boot.dtsi include

This file is included automatically since quite some time now.

From documentation:

U-Boot automatically looks for and includes a file with updates
to the standard devicetree for your board, searching for them in
the same directory as the main file, in this order:

<orig_filename>-u-boot.dtsi
<CONFIG_SYS_SOC>-u-boot.dtsi
<CONFIG_SYS_CPU>-u-boot.dtsi
<CONFIG_SYS_VENDOR>-u-boot.dtsi
u-boot.dtsi

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
12 months agoboard: phytec: phytec_som_detection: fix uninitialized bug
Yannic Moog [Wed, 20 Dec 2023 08:45:36 +0000 (09:45 +0100)]
board: phytec: phytec_som_detection: fix uninitialized bug

When som_type does not match any case, it is uninitialized and the
function still tries to print the SoM info. Rather, this is an error
condition and the function should abort prematurely. Highlight this by
printing an error message and returning early.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
12 months agoboard: phytec: som_detection: move definitions to source file
Yannic Moog [Wed, 20 Dec 2023 08:45:35 +0000 (09:45 +0100)]
board: phytec: som_detection: move definitions to source file

Move all function definitions in {phytec|imx8m}_som_detection from the
header to the source file to prevent potential linker error regarding
multiple definitions. Also move the #if blocks with the definitions.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
12 months agoboard: phytec: phytec_som_detection: fix eeprom_data zero check
Yannic Moog [Wed, 20 Dec 2023 08:45:34 +0000 (09:45 +0100)]
board: phytec: phytec_som_detection: fix eeprom_data zero check

In phytec_eeprom_data_init, after reading eeprom data into buffer, it is
checked whether all bytes are 0x0 by iterating over chunks of the
buffer. The offset, or index of the chunk, was never changed, leading to
repeated comparison of only the first chunk. Use array notation and
access chunk via array index to compare all chunks of the buffer.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
12 months agoboard: phytec: imx8m_som_detection: fix uninitialized pointer bug
Yannic Moog [Wed, 20 Dec 2023 08:45:33 +0000 (09:45 +0100)]
board: phytec: imx8m_som_detection: fix uninitialized pointer bug

Pointer in phytec_imx8m_detect was accessed without checking it first.
Fix this by moving the pointer check in front of any accesses.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
12 months agoboard: phytec: imx8m_som_detection: change phytec_imx8m_detect return type
Yannic Moog [Wed, 20 Dec 2023 08:45:32 +0000 (09:45 +0100)]
board: phytec: imx8m_som_detection: change phytec_imx8m_detect return type

phytec_imx8m_detect returns -1 on error, but the return type is u8
leading to 255 return values. Fix this by changing the return type to
int; there is no reason to keep it as u8 .

Signed-off-by: Yannic Moog <y.moog@phytec.de>
12 months agoconfigs: imx8m{m, n, p}_venice_defconfig: add arch_misc_init
Tim Harvey [Thu, 14 Dec 2023 16:25:42 +0000 (08:25 -0800)]
configs: imx8m{m, n, p}_venice_defconfig: add arch_misc_init

Enable call to arch_misc_init in order to probe the CAAM driver.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
12 months agoarm: dts: imx8mp-venice-gw72xx: add TPM device
Tim Harvey [Mon, 27 Nov 2023 19:37:23 +0000 (11:37 -0800)]
arm: dts: imx8mp-venice-gw72xx: add TPM device

Add the TPM device found on the GW72xx revision F PCB.

This hangs off of SPI2, uses gpio1_10 as a CS and gpio1_11 as RST#.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
12 months agoarm: dts: imx8mm-venice-gw72xx: add TPM device
Tim Harvey [Mon, 27 Nov 2023 19:36:58 +0000 (11:36 -0800)]
arm: dts: imx8mm-venice-gw72xx: add TPM device

Add the TPM device found on the GW72xx revision F PCB.

This hangs off of SPI2, uses gpio1_10 as a CS and gpio1_11 as RST#.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
12 months agomxs: Fix VDDx brownout interrupt disable/enable
Cody Green [Mon, 3 Jul 2023 20:57:00 +0000 (21:57 +0100)]
mxs: Fix VDDx brownout interrupt disable/enable

Incorrect registers HW_POWER_VDDIOCTRL, HW_POWER_VDDACTRL
and HW_POWER_VDDDCTRL are used in the current code to disable/enable
brownout interrupts in 'mxs_power_set_vddx()'.
Change register to HW_POWER_CTRL which contains brownout interrupt
enable bits ENIRQ_VDDIO_BO, ENIRQ_VDDA_BO and ENIRQ_VDDD_BO.

Signed-off-by: Cody Green <cody@londelec.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>
12 months agocommand: Move command completion temporary buffer to stack
Marek Vasut [Sat, 2 Dec 2023 20:52:31 +0000 (21:52 +0100)]
command: Move command completion temporary buffer to stack

The command completion temporary buffer seems to be only
used by the argv tokenizer, move it to stack. This saves
2 kiB from the binary size (depends on configuration) per:
$ aarch64-linux-gnu-readelf -s u-boot | sort -n -k 3

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agocommand: Allocate history buffer using calloc()
Marek Vasut [Sat, 2 Dec 2023 20:52:30 +0000 (21:52 +0100)]
command: Allocate history buffer using calloc()

The history buffer is currently a static array which can be some
10-40 kiB depending on configuration, and so adds considerably to
the U-Boot binary size. Allocate it dynamically instead to reduce
the U-Boot binary size.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
12 months agobootflow: Allow setting a cmdline arg with no value
Simon Glass [Wed, 29 Nov 2023 17:31:19 +0000 (10:31 -0700)]
bootflow: Allow setting a cmdline arg with no value

This is supposed to be supported by the 'bootflow cmd' command, at
least according to the help. There is a 'bootflow cmd clear' but it is
often more intuitive to use 'bootcmd cmd set' with an empty value.

Update the command to pass BOOTFLOWCL_EMPTY in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 months agobootm: Fix flags used for bootargs string substitution
Piotr Kubik [Fri, 24 Nov 2023 16:30:46 +0000 (17:30 +0100)]
bootm: Fix flags used for bootargs string substitution

Commit 51bb33846ad2 ("bootm: Support string substitution in
bootargs") introduced a feature of bootargs string substitution
and changed a flag used in bootm_process_cmdline_env() call
to be either true or false. With this flag value,
condition in bootm_process_cmdline()
`if (flags & BOOTM_CL_SUBST)` is never true
and process_subst() is never called.

Add a simple test to verify if substitution works OK.

Signed-off-by: Piotr Kubik <piotr.kubik@iopsys.eu>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agoarm: afs: Set the filesize env. var. on load
Robert Catherall [Thu, 23 Nov 2023 14:16:01 +0000 (14:16 +0000)]
arm: afs: Set the filesize env. var. on load

The `afs load` command copies data to RAM. Set the filesize
environment variable to record how much data was 'loaded'

Signed-off-by: Robert Catherall <robert.catherall@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
12 months agorsa: use pkcs11 uri as defined in rfc7512
Ayoub Zaki [Sat, 26 Aug 2023 11:53:29 +0000 (13:53 +0200)]
rsa: use pkcs11 uri as defined in rfc7512

pkcs11 : change engine uri to use full pk11-URI as defined in:

https://www.rfc-editor.org/rfc/rfc7512.html
Signed-off-by: Ayoub Zaki <ayoub.zaki@embetrix.com>
12 months agoimxtract: specify max gunzip size
Nikita Shubin [Mon, 19 Dec 2022 08:05:27 +0000 (11:05 +0300)]
imxtract: specify max gunzip size

Specify max gunzip size from config to override SYS_XIMG_LEN
default value wich is 0x800000. In case we have a large portion of FIT
image, for example gzipped kernel with decompressed size large than
0x800000 we should enlarge imxract area, otherwise extracting it will
fail.

It used to be a hardcoded define in cmd/ximg.c and we are moving it to
config.

Signed-off-by: Nikita Shubin <n.shubin@yadro.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agoMerge tag 'u-boot-amlogic-next-20231220' of https://source.denx.de/u-boot/custodians...
Tom Rini [Wed, 20 Dec 2023 13:34:12 +0000 (08:34 -0500)]
Merge tag 'u-boot-amlogic-next-20231220' of https://source.denx.de/u-boot/custodians/u-boot-amlogic into next

- Add support for new GXL MDIO mux, with driver and Linux DT sync from v6.4

12 months agoMerge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra into...
Tom Rini [Tue, 19 Dec 2023 20:16:13 +0000 (15:16 -0500)]
Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra into next

This PR contains 4 patchsets:

1. PMIC GPIO cells bringup. Created drivers for MAX7663 and Palmas
PMICs and gpio-uclass patch isolated behind configs for these 2
drivers. No unintentional size increase on any board. (proposed
2023-11-06 without any reaction)

2. Simple PLL clocks support in common tegra clock code which allows
use of simple PLL the same way main PLLs are used (before only
clock_start_pll was available). PLLD2 is an example of simple PLL, it
is used as a video subsystem parent clock and was used to test this
code. So far everything worked as expected. (proposed 2023-11-16
without any reaction)

3. A small patch for tegra emmc to allow pass max frequency from
device tree since some devices may not support full speed.

4. Pinmux DM conversion. Patchset consists of commit with DM wrapper
for existing pinmux code for t20/t30/t114, pinmux and funcmux files
relocation into a dedicated folder inside pinctrl, conversion of some
tegra boards to device tree pinmux setup.

12 months agoboard: compal: paz00: clean up the board
Svyatoslav Ryhel [Sat, 2 Dec 2023 08:08:02 +0000 (10:08 +0200)]
board: compal: paz00: clean up the board

Since implementation of pinctrl driver for T20 Paz00 can switch
to device tree pinmux setup along with remove of board pinmux
and some minor device tree and defconfig tweaks.

Tested-by: Agneli <poczt@protonmail.ch> # Toshiba AC100 T20
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agoboard: htc: endeavoru: switch to DM pinmux
Svyatoslav Ryhel [Tue, 28 Nov 2023 11:43:31 +0000 (13:43 +0200)]
board: htc: endeavoru: switch to DM pinmux

Drop the pinmux setup in the board in favor of setting it up in
the device tree. Device tree nodes match nodes used for the Linux
device tree and are set according to the downstream kernel. 

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agoboard: asus: transformer: switch to DM pinmux
Svyatoslav Ryhel [Mon, 27 Nov 2023 17:20:21 +0000 (19:20 +0200)]
board: asus: transformer: switch to DM pinmux

Drop the pinmux setup in the board in favor of setting it up in
the device tree. Device tree nodes match nodes used in the Linux
device tree. 

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agoboard: lg: x3-t30: switch to DM pinmux
Svyatoslav Ryhel [Mon, 27 Nov 2023 17:08:32 +0000 (19:08 +0200)]
board: lg: x3-t30: switch to DM pinmux

Drop the pinmux setup in the board in favor of setting it up in
the device tree. Device tree nodes match nodes used for the Linux
device tree and are set according to the service manual.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agoboard: asus: grouper: switch to DM pinmux
Svyatoslav Ryhel [Mon, 27 Nov 2023 16:16:50 +0000 (18:16 +0200)]
board: asus: grouper: switch to DM pinmux

Drop the pinmux setup in the board in favor of setting it up in
the device tree. Device tree nodes match nodes used in the Linux
device tree.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agodrivers: pinctrl: tegra: incorporate existing code
Svyatoslav Ryhel [Mon, 27 Nov 2023 09:54:21 +0000 (11:54 +0200)]
drivers: pinctrl: tegra: incorporate existing code

Move all existing pinmux and funcmux code into a dedicated folder in
pinctrl to simplify further maintenance.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agodrivers: pinctrl: create Tegra DM pinctrl driver
Svyatoslav Ryhel [Sun, 26 Nov 2023 15:54:03 +0000 (17:54 +0200)]
drivers: pinctrl: create Tegra DM pinctrl driver

The existing pinctrl driver available for Tegra SOC is well
designed, but it lacks DM support. Let's add a DM compatible
overlay, which allows use of the device tree, along with preserving
backward compatibility with all existing setups and the ability
to use it in SPL board configuration stage.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>