[PATCH v6 7/8] clk: treewide: switch to clock dump from clk_ops

2023-11-05 Thread Igor Prusov
Switch to using new dump operation in clock provider drivers instead of overriding soc_clk_dump. Signed-off-by: Igor Prusov Tested-by: Patrice Chotard Reviewed-by: Sean Anderson --- arch/mips/mach-pic32/cpu.c | 23 drivers/clk/aspeed/clk_ast2600.c | 13

[PATCH v6 8/8] cmd: clk: Make soc_clk_dump static

2023-11-05 Thread Igor Prusov
After introducing dump to clk_ops there is no need to override or expose this symbol anymore. Signed-off-by: Igor Prusov Reviewed-by: Patrice Chotard Tested-by: Patrice Chotard Reviewed-by: Sean Anderson --- cmd/clk.c | 4 ++-- include/clk.h | 2 -- 2 files changed, 2 insertions(+), 4

Re: [PATCH v3 08/12] video: Drop unnecessary truetype operations from SPL

2023-11-05 Thread Bin Meng
On Mon, Oct 2, 2023 at 11:32 AM Simon Glass wrote: > > Saving and restoring entries is used for expo and for the command line, > which we don't use in SPL. Drop these methods. > > Signed-off-by: Simon Glass > --- > > Changes in v3: > - Add new patch to drop unnecessary truetype operations from

Re: [PATCH v3 09/12] x86: Enable SSE in 64-bit mode

2023-11-05 Thread Simon Glass
Hi Bin, On Sun, 5 Nov 2023 at 14:05, Bin Meng wrote: > > Hi Simon, > > On Mon, Oct 2, 2023 at 9:15 AM Simon Glass wrote: > > > > This is needed to support Truetype fonts. In any case, the compiler > > expects SSE to be available in 64-bit mode. Enable it. > > > > Signed-off-by: Simon Glass > >

Re: Need advise with u-boot on SH-7785LCR

2023-11-05 Thread Simon Glass
Hi John, On Sun, 5 Nov 2023 at 09:37, John Paul Adrian Glaubitz wrote: > > Hi Simon, > > On Sat, 2023-11-04 at 19:42 +, Simon Glass wrote: > > Is it possible to check if it reaches the kernel? E.g. with > > earlyprintk ? It would be good to know if U-Boot managers to jump to > > Linux, or

Re: [PATCH v2] x86: serial: ns16550: Allow the UART to be silently disabled

2023-11-05 Thread Bin Meng
Hi Simon, On Thu, Nov 2, 2023 at 2:04 AM Simon Glass wrote: > > U-Boot normally requires a UART. When booting from coreboot it is > sometimes just not available, e.g. when no sysinfo or DBG2 information > is provided. > > In this case we need to continue running, since the display can be used. >

Re: [PATCH 1/1] rng: detect RISC-V Zkr RNG device in bind method

2023-11-05 Thread Simon Glass
Hi Heinrich, On Sun, 5 Nov 2023 at 03:47, Heinrich Schuchardt wrote: > > On 11/4/23 21:42, Simon Glass wrote: > > Hi Heinrich, > > > > On Sat, 4 Nov 2023 at 06:51, Heinrich Schuchardt > > wrote: > >> > >> The existence of devices should be checked in the bind method and not in > >> the probe

Re: Need advise with u-boot on SH-7785LCR

2023-11-05 Thread John Paul Adrian Glaubitz
Hi Simon, On Sat, 2023-11-04 at 19:42 +, Simon Glass wrote: > Is it possible to check if it reaches the kernel? E.g. with > earlyprintk ? It would be good to know if U-Boot managers to jump to > Linux, or not. Thanks, this is actually a very good idea. In fact, we recently restored

[PATCH v6 1/8] clk: zynq: Move soc_clk_dump to Zynq clock driver

