[PATCH v2 1/5] image: Correct load_bug typo

2023-11-11 Thread Simon Glass
Correct a typo in the function comment for image_decomp(). Signed-off-by: Simon Glass --- (no changes since v1) include/image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/image.h b/include/image.h index 2e3cf839ee36..0fe67852c563 100644 --- a/include/image.h

[PATCH v2 0/5] bootm: Handle compressed arm64 images with bootm

2023-11-11 Thread Simon Glass
This little series corrects a problem I noticed with arm64 images, where the kernel is not recognised if compression is used: U-Boot> tftp image.fit Using ethernet@7d58 device TFTP from server 192.168.4.7; our IP address is 192.168.4.147 Filename 'image.fit'. Load address:

[PATCH v2 3/5] bootm: Allow omitting the load address

2023-11-11 Thread Simon Glass
The kernel_noload image type indicates that no loading is to be done by U-Boot. This works well when the image is uncompressed. When the image is compressed, loading is of course required. The load address in the FIT is used for loading. However a FIT built from Linux v6.6 supports about 990

[PATCH v2 2/5] image: Show the load address when decompressing

2023-11-11 Thread Simon Glass
The destination address for decompression (or copying) is useful information. Show this to the user while booting, e.g.: Uncompressing Kernel Image (no loading done) to 208 Signed-off-by: Simon Glass --- (no changes since v1) boot/image.c | 13 + 1 file changed, 9

[PATCH v2 5/5] boot: Don't allow kernel_noload with compression

2023-11-11 Thread Simon Glass
It is not possible to execute the kernel in-place without loading it. Detect this and show an error, to avoid a crash. Signed-off-by: Simon Glass --- Changes in v2: - Add a 'success' case to the cover letter - Redo how the arm64 support is implemented boot/bootm.c | 4 1 file changed, 4

Re: [PATCH 2/3] cmd: acpi: fix acpi list command

2023-11-11 Thread Heinrich Schuchardt
On 11/12/23 04:08, Simon Glass wrote: Hi Heinrich, On Sat, 11 Nov 2023 at 06:42, Heinrich Schuchardt wrote: ACPI tables may comprise either RSDT, XSDT, or both. The current code fails to check the presence of the RSDT table before accessing it. This leads to an exception if the RSDT table is

Re: [PATCH 1/1] tpm: remove superfluous check in tpm_tis_send()

2023-11-11 Thread Ilias Apalodimas
On Sun, 12 Nov 2023 at 05:08, Simon Glass wrote: > > On Fri, 10 Nov 2023 at 17:35, Heinrich Schuchardt > wrote: > > > > Checking if variable chip is NULL after dereferencing it makes no sense. > > As discribed in [1] it is not expected that the variable can ever be NULL. > > > > [1] Re: [PATCH]

[PATCH 05/29] bootstd: Introduce programmable boot

2023-11-11 Thread Simon Glass
At present bootstd requires CONFIG_CMDLINE to operate. Add a new 'programmable' boot which can be used when no command line is available. For now it does almost nothing, since most bootmeths require the command line. Signed-off-by: Simon Glass --- boot/Kconfig | 11 ++

[PATCH 09/29] image: Tidy up genimg_get_kernel_addr_fit()

2023-11-11 Thread Simon Glass
This function does not modify its first argument, so mark it const. Also move the comments to the header file and expand them to provide more useful information. Signed-off-by: Simon Glass --- boot/bootm.c | 3 +-- boot/image-board.c | 17 + include/image.h| 29

[PATCH 04/29] bootstd: Add missing header file from bootdev.h

2023-11-11 Thread Simon Glass
Add a dm/uclass-id.h to the bootdev header file, since it uses enum uclass_id Signed-off-by: Simon Glass --- include/bootdev.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/bootdev.h b/include/bootdev.h index b079a91b5b7f..c1362673d418 100644 --- a/include/bootdev.h +++

[PATCH 27/29] bootm: Adjust the parameters of bootm_find_images()

2023-11-11 Thread Simon Glass
Rather than passing it all the command-line args, pass in the pieces that it needs. These are the image address, the ramdisk address/name and the FDT address/name. Ultimately this will allow usage of this function without being called from the command line. Move the function comment to the