2023-11-05 Thread Igor Prusov
Move clock dump function in preparation for switching to dump function in clk_ops. Signed-off-by: Igor Prusov Acked-by: Michal Simek --- arch/arm/mach-zynq/clk.c | 57 --- drivers/clk/clk_zynq.c | 58 2 files

[PATCH v6 5/8] clk: Add dump operation to clk_ops

2023-11-05 Thread Igor Prusov
This adds dump function to struct clk_ops which should replace soc_clk_dump. It allows clock drivers to provide custom dump implementation without overriding generic CCF dump function. Signed-off-by: Igor Prusov Reviewed-by: Patrice Chotard Tested-by: Patrice Chotard --- include/clk-uclass.h

[PATCH v6 3/8] clk: k210: Move soc_clk_dump function

2023-11-05 Thread Igor Prusov
Move clock dump function to avoid forward declaration after switching to dump in clk_ops. Signed-off-by: Igor Prusov Reviewed-by: Sean Anderson --- drivers/clk/clk_k210.c | 92 +- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git

[PATCH v6 2/8] clk: ast2600: Move soc_clk_dump function

2023-11-05 Thread Igor Prusov
Move clock dump function to avoid forward declaration after switching to dump in clk_ops. Signed-off-by: Igor Prusov --- drivers/clk/aspeed/clk_ast2600.c | 70 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/drivers/clk/aspeed/clk_ast2600.c

[PATCH v6 4/8] clk: amlogic: Move driver and ops structs

2023-11-05 Thread Igor Prusov
Move driver and ops structs to avoid forward declaration after switching to dump in clk_ops. Signed-off-by: Igor Prusov Reviewed-by: Neil Armstrong --- drivers/clk/meson/a1.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git

Re: [PATCH v3 01/12] efi: Correct handling of frame buffer

2023-11-05 Thread Bin Meng
On Mon, Oct 2, 2023 at 10:23 AM Simon Glass wrote: > > The efi_gop driver uses private fields from the video uclass to obtain a > pointer to the frame buffer. Use the platform data instead. > > Check the VIDEO_COPY setting to determine which frame buffer to use. Once > the next stage is running

Re: [PATCH v3 06/12] expo: Correct background colour

2023-11-05 Thread Bin Meng
On Mon, Oct 2, 2023 at 9:30 AM Simon Glass wrote: > > Use the correct background colour when using white-on-black. > > Signed-off-by: Simon Glass > --- > > (no changes since v1) > > boot/expo.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Reviewed-by: Bin Meng

Re: [PATCH v3 09/12] x86: Enable SSE in 64-bit mode

2023-11-05 Thread Bin Meng
Hi Simon, On Mon, Oct 2, 2023 at 9:15 AM Simon Glass wrote: > > This is needed to support Truetype fonts. In any case, the compiler > expects SSE to be available in 64-bit mode. Enable it. > > Signed-off-by: Simon Glass > Suggested-by: Bin Meng > --- > > (no changes since v1) > >

Re: [PATCH v3 04/12] x86: coreboot: Add a boot script

2023-11-05 Thread Bin Meng
On Mon, Oct 2, 2023 at 9:14 AM Simon Glass wrote: > > Provide the user with a list of available boot options. Selecting one > causes it to be booted. Pressing causes U-Boot to return to the > command-line prompt. > > Signed-off-by: Simon Glass > --- > > Changes in v3: > - Clear the screen

[PATCH v6 6/8] cmd: clk: Use dump function from clk_ops

2023-11-05 Thread Igor Prusov
Add another loop to dump additional info from clock providers that implement dump operation. Signed-off-by: Igor Prusov Reviewed-by: Patrice Chotard Tested-by: Patrice Chotard --- cmd/clk.c | 9 + 1 file changed, 9 insertions(+) diff --git a/cmd/clk.c b/cmd/clk.c index

[PATCH v6 0/8] clk: Switch from soc_clk_dump to clk_ops function

2023-11-05 Thread Igor Prusov
Currently clock providers may override default implementation of soc_clk_dump function to replace clk dump command output. This causes confusing behaviour when u-boot is built with one of such drivers enabled but still has clocks defined using CCF. For example, enabling CMD_CLK and using clk dump

Re: [PATCH 1/2] board: ti: am62x: am62x.env: Fix boot_targets

2023-11-05 Thread Manorit Chawdhry
Hi Simon, On 11:22-20231005, Simon Glass wrote: > Hi Nishanth, > > On Thu, 5 Oct 2023 at 11:16, Nishanth Menon wrote: > > > > On 12:10-20231005, Nishanth Menon wrote: > > > On 12:36-20231005, Tom Rini wrote: > > > > On Thu, Oct 05, 2023 at 09:19:48AM -0500, Andrew Davis wrote: > > > > > On

Re: [PATCH v6 02/25] arm: Disable SPL_FS_FAT when it isn't used

2023-11-05 Thread Michal Simek
On 11/6/23 03:25, Sean Anderson wrote: Several boards enable SPL_FS_FAT and SPL_LIBDISK_SUPPORT when they can't be used (as there is no block device support enabled). Disable these configs. The list of boards was generated with the following command: $ tools/qconfig.py -f SPL SPL_FS_FAT

[PATCH] sunxi: h616: (really) lower SPL stack address to avoid BROM data

2023-11-05 Thread Andre Przywara
When using the USB OTG FEL mode on the Allwinner H616, the BootROM stores some data at the end of SRAM C. This is also the location where we place the initial SPL stack, so it will overwrite this data. We still need the BROM code after running the SPL, so should leave that area alone.

[PATCH v6 03/25] spl: Make SHOW_ERRORS depend on LIBCOMMON

2023-11-05 Thread Sean Anderson
The purpose of SHOW_ERRORS is to print extra information. Make it depend on LIBCOMMON to avoid having to check for two configs. Signed-off-by: Sean Anderson Reviewed-by: Tom Rini --- (no changes since v5) Changes in v5: - New common/spl/Kconfig | 1 + common/spl/spl.c | 3 +-- 2 files

[PATCH v6 18/25] spl: Convert nand to spl_load

2023-11-05 Thread Sean Anderson
This converts the nand load method to use spl_load. nand_page_size may not be valid until after nand_spl_load_image is called (see e.g. fsl_ifc_spl), so we set bl_len in spl_nand_read. Since spl_load reads the header for us, we can remove that argument from spl_nand_load_element. There are two

[PATCH v6 21/25] spl: Convert NVMe to spl_load

2023-11-05 Thread Sean Anderson
This converts the blk load method (used exclusively by NVMe) to use spl_load. As a consequence, it also adds support for LOAD_FIT_FULL and IMX images. Signed-off-by: Sean Anderson --- Changes in v6: - Fix invalid return from spl_blk_load_image - Explicitly initialize load_info members Changes

[PATCH v6 25/25] spl: fat: Add option to disable DMA alignment

2023-11-05 Thread Sean Anderson
If we don't DMA-align buffers we pass to FAT, it will align them itself. This behaviour likely should be deprecated in favor of CONFIG_BOUNCE_BUFFER, but that's a task for another series. For the meantime, don't bother aligning the buffer unless we had been doing so in the past. Signed-off-by:

[PATCH] mtd: spi-nor: Update block protection flags for ospi flash parts

2023-11-05 Thread Venkatesh Yadav Abbarapu
Updating the block protection flags for Gigadevice gd25lx256e and ISSI is25wx256 OSPI flash parts. Signed-off-by: Venkatesh Yadav Abbarapu --- drivers/mtd/spi/spi-nor-ids.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/spi/spi-nor-ids.c

Re: [PATCH 10/15] configs: j721e_evm_a72_defconfig: Switch to bootstd