[PATCH 26/29] bootm: optee: Drop special call to bootm_find_other()

2023-11-11 Thread Simon Glass
The normal bootm flow calls bootm_find_other() can call the BOOTM_STATE_FINDOTHER state as part of its processing. Fix the condition there so that this hack can be removed. Also drop the confusing check for the OS type, since do_bootm_tee() is only called if the condition is met - see

[PATCH 28/29] bootm: Add a function to check overlap

2023-11-11 Thread Simon Glass
Move this code into a function to reduce code size and make it easier to understand. Drop the unnecessary 0x to help a little with code size. Use this in bootm_find_images() Signed-off-by: Simon Glass --- boot/bootm.c | 51 ++- 1 file changed,

Re: [PATCH] mmc: renesas-sdhi: Disable clock after tuning reset when possible

2023-11-11 Thread Marek Vasut
On 11/6/23 11:24, Jaehoon Chung wrote: -Original Message- From: Marek Vasut Sent: Monday, November 6, 2023 7:43 AM To: u-boot@lists.denx.de Cc: Marek Vasut ; Jaehoon Chung ; Nobuhiro Iwamatsu ; Paul Barker ; Peng Fan Subject: [PATCH] mmc: renesas-sdhi: Disable clock after tuning

[PATCH 25/29] bootm: efi: Drop special call to bootm_find_other()

2023-11-11 Thread Simon Glass
The normal bootm flow calls bootm_find_other() can call the BOOTM_STATE_FINDOTHER state as part of its processing. Fix the condition there so that this hack can be removed. -off-by: Simon Glass Signed-off-by: Simon Glass --- boot/bootm.c| 10 +- boot/bootm_os.c | 6 -- 2

[PATCH 24/29] bootm: Simplify Android ramdisk addr in bootm_find_images()

2023-11-11 Thread Simon Glass
The Android mechanism uses the loadaddr envrionment-variable to get the load address, if none is provided. This is equivalent to image_load_addr so use that instead, converting it to a string as needed. This change will permit passing img_addr to this function, in a future change. Signed-off-by:

[PATCH 29/29] bootm: Reduce arguments to bootm_find_other()

2023-11-11 Thread Simon Glass
Rather than passing the full list of command arguments, pass only those which are needed. Signed-off-by: Simon Glass --- boot/bootm.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c index a803b0749be0..b0eecbb0dd3c 100644

[PATCH 03/29] treewide: Tidy up semicolon after command macros

2023-11-11 Thread Simon Glass
The U_BOOT_CMD_COMPLETE() macro has a semicolon at the end, perhaps inadvertently. Some code has taken advantage of this. Tidy this up by dropping the semicolon from the macro and adding it to macro invocations as required. Signed-off-by: Simon Glass --- board/freescale/common/vid.c | 2 +-

[PATCH 15/29] bootm: Move error printing out of boot_get_kernel()

2023-11-11 Thread Simon Glass
The same error message is printed in two places. Move it out to the caller so we can avoid passing in the command name. Leave the bootstage handling where it is. Signed-off-by: Simon Glass --- boot/bootm.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git

[PATCH 10/29] bootm: Reduce arguments to boot_get_kernel()

2023-11-11 Thread Simon Glass
This function only uses one argument and just needs to know the name of the command which called it. Adjust the function to use only what it needs. This will make it easier to call from a non-command context. Tidy up the function comment while we are here. Signed-off-by: Simon Glass ---

[PATCH 07/29] bootm: Simplify arguments for bootm_pre_load()

2023-11-11 Thread Simon Glass
Move the argument decoding to the caller, to avoid needing to pass the command-line arguments. Add a function comment while we are here. Signed-off-by: Simon Glass --- boot/bootm.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/boot/bootm.c

[PATCH 06/29] bootm: Drop arguments from bootm_start()

2023-11-11 Thread Simon Glass
This function does not use its arguments. Drop them. Signed-off-by: Simon Glass --- boot/bootm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c index cb61485c226c..fda97706fc26 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -69,8 +69,7 @@

[PATCH 20/29] bootm: Pass image buffer to boot_get_fdt()

2023-11-11 Thread Simon Glass
Rather than having boot_get_fdt() calculate this, move the calculation into the caller. This removes the access to argv[0] in this function, so we can later refactor it to just accept argv[2] instead of the whole argv[]. Move the function comment to the header file and fix the u8 argument, while

[PATCH 19/29] bootm: Drop #ifdef in bootm_find_images()

2023-11-11 Thread Simon Glass
The OF_LIBFDT #ifdef makes it harder to use a local variable for that code block. Convert it to if() instead. Signed-off-by: Simon Glass --- boot/bootm.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c

[PATCH 23/29] bootm: Reduce arguments to boot_get_loadables()

2023-11-11 Thread Simon Glass
This function only uses two arguments. The 'arch' always has a constant value, so drop it. This simplifies the function call. Tidy up the function comment while we are here. Signed-off-by: Simon Glass --- boot/bootm.c | 3 +-- boot/image-board.c | 6 +++--- include/image.h| 24

[PATCH 16/29] bootm: Reduce arguments to boot_find_os()

2023-11-11 Thread Simon Glass
This function only uses one argument so pass it in directly. Signed-off-by: Simon Glass --- boot/bootm.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c index ec43d4e7e8ba..2358d68c2861 100644 --- a/boot/bootm.c +++ b/boot/bootm.c

[PATCH v2 3/4] image: Show the load address when decompressing

2023-11-11 Thread Simon Glass
The destination address for decompression (or copying) is useful information. Show this to the user while booting, e.g.: Uncompressing Kernel Image (no loading done) to 208 Signed-off-by: Simon Glass --- (no changes since v1) boot/image.c | 13 + 1 file changed, 9

[PATCH v2 2/4] bootm: Move arm64-image processing later

2023-11-11 Thread Simon Glass
If the image is compressed, then the existing check fails, since the header is wrong. Move the check later in the boot process, after the kernel is decompressed. This allows use of bootm with compressed kernels, while still permitting an uncompressed kernel to be used. Signed-off-by: Simon Glass

[PATCH v2 1/4] bootm: Allow ignoring the load address with kernel_noload

2023-11-11 Thread Simon Glass
This image type is supposed to ignore the load address. But at present it fails if the load address is missing. If it is zero, the image is loaded at address 0, which may not work on all boards. Make use of the kernel_addr_r environment variable, instead, since this seems to be a more reliable

[PATCH v2 4/4] image: Correct load_bug typo

2023-11-11 Thread Simon Glass
Correct a typo in the function comment for image_decomp(). Signed-off-by: Simon Glass --- Changes in v2: - Add a 'success' case to the cover letter include/image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/image.h b/include/image.h index

[PATCH v1 0/3] Xilinx SPI driver enhancements

2023-11-11 Thread Mayuresh Chitale
This series makes the Xilinx XPS SPI driver compatible with the MMC_SPI driver and also includes an enhacement from the corresponding Linux driver. Mayuresh Chitale (3): drivers: xilinx_spi: Use udevice in start_tranfer drivers: xilinx_spi: Add xfer callback drivers: xilinx_spi: Probe

[PATCH v1 1/3] drivers: xilinx_spi: Use udevice in start_tranfer

2023-11-11 Thread Mayuresh Chitale
Modify start_transfer and related functions to take a udevice parameter as input instead of spi_slave. This is needed so that start_transfer can be used directly via the xfer callback. Also fix a compiler warning. Signed-off-by: Mayuresh Chitale --- drivers/spi/xilinx_spi.c | 32

[PATCH v1 2/3] drivers: xilinx_spi: Add xfer callback

2023-11-11 Thread Mayuresh Chitale
Add the xfer callback which is used by the MMC_SPI driver and generally by the dm_spi_xfer callback. Signed-off-by: Mayuresh Chitale --- drivers/spi/xilinx_spi.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c index

[PATCH 01/29] arm: x86: Drop discarding of command linker-lists

2023-11-11 Thread Simon Glass
Since we can now cleanly disable CMDLINE when needed, drop the rules which discard the command code. It will not be built in the first place. Signed-off-by: Simon Glass --- arch/arm/cpu/u-boot.lds | 3 --- arch/x86/cpu/u-boot-64.lds | 4 arch/x86/cpu/u-boot-spl.lds | 4

[PATCH 17/29] bootm: Reduce arguments to boot_get_ramdisk()