2023-11-05 Thread Manorit Chawdhry
Hi Nishanth, On 19:38-20231102, Nishanth Menon wrote: > Switch to using bootstd. Note with this change, we will stop using > distro_bootcmd and instead depend entirely on bootflow method of > starting the system up. > > Signed-off-by: Nishanth Menon > --- > configs/j721e_evm_a72_defconfig | 5

Re: [PATCH v3 6/7] clk/qcom: add mnd_width to clk_rcg_set_rate_mnd()

2023-11-05 Thread Sumit Garg
On Fri, 3 Nov 2023 at 21:09, Caleb Connolly wrote: > > This property is needed on some platforms to ensure that only the > relevant bits are set in the M/N/D registers. This commit broke qcs404 platform which is fixed by following add-on change: diff --git a/drivers/clk/qcom/clock-qcs404.c

Re: [PATCH v3 7/7] clk/qcom: fix rcg divider value

2023-11-05 Thread Sumit Garg
On Fri, 3 Nov 2023 at 21:11, Caleb Connolly wrote: > > The RCG divider field takes a value of (2*h - 1) where h is the divisor. > This allows fractional dividers to be supported by calculating them at > compile time using a macro. > > However, the clk_rcg_set_rate_mnd() function was also

Re: [PATCH v6 00/25] spl: Use common function for loading/parsing images

2023-11-05 Thread Pali Rohár
What you are doing is the worst thing in the world. You have been ignoring all my changes which I have been sending for one year, then you wrote me that I'm not competent to do any kind of programming, later you wrote that you would ignore all my requests and stop responding to any questions, then

[PATCH 2/4] watchdog: Add StarFive Watchdog driver

2023-11-05 Thread Chanho Park
Add to support StarFive watchdog driver. The driver is imported from linux kernel's drivers/watchdog/starfive-wdt.c without jh7100 support because there is no support of jh7100 SoC in u-boot yet. Howver, this patch has been kept the variant coding style because JH7100 can be added later and have a

[PATCH 0/4] Support StarFive Watchdog driver

2023-11-05 Thread Chanho Park
This patchset adds to support StarFive Watchdog driver which is based on Linux kernel's starfive-wdt driver. Actually, the original driver supports both JH7100 and JH7110 with variant coding but this removes the JH7100 part of codes because JH7100 isn't supported in u-boot yet. However, this patch

[PATCH 3/4] riscv: dts: jh7110: Add watchdog device tree node

2023-11-05 Thread Chanho Park
Adds jh7110 watchdog device tree node. Signed-off-by: Chanho Park --- arch/riscv/dts/jh7110.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/riscv/dts/jh7110.dtsi b/arch/riscv/dts/jh7110.dtsi index 13c47f7caa36..6d2675d6ceac 100644 --- a/arch/riscv/dts/jh7110.dtsi +++

[PATCH 2/2] phy: phy-mtk-tphy: add properties for phy tuning

2023-11-05 Thread Chunfeng Yun
Add properties to improve eye diagram which sometimes need adjust some parameters of u2phy; Add a property to tune disconnect threshold; Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mtk-tphy.c | 58 +- 1 file changed, 57 insertions(+), 1 deletion(-) diff

[PATCH 1/2] dt-bindings: phy-mtk-tphy: add properties for phy tuning

2023-11-05 Thread Chunfeng Yun
Add properties to improve eye diagram which sometimes need adjust some parameters of u2phy; Add a property to tune disconnect threshold; Signed-off-by: Chunfeng Yun --- doc/device-tree-bindings/phy/phy-mtk-tphy.txt | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH v6 01/25] spl: blk_fs: Fix uninitialized return value when we can't get a blk_desc

2023-11-05 Thread Sean Anderson
Initialize ret to avoid returning garbage if blk_get_devnum_by_uclass_id fails. Fixes: 8ce6a2e1757 ("spl: blk: Support loading images from fs") Signed-off-by: Sean Anderson --- Changes in v6: - New common/spl/spl_blk_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

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