2023-11-11 Thread Simon Glass
This function normally only uses one argument so pass it in directly. Move comments to the header file so could one day include these functions in API docs. Fix up the u8 argument while here, since it avoids the compiler having to mask the value on some machines. The Android case here is bit

[PATCH 13/29] bootm: Use the error return from boot_get_kernel()

2023-11-11 Thread Simon Glass
Rather than looking for a zero-sized image, use the error code returned to determine if things are OK. Signed-off-by: Simon Glass --- boot/bootm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c index 57eaa1ff10df..5e3b5e940734 100644 ---

[PATCH 18/29] fdt: Allow use of fdt_support inside if() statements

2023-11-11 Thread Simon Glass
Most of the fdt_support.h header file is included only if OF_LIBFDT or OF_CONTROL are enabled. This means that calling functions defined in that file must happen inside an #ifdef This is unnecessary, so reduce the condition to just !USE_HOSTCC Signed-off-by: Simon Glass ---

[PATCH 12/29] bootm: Adjust boot_get_kernel() to return an error

2023-11-11 Thread Simon Glass
This function obtains lots of error codes and then throws them away. Update it to return the error, moving the image pointer to an argument. Signed-off-by: Simon Glass --- boot/bootm.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git

[PATCH 22/29] bootm: Reduce arguments to boot_get_fpga()

2023-11-11 Thread Simon Glass
This function only uses two arguments. The 'arch' always has a constant value, so drop it. This simplifies the function call. Signed-off-by: Simon Glass --- boot/bootm.c | 3 +-- boot/image-board.c | 5 ++--- include/image.h| 9 +++-- 3 files changed, 10 insertions(+), 7

[PATCH v2 2/3] tpm: Convert sandbox-focussed tests to C

2023-11-11 Thread Simon Glass
Some of the Python tests are a pain because they don't reset the TPM state before each test. Driver model tests do this, so convert the tests to C. This means that these tests won't run on real hardware, but we have tests which do TPM init, so there is still enough coverage. Rename and update

Re: [PATCH v5 1/2] arm: mediatek: add mt8195 SOC support

2023-11-11 Thread Macpaul Lin
Marcel Ziswiler 於 2023年11月11日 週六 上午4:24寫道: > [snip] > > Changes for v5: > > - Fix Copyright year to 2023. > > - Fix memory map in dram_init() to support 8GB onboard memory. > > - Add '#if !IS_ENABLED(CONFIG_SYSRESET)' with reset_cpu(). > > - Correct reset_cpu() function prototype. > > -

[PATCH v2 2/2] cmd: acpi: fix acpi list command

2023-11-11 Thread Heinrich Schuchardt
ACPI tables may comprise either RSDT, XSDT, or both. The current code fails to check the presence of the RSDT table before accessing it. This leads to an exception if the RSDT table is not provided. The XSDT table takes precedence over the RSDT table. Addresses in the XSDT table are 64-bit.

[PATCH v2 0/2] cmd: acpi: fix acpi list command

2023-11-11 Thread Heinrich Schuchardt
The size of the ACPI table header is not a multiple of 8. We have to mark struct acpi_xsdt as packed to correctly access field Entry. Add a unit test for the offsets of field Entry in the RSDT and XSDT tables. ACPI tables may comprise either RSDT, XSDT, or both. The current code fails to check

[PATCH v2 1/2] acpi: fix struct acpi_xsdt

2023-11-11 Thread Heinrich Schuchardt
The size of the ACPI table header is not a multiple of 8. We have to mark struct acpi_xsdt as packed to correctly access field Entry. Add a unit test for the offsets of field Entry in the RSDT and XSDT tables. Signed-off-by: Heinrich Schuchardt --- v2: add unit test ---

Re: [PATCH 3/3] test: dm: adjust ACPI test

2023-11-11 Thread Simon Glass
Hi Heinrich, On Sat, 11 Nov 2023 at 06:42, Heinrich Schuchardt wrote: > > Adjust the ACPI test to match the changed output format of the 'acpi list' > command. > > Signed-off-by: Heinrich Schuchardt > --- > test/dm/acpi.c | 18 +- > 1 file changed, 9 insertions(+), 9

[PATCH v2 4/5] bootm: Move arm64-image processing later