2023-11-05 Thread Tom Rini
On Sun, Nov 05, 2023 at 01:03:51PM -0700, Simon Glass wrote: > 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

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

2023-11-05 Thread Tom Rini
On Sun, Nov 05, 2023 at 01:03:52PM -0700, Simon Glass wrote: > 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

[PATCH v6 07/25] spl: Take advantage of bl_len's power-of-twoness

2023-11-05 Thread Sean Anderson
bl_len must be a power of two, so we can use ALIGN instead of roundup and similar tricks to avoid divisions. Signed-off-by: Sean Anderson --- Changes in v6: - New common/spl/spl_fit.c | 2 +- common/spl/spl_imx_container.c | 8 2 files changed, 5 insertions(+), 5

[PATCH v6 24/25] spl: spi: Consolidate spi_load_image_os into spl_spi_load_image

2023-11-05 Thread Sean Anderson
spi_load_image_os performs almost the same steps as the non-falcon-boot path of spl_spi_load_image. The load address is different, and it also loads a device tree, but that's it. Refactor the boot process so that they can both use the same load function. Signed-off-by: Sean Anderson --- (no

[PATCH v6 23/25] spl: Convert spi to spl_load

2023-11-05 Thread Sean Anderson
This converts the spi load method to use spl_load. The address used for LOAD_FIT_FULL may be different, but there are no in-tree users of that config. Since payload_offs is only used without OS_BOOT, we defer its initialization. Signed-off-by: Sean Anderson --- Changes in v6: - Fix soft reset

[PATCH v2] timer: starfive: Add Starfive timer support

2023-11-05 Thread Kuan Lim Lee
Add timer driver in Starfive SoC. It is an timer that outside of CPU core and inside Starfive SoC. Signed-off-by: Kuan Lim Lee Signed-off-by: Wei Liang Lim Reviewed-by: Simon Glass Changes for v2: - correct driver name, comment, variable --- drivers/timer/Kconfig | 7 +++

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

2023-11-05 Thread Simon Glass
This little series corrects a problem I noticed with arm64 images, where the kernel is not recognised: ## Loading kernel from FIT Image at 1000 ... Using 'conf-930' configuration Verifying Hash Integrity ... OK Trying 'kernel' kernel subimage Description:

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

2023-11-05 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 3/4] image: Show the load address when decompressing

2023-11-05 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 --- boot/image.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-)

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

2023-11-05 Thread Marek Vasut
Currently the renesas_sdhi_reset_tuning() unconditionally leaves SDHI clock enabled after the tuning reset. This is not always necessary. After the driver performed tuning reset at the end of probe function, or in the unlikely case that tuning failed during regular operation, the SDHI clock can

[PATCH 1/4] clk: starfive: jh7110: Add watchdog clocks

2023-11-05 Thread Chanho Park
Add JH7110_SYSCLK_WDT_APB and JH7110_SYSCLK_WDT_CORE clocks for JH7110 watchdog device. Signed-off-by: Chanho Park --- drivers/clk/starfive/clk-jh7110.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/clk/starfive/clk-jh7110.c b/drivers/clk/starfive/clk-jh7110.c index

[PATCH 4/4] configs: visionfive2: Enable watchdog driver

2023-11-05 Thread Chanho Park
Enables StarFive Watchdog driver and WDT command. Signed-off-by: Chanho Park --- configs/starfive_visionfive2_defconfig | 5 + 1 file changed, 5 insertions(+) diff --git a/configs/starfive_visionfive2_defconfig b/configs/starfive_visionfive2_defconfig index b15e7d24db19..7b39a63359dc

[PATCH v6 05/25] spl: Remove NULL assignments in spl_load_info

2023-11-05 Thread Sean Anderson
Remove NULL assignments to fields in spl_load_info when .load doesn't reference these fields. This can result in more efficient code. filename must stay even if it is unused, since load_simple_fit uses it. Signed-off-by: Sean Anderson --- Changes in v6: - New