2023-11-11 Thread Simon Glass
If the image is compressed, then the existing check fails, since the header is wrong. Move the check later in the boot process, after the kernel is decompressed. This allows use of bootm with compressed kernels, while still permitting an uncompressed kernel to be used. Signed-off-by: Simon Glass

[PATCH v2] pci: xilinx: Enable MMIO region

2023-11-11 Thread Mayuresh Chitale
The host bridge MMIO region is disabled by default due to which MMIO accesses cause an exception. Fix it by setting the bridge enable bit. This change is ported from the linux pcie-xilinx driver. Signed-off-by: Mayuresh Chitale Reviewed-by: Michal Simek --- Changes in v2: Add Reviewed-by

[PATCH v2] drivers: pcie_xilinx: Fix "reg" not found error

2023-11-11 Thread Mayuresh Chitale
Fix the driver to use the dev_read_addr_size API to fetch the reg property from the DT. Signed-off-by: Mayuresh Chitale --- Changes in v2: - Remove global_data.h from include - Use devm_ioremap instead of map_phsymem drivers/pci/pcie_xilinx.c | 26 +- 1 file

[PATCH v2] net: axi_emac: Use reg property for DMA registers

2023-11-11 Thread Mayuresh Chitale
As per the xlnx,axi-ethernet-1.00.a DT documentation in linux, the AXI DMA registers can be obtained via the reg property or via a separate node for the axistream DMA controller. Currently only the latter is supported, so add support to fetch the DMA controller registers from the "reg" property.

[PATCH v2 3/3] tpm: Drop unwanted special cases for sandbox

2023-11-11 Thread Simon Glass
These don't seem to be needed. Add a few notes about what to do next. Also mention parallel tests in at the top of thefile. Signed-off-by: Simon Glass Reviewed-by: Ilias Apalodimas --- (no changes since v1) test/py/tests/test_tpm2.py | 46 +- 1 file

[PATCH v2 0/4] bootm: Handle compressed arm64 images with bootm

2023-11-11 Thread Simon Glass
This little series corrects a problem I noticed with arm64 images, where the kernel is not recognised: U-Boot> tftp image.fit Using ethernet@7d58 device TFTP from server 192.168.4.7; our IP address is 192.168.4.147 Filename 'image.fit'. Load address: 0x100 Loading:

[PATCH v2 0/3] tpm: Start to tidy up TPM tests

2023-11-11 Thread Simon Glass
This series is a starting point only. It tries to provide some direction for how the TPM tests should be run on real hardware and on sandbox. For sandbox, things are relatively easy since the TPM is reset before each test. Tests should start up the TPM before doing anything. Tests can be run in

[PATCH v2 1/3] tpm: sandbox: Support self-test continue in emulator

2023-11-11 Thread Simon Glass
Add support for the self-test continue command in the TPM v1.2 emulator, to match the functionality in the TPM v2 emulator. Signed-off-by: Simon Glass Reviewed-by: Ilias Apalodimas --- (no changes since v1) drivers/tpm/tpm_tis_sandbox.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH 2/3] cmd: acpi: fix acpi list command

2023-11-11 Thread Simon Glass
Hi Heinrich, On Sat, 11 Nov 2023 at 06:42, Heinrich Schuchardt wrote: > > ACPI tables may comprise either RSDT, XSDT, or both. The current code fails > to check the presence of the RSDT table before accessing it. This leads to > an exception if the RSDT table is not provided. > > The XSDT table

Re: [PATCH] configs: rockpro64: Enable SPI command and full BOOTSTD

2023-11-11 Thread Simon Glass
Hi Shantur, On Fri, 10 Nov 2023 at 17:14, Shantur Rathore wrote: > > RockPro64 has a 16MB onboard SPI chip and current u-boot takes > around 2MB, we can enable more features. What takes 2MB? I have never seen U-Boot get close to that large! Regards, Simon > Updating config to enable SPI

Re: [PATCH] virtio: rng: gracefully handle 0 byte returns

2023-11-11 Thread Simon Glass
Hi Andre, On Fri, 10 Nov 2023 at 07:16, Andre Przywara wrote: > > On Fri, 10 Nov 2023 05:53:59 -0700 > Simon Glass wrote: > > Hi Simon, > > > On Tue, 7 Nov 2023 at 09:09, Andre Przywara wrote: > > > > > > According to the virtio v1.x "entropy device" specification, a virtio-rng > > > device is