[PATCH v6 14/25] spl: Add generic spl_load function

2023-11-05 Thread Sean Anderson
Implementers of SPL_LOAD_IMAGE_METHOD have to correctly determine what type of image is being loaded and then call the appropriate image load function correctly. This is tricky, because some image load functions expect the whole image to already be loaded (CONFIG_SPL_LOAD_FIT_FULL), some will load

[PATCH v6 12/25] spl: legacy: Split off LZMA decompression into its own function

2023-11-05 Thread Sean Anderson
To allow for easier reuse of this functionality, split it off into its own function. Signed-off-by: Sean Anderson --- Changes in v6: - New common/spl/spl_legacy.c | 73 ++--- include/spl.h | 13 2 files changed, 52 insertions(+), 34

[PATCH v6 17/25] spl: Convert mmc to spl_load

2023-11-05 Thread Sean Anderson
This converts the mmc loader to spl_load. Legacy images are handled by spl_load (via spl_parse_image_header), so mmc_load_legacy can be omitted. To accurately determine whether mmc_load_image_raw_sector is used (which might not be the case if SYS_MMCSD_FS_BOOT is enabled), we introduce a helper

[PATCH v6 19/25] spl: Convert net to spl_load

2023-11-05 Thread Sean Anderson
This converts the net load method to use spl_load. As a result, it also adds support for LOAD_FIT_FULL and IMX images. Signed-off-by: Sean Anderson --- Changes in v6: - Explicitly initialize load_info members Changes in v5: - Rework to load header in spl_load common/spl/spl_net.c | 29

[PATCH v6 00/25] spl: Use common function for loading/parsing images

2023-11-05 Thread Sean Anderson
This series adds support for loading all image types (Legacy (with and without LZMA), FIT (with and without LOAD_FIT_FULL), and i.MX) to the MMC, SPI, NOR, NET, FAT, EXT, NVMe, and semihosting load methods. It does this by introducing a helper function which handles the minutiae of invoking the

[PATCH v6 13/25] test: spl: Support testing LEGACY_LZMA filesystem images

2023-11-05 Thread Sean Anderson
These will soon be supported, so we need to be able to test it. Export the lzma data and generally use the same process in spl_test_mmc_fs as do_spl_test_load. If we end up needing this in third place in the future, it would probably be good to refactor things out. Signed-off-by: Sean Anderson

[PATCH v6 16/25] spl: Convert fat to spl_load

2023-11-05 Thread Sean Anderson
This converts the fat loader to use spl_load. Some platforms are very tight on space, so we take care to only include the code we really need. Signed-off-by: Sean Anderson --- (no changes since v5) Changes in v5: - Rework to load header in spl_load Changes in v3: - Fix failing on success

[PATCH v6 08/25] spl: Refactor spl_load_info->read to use units of bytes

2023-11-05 Thread Sean Anderson
Simplify things a bit for callers of spl_load_info->read by refactoring it to use units of bytes instead of bl_len. This generally simplifies the logic, as MMC is the only loader which actually works in sectors. It will also allow further refactoring to remove the special-case handling of

[PATCH v6 20/25] spl: Convert nor to spl_load

2023-11-05 Thread Sean Anderson
This converts the nor load method to use spl_load. As a result it also adds support for LOAD_FIT_FULL. Since this is the last caller of spl_load_legacy_img, it has been removed. We can't load FITs with external data with SPL_LOAD_FIT_FULL, so disable the test in that case. No boards enable

Re: [PATCH 1/1] rng: detect RISC-V Zkr RNG device in bind method

2023-11-05 Thread Heinrich Schuchardt
On 11/5/23 18:25, Simon Glass wrote: Hi Heinrich, On Sun, 5 Nov 2023 at 03:47, Heinrich Schuchardt wrote: On 11/4/23 21:42, Simon Glass wrote: Hi Heinrich, On Sat, 4 Nov 2023 at 06:51, Heinrich Schuchardt wrote: The existence of devices should be checked in the bind method and not in