Re: [PATCH 1/3] acpi: fix struct acpi_xsdt

2023-11-11 Thread Simon Glass
On Sat, 11 Nov 2023 at 06:42, Heinrich Schuchardt wrote: > > The size of the ACPI table header is not a multiple of 8. We have to mark > struct acpi_xsdt as packed to correctly read the entries. > > Signed-off-by: Heinrich Schuchardt > --- > include/acpi/acpi_table.h | 2 +- > 1 file changed, 1

Re: [PATCH 1/1] tpm: remove superfluous check in tpm_tis_send()

2023-11-11 Thread Simon Glass
On Fri, 10 Nov 2023 at 17:35, Heinrich Schuchardt wrote: > > Checking if variable chip is NULL after dereferencing it makes no sense. > As discribed in [1] it is not expected that the variable can ever be NULL. > > [1] Re: [PATCH] tpm: avoid NULL pointer dereference in tpm_tis_send() >

[PATCH v1 3/3] drivers: xilinx_spi: Probe fifo_depth at runtime

2023-11-11 Thread Mayuresh Chitale
If the fifo-size DT parameter is not provided then probe the controller's fifo depth at runtime. This is ported from a patch in the Linux Xilinx SPI driver. Signed-off-by: Mayuresh Chitale Link: https://lore.kernel.org/r/1422029330-10971-5-git-send-email-ricardo.riba...@gmail.com ---

[PATCH 00/29] bootm: Refactoring to reduce reliance on CMDLINE (part A)

2023-11-11 Thread Simon Glass
It would be useful to be able to boot an OS when CONFIG_CMDLINE is disabled. This could allow reduced code size. Standard boot provides a way to handle programmatic boot, without scripts, so such a feature is possible. The main impediment is the inability to use the booting features of U-Boot

[PATCH 02/29] mmc: env: Unify the U_BOOT_ENV_LOCATION conditions

2023-11-11 Thread Simon Glass
The declaration of U_BOOT_ENV_LOCATION() uses a different #ifdef condition from the code it calls. Use the same condition to avoid a build warning if CONFIG_CMD_SAVEENV is disabled. Signed-off-by: Simon Glass --- env/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 08/29] bootm: Move boot_get_kernel() higher in the file

2023-11-11 Thread Simon Glass
Move this code and image_get_kernel() higher in the file to avoid the need for a forward declaration. No attempt is made to remove #ifdefs or adjust the code in any other way. Signed-off-by: Simon Glass --- boot/bootm.c | 376 +-- 1 file

[PATCH 21/29] bootm: Reduce arguments to boot_get_fdt()

2023-11-11 Thread Simon Glass
This function only uses one argument from bootm (argv[2]) so pass it in directly. Signed-off-by: Simon Glass --- boot/bootm.c | 5 +++-- boot/image-fdt.c | 9 +++-- include/image.h | 5 ++--- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c

[PATCH 11/29] image: Document error codes from fit_image_load()

2023-11-11 Thread Simon Glass
Put a list of these in the function documentation so it is easier to decode what went wrong. Signed-off-by: Simon Glass --- include/image.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/image.h b/include/image.h index 798c5f9c16e4..d37e44721672 100644 ---

[PATCH 14/29] bootstage: Drop BOOTSTAGE_ID_FIT_KERNEL_INFO

2023-11-11 Thread Simon Glass
This is a misnomer since we don't necessarily know that the image is a FIT. Use the existing BOOTSTAGE_ID_CHECK_IMAGETYPE instead. Signed-off-by: Simon Glass --- boot/bootm.c| 2 +- include/bootstage.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/boot/bootm.c

[PATCH] arm: dts: rockpro64: Add RockPro64 smbios

2023-11-11 Thread Shantur Rathore
Signed-off-by: Shantur Rathore --- arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi index 732727d9b0..a4453e76f6 100644 ---

Re: [PATCH] drivers: xilinx_spi: Fixes for MMC_SPI

2023-11-11 Thread mchitale
Hi Michal, On Thu, 2023-11-02 at 09:37 +0100, Michal Simek wrote: > On 11/2/23 09:23, Mayuresh Chitale wrote: > > Add the xfer callback which is used by the MMC_SPI driver and > > generally by > > the dm_spi_xfer callback. Also probe the fifo_depth during init as > > is > > done in the linux