[PATCH v6 11/25] spl: nand: Remove spl_nand_legacy_read

2023-11-05 Thread Sean Anderson
Now that spl_nand_fit_read works in units of bytes, it can be combined with spl_nand_legacy_read. Rename the resulting function spl_nand_read, since it is no longer FIT-specific. Signed-off-by: Sean Anderson --- Changes in v6: - New common/spl/spl_nand.c | 33 +

[PATCH v6 04/25] spl: semihosting: Don't close fd before spl_load_simple_fit

2023-11-05 Thread Sean Anderson
On real hardware, semihosting calls tends to have a large constant overhead (on the order of tens of milliseconds). Reduce the number of calls by one by reusing the existing fd in smh_fit_read, and closing it at the end of spl_smh_load_image. Signed-off-by: Sean Anderson --- Changes in v6: -

[PATCH v6 06/25] spl: Remove dev from spl_load_info

2023-11-05 Thread Sean Anderson
dev and priv server the same purpose, and are never set at the same time. Remove dev and convert all users to priv. While we're at it, reorder bl_len to be last for better alignment. Signed-off-by: Sean Anderson --- Changes in v6: - New common/spl/spl_mmc.c | 6 +++---

[PATCH v6 02/25] arm: Disable SPL_FS_FAT when it isn't used

2023-11-05 Thread Sean Anderson
Several boards enable SPL_FS_FAT and SPL_LIBDISK_SUPPORT when they can't be used (as there is no block device support enabled). Disable these configs. The list of boards was generated with the following command: $ tools/qconfig.py -f SPL SPL_FS_FAT ~SPL_MMC ~SPL_BLK_FS ~SPL_SATA \

[PATCH v6 15/25] spl: Convert ext to use spl_load

2023-11-05 Thread Sean Anderson
This converts the ext load method to use spl_load. As a consequence, it also adds support for FIT and IMX images. Signed-off-by: Sean Anderson --- Changes in v6: - Explicitly initialize load_info members Changes in v5: - Rework to load header in spl_load common/spl/spl_ext.c | 36

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

2023-11-05 Thread Simon Glass
Hi, On Sun, 5 Nov 2023 at 20:05, Simon Glass wrote: > > This little series corrects a problem I noticed with arm64 images, > where the kernel is not recognised: > >## Loading kernel from FIT Image at 1000 ... > Using 'conf-930' configuration > Verifying Hash Integrity ... OK

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

2023-11-05 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 4/4] image: Correct load_bug typo

2023-11-05 Thread Simon Glass
Correct a typo in the function comment for image_decomp(). Signed-off-by: Simon Glass --- 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 +++ b/include/image.h @@

[PATCH v6 09/25] spl: Remove filename from spl_load_info

2023-11-05 Thread Sean Anderson
For filesystems, filename serves the same purpose as priv. However, spl_load_fit_image also uses it to determine whether to use a DMA-aligned buffer. This is beneficial for FAT, which uses a bounce-buffer if the destination is not DMA-aligned. Remove this logic, and instead achieve it by setting

[PATCH v6 10/25] spl: Only support bl_len when we have to

2023-11-05 Thread Sean Anderson
Aligning addresses and sizes causes overhead which is unnecessary when we are not loading from block devices. Remove bl_len when it is not needed. For example, on iot2050 we save 144 bytes with this patch (once the rest of this series is applied): add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-144

[PATCH v6 22/25] spl: Convert semihosting to spl_load

2023-11-05 Thread Sean Anderson
This converts the semihosting load method to use spl_load. As a result, it also adds support for LOAD_FIT_FULL and IMX images. Signed-off-by: Sean Anderson --- Changes in v6: - Explicitly initialize load_info members Changes in v5: - Rework to load header in spl_load Changes in v2: - New