Re: [PATCH] net: axi_emac: Use reg property for DMA registers

2023-11-11 Thread mchitale
Hi Michal, On Thu, 2023-11-02 at 10:15 +0100, Michal Simek wrote: > > On 11/2/23 09:23, Mayuresh Chitale wrote: > > As per the xlnx,axi-ethernet-1.00.a DT documentation in linux, the > > AXI > > DMA registers can be obtained via the reg property or via a > > separate > > node for the axistream

Re: [PATCH] drivers: pcie_xilinx: Fix "reg" not found error

2023-11-11 Thread mchitale
Hi Michal, On Thu, 2023-11-02 at 10:05 +0100, Michal Simek wrote: > > On 11/2/23 09:23, Mayuresh Chitale wrote: > > Fix the driver to use the dev_read_addr_size API to fetch the reg > > property from the DT. > > > > Signed-off-by: Mayuresh Chitale > > --- > > drivers/pci/pcie_xilinx.c | 22

[PATCH v1 0/2] Allwinner R329/D1/R528/T113 SPI support

2023-11-11 Thread Maksim Kiselev
This series adds support for SPI controller that pesent on GEN_NCAT2 Allwinner SOCs (R329/D1/R528/T113). In addition to changes in spi-sunxi U-boot driver, the series also provides SPI controller support in SPL for R528/T113 SoCs. Maksim Kiselev (2): sunxi: SPL SPI: Add SPI boot support for

[PATCH v1 1/2] sunxi: SPL SPI: Add SPI boot support for the Allwinner R528/T113 SoCs

2023-11-11 Thread Maksim Kiselev
R528/T113 SoCs uses the same SPI IP as the H6, also have the same clocks and reset bits layout, but the CCU base is different. Another difference is that the new SoCs do not have a clock divider inside. Instead of this we should configure sample mode depending on input clock rate. The pin

[PATCH v1 2/2] spi: sunxi: Add support for R329/D1/R528/T113 SPI controller

2023-11-11 Thread Maksim Kiselev
These SoCs have two SPI controllers that are quite similar to the SPI on previous Allwinner SoCs. The main difference is that new SoCs don't have a clock divider (SPI_CCR register) inside SPI IP. Instead SPI sample mode should be configured depending on the input clock. For now SPI input clock

[PATCH 0/3] cmd: acpi: fix acpi list command

2023-11-11 Thread Heinrich Schuchardt
ACPI tables may comprise either RSDT, XSDT, or both. The current code fails to check the presence of the RSDT table before accessing it. This leads to an exception if the RSDT table is not provided. Our definition of the XSDT table structure is not correctly packed. The XSDT table takes

[PATCH] ARM: dts: stm32f769-disco: rework ltdc node

2023-11-11 Thread Dario Binacchi
With commit f479f5dbb7ac ("ARM: dts: stm32: add ltdc support on stm32f746 MCU"), which adds the 'ltdc' node in stm32f746.dtsi, we can simplify stm32f769-disco-uboot.dtsi and align stm32f769-disco.dtsi with the kernel version. Signed-off-by: Dario Binacchi ---

Re: [PATCH] virtio: rng: gracefully handle 0 byte returns

2023-11-11 Thread Heinrich Schuchardt
On 11/10/23 15:16, Andre Przywara wrote: On Fri, 10 Nov 2023 05:53:59 -0700 Simon Glass wrote: Hi Simon, On Tue, 7 Nov 2023 at 09:09, Andre Przywara wrote: According to the virtio v1.x "entropy device" specification, a virtio-rng device is supposed to always return at least one byte of

[PATCH 2/2] clk: stm32f: fix setting of LCD clock

2023-11-11 Thread Dario Binacchi
Set pllsaidivr only if the PLLSAIR output frequency is an exact multiple of the pixel clock rate. Otherwise, we search through all combinations of pllsaidivr * pllsair and use the one which gives the rate closest to requested one. Fixes: 5e993508cb25 ("clk: clk_stm32f: Add set_rate for LTDC

[PATCH 1/2] clk: stm32f: fix setting of division factor for LCD_CLK

2023-11-11 Thread Dario Binacchi
The value to be written to the register must be appropriately shifted, as is correctly done in other parts of the code. Fixes: 5e993508cb25 ("clk: clk_stm32f: Add set_rate for LTDC clock") Signed-off-by: Dario Binacchi --- drivers/clk/stm32/clk-stm32f.c | 3 ++- 1 file changed, 2

Re: [PATCH v7 2/2] schemas: Add some common reserved-memory usages

2023-11-11 Thread Ard Biesheuvel
On Sat, 11 Nov 2023 at 04:20, Chiu, Chasel wrote: > > > Just sharing some usage examples from UEFI/EDK2 scenario. > To support ACPI S4/Hibernation, memory map must be consistent before entering > and after resuming from S4, in this case payload may need to know previous > memory map from

[PATCH 2/3] cmd: acpi: fix acpi list command

2023-11-11 Thread Heinrich Schuchardt
ACPI tables may comprise either RSDT, XSDT, or both. The current code fails to check the presence of the RSDT table before accessing it. This leads to an exception if the RSDT table is not provided. The XSDT table takes precedence over the RSDT table. Addresses in the XSDT table are 64-bit.

[PATCH 3/3] test: dm: adjust ACPI test

2023-11-11 Thread Heinrich Schuchardt
Adjust the ACPI test to match the changed output format of the 'acpi list' command. Signed-off-by: Heinrich Schuchardt --- test/dm/acpi.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/dm/acpi.c b/test/dm/acpi.c index 5997bda649..6752beb489 100644

[PATCH 1/3] acpi: fix struct acpi_xsdt

2023-11-11 Thread Heinrich Schuchardt
The size of the ACPI table header is not a multiple of 8. We have to mark struct acpi_xsdt as packed to correctly read the entries. Signed-off-by: Heinrich Schuchardt --- include/acpi/acpi_table.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/acpi/acpi_table.h

[PATCH 1/1] acpi: cannot have RSDT above 4 GiB

2023-11-11 Thread Heinrich Schuchardt
The field RsdtAddress has only 32 bit. The RSDT table cannot be located beyond 4 GiB. Signed-off-by: Heinrich Schuchardt --- lib/acpi/base.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/lib/acpi/base.c b/lib/acpi/base.c index

[PATCH] fs: btrfs: fix reading when length specified

2023-11-11 Thread Sam Edwards
The btrfs read function limits the read length to ensure that it and the read offset do not together exceed the size of the file. However, this size was only being queried if the read length was passed a value of zero (meaning "whole file"), and the size is defaulted to 0 otherwise. This means the

[PATCH] net: designware: Support high memory nodes

2023-11-11 Thread Nils Le Roux
Some platforms (such as the Lichee Pi 4A) have their dwmac device addressable only in high memory space. Storing the node's base address on 32 bits is not possible in such case. Use platform's physical address type to store the base address. Signed-off-by: Nils Le Roux ---

[PATCH v4 1/1] sunxi: H616: add LPDDR4 DRAM support

2023-11-11 Thread Mikhail Kalashnikov
From: iuncuim The H616 SoC family has support for several types of DRAM: DDR3, LPDDR3, DDR4 and LPDDR4. At the moment, the driver only supports DDR3 and LPDDR3 memory. Let's extend the driver to support the LPDDR4 memory. This type of memory widely used in device with T507(-H) SoC and new

Re: [PATCH v3 1/1] sunxi: H616: add LPDDR4 DRAM support

2023-11-11 Thread Mikhail Kalashnikov
Hi Jernej, On 04.11.2023 11:31, Jernej Škrabec wrote: Hi Mikhail, I have some notes on LPDDR4 from a long time ago. It mostly matches to your code, but please take a look at comments below. Note that I have extra code, not included in this patch, for mctl_phy_read_training(). At the very

[PATCH v4 0/1] sunxi: H616: add LPDDR4 support

2023-11-11 Thread Mikhail Kalashnikov
From: iuncuim At the moment, the driver only supports DDR3 and LPDDR3 memory. Add support for a new type DRAM. These changes have been successfully tested by me with orangepi zero3 4GB (DRAM: Rayson RS1G32LO4D2BDS-53BT). This patch should be applied after this: