Re: [PATCH v2 0/7] arm64: dts: imx8mm: add common -binman.dtsi and further clean-up

2021-10-08 Thread Peng Fan (OSS)
On 2021/10/9 5:02, Marcel Ziswiler wrote: From: Marcel Ziswiler With the move to using binman to generate SPL aka u-boot-spl-ddr.bin and U-Boot proper aka u-boot.itb every board now covers such configuration in its own U-Boot specific device tree include. Move the comon part of that

Re: [PATCH v5 28/29] image: Split up boot_get_fdt()

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:41PM -0600, Simon Glass wrote: > This function is far too long. Before trying to remove #ifdefs, split out > the code that deals with selecting the FDT into a separate function. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom

Re: [PATCH v5 27/29] image: Reduce variable scope in boot_get_fdt()

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:40PM -0600, Simon Glass wrote: > Move the variables declarations to where they are needed, to reduce the > number of #ifdefs needed. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v5 26/29] image: Remove some #ifdefs from image-fit and image-fit-sig

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:39PM -0600, Simon Glass wrote: > Drop the #ifdefs which are easy to remove without refactoring. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v5 25/29] image: Remove #ifdefs from select_ramdisk()

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:38PM -0600, Simon Glass wrote: > Use boolean variables to deal with the strange #ifdef logic of this > function, so we can remove the #ifdefs. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v5 24/29] image: Split up boot_get_ramdisk()

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:37PM -0600, Simon Glass wrote: > This function is far too long. Before trying to remove #ifdefs, split out > the code that deals with selecting the ramdisk into a separate function. > > Leave the code indented as it was for easier review. The next patch cleans >

Re: [PATCH v5 16/29] efi: Correct dependency on FIT_SIGNATURE

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:29PM -0600, Simon Glass wrote: > At present EFI_SECURE BOOT selects RSA but does not necessarily enable > FIT_SIGNATURE. Mostly this is fine, but a few boards do not enable it, > so U-Boot tries to do RSA verification when loading FIT images, but it > is not enabled.

Re: [PATCH v5 23/29] image: Reduce variable scope in boot_get_ramdisk()

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:36PM -0600, Simon Glass wrote: > Move the variables declarations to where they are needed, to reduce the > number of #ifdefs needed. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v5 22/29] image: Drop most #ifdefs in image-board.c

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:35PM -0600, Simon Glass wrote: > Remove ifdefs in this file, so far as possible without too much > refactoring. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v5 21/29] image: Drop #ifdefs for fit_print_contents()

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:34PM -0600, Simon Glass wrote: > Use a simple return to drop the unwanted code. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v5 20/29] image: Drop unnecessary #ifdefs from image.h

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:33PM -0600, Simon Glass wrote: > This file has a lot of conditional code and much of it is unnecessary. > Clean this up to reduce the number of build combinations. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc

Re: [PATCH v5 19/29] image: Tidy up fit_unsupported_reset()

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:32PM -0600, Simon Glass wrote: > This function is only used in one place and does not need to use the > preprocessor. Move it to the C file and convert it to a normal function. > > Drop fit_unsupported() since it is not used. > > Signed-off-by: Simon Glass

Re: [PATCH v5 15/29] image: Drop IMAGE_ENABLE_IGNORE

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:28PM -0600, Simon Glass wrote: > We can use the new host_build() function for this, so drop it. > > Signed-off-by: Simon Glass > Reviewed-by: Alexandru Gagniuc Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v5 14/29] image: Drop IMAGE_OF_SYSTEM_SETUP

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:27PM -0600, Simon Glass wrote: > This is not needed with Kconfig, since we can use IS_ENABLED() easily > enough. Drop it. > > Signed-off-by: Simon Glass > Reviewed-by: Alexandru Gagniuc Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP

Re: [PATCH v5 13/29] image: Drop IMAGE_OF_BOARD_SETUP

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:26PM -0600, Simon Glass wrote: > This is not needed with Kconfig, since we can use IS_ENABLED() easily > enough. Drop it. > > Signed-off-by: Simon Glass > Reviewed-by: Alexandru Gagniuc Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP

Re: [PATCH v5 12/29] image: Drop IMAGE_BOOT_GET_CMDLINE

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:25PM -0600, Simon Glass wrote: > This is not needed with Kconfig, since we can use IS_ENABLED() easily > enough and the board code is now in a separate file. Update the only place > where this is used and drop it. > > Signed-off-by: Simon Glass > Reviewed-by:

Re: [PATCH v5 11/29] image: Use the correct checks for CRC32

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:24PM -0600, Simon Glass wrote: > Add a host Kconfig for CRC32. With this we can use CONFIG_IS_ENABLED(CRC32) > directly in the host build, so drop the unnecessary indirection. > > Add a few more conditions to SPL_CRC32 to avoid build failures as well as > TPL_CRC32.

Re: [PATCH v5 10/29] image: Use Kconfig to enable FIT_RSASSA_PSS on host

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:23PM -0600, Simon Glass wrote: > Add a host Kconfig for FIT_RSASSA_PSS. With this we can use > CONFIG_IS_ENABLED(FIT_RSASSA_PSS) directly in the host build, so drop the > forcing of this in the image.h header. > > Drop the #ifdef around padding_pss_verify() too

Re: [PATCH v5 06/29] hash: Drop some #ifdefs in hash.c

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:19PM -0600, Simon Glass wrote: > We can use the __maybe_unused attribute to avoid some of the #ifdefs in > this file. Update the functions accordingly. > > Note: The actual hashing interface is still a mess, with four separate > combinations and lots of #ifdefs.

Re: [PATCH v5 07/29] image: Drop IMAGE_ENABLE_FIT

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:20PM -0600, Simon Glass wrote: > Make use of the host Kconfig for FIT. With this we can use > CONFIG_IS_ENABLED(FIT) directly in the host build, so drop the unnecessary > indirection. > > Signed-off-by: Simon Glass > Reviewed-by: Alexandru Gagniuc Applied to

Re: [PATCH v5 09/29] image: Use Kconfig to enable CONFIG_FIT_VERBOSE on host

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:22PM -0600, Simon Glass wrote: > Add a host Kconfig for FIT_VERBOSE. With this we can use > CONFIG_IS_ENABLED(FIT_VERBOSE) directly in the tools build, so drop the > forcing of this in the image.h header. > > Signed-off-by: Simon Glass > Reviewed-by: Alexandru

Re: [PATCH v5 08/29] image: Drop IMAGE_ENABLE_OF_LIBFDT

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:21PM -0600, Simon Glass wrote: > Add a host Kconfig for OF_LIBFDT. With this we can use > CONFIG_IS_ENABLED(OF_LIBFDT) directly in the tools build, so drop the > unnecessary indirection. > > Signed-off-by: Simon Glass > Reviewed-by: Alexandru Gagniuc Applied to

Re: [PATCH v5 05/29] hash: Use Kconfig to enable hashing in host tools and SPL

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:18PM -0600, Simon Glass wrote: > At present when building host tools, we force CONFIG_SHAxxx to be enabled > regardless of the board Kconfig setting. This is done in the image.h > header file. > > For SPL we currently just assume the algorithm is desired if U-Boot

Re: [PATCH v5 04/29] spl: cypto: Bring back SPL_ versions of SHA

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:17PM -0600, Simon Glass wrote: > Unfortunately these were removed by mistake. This means that adding hash > support to SPL brings in all software algorithms, with a substantial > increase in code size. > > The origin of the problem was renaming them to SPL_FIT_xxx

Re: [PATCH v5 03/29] image: Add Kconfig options for FIT in the tools build

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:16PM -0600, Simon Glass wrote: > In preparation for enabling CONFIG_IS_ENABLED() on the host build, add > some options to enable the various FIT options expected in these tools. > This will ensure that the code builds correctly when CONFIG_TOOLS_xxx > is distinct

Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED()

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:15PM -0600, Simon Glass wrote: > At present we must separately test for the host build for many options, > since we force them to be enabled. For example, CONFIG_FIT is always > enabled in the host tools, even if CONFIG_FIT is not enabled by the > board itself. > >

Re: [PATCH v5 01/29] compiler: Rename host_build() to tools_build()

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:43:14PM -0600, Simon Glass wrote: > With the new TOOLS_LIBCRYPTO and some other changes, it seems that we are > heading towards calling this a tools build rather than a host build, > although of course it does happen on the host. > > I cannot think of anything built by

Re: [PATCH v4 15/15] image: Remove ifdefs around image_setup_linux() el at

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:20AM -0600, Simon Glass wrote: > Drop some more ifdefs in image-board.c and also the FPGA part of bootm.c > which calls into it. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v4 14/15] image: Avoid #ifdefs for manual relocation

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:19AM -0600, Simon Glass wrote: > Add a macro to handle manually relocating a pointer. Update the iamge code > to use this to avoid needing #ifdefs. > > This also fixes a bug where the 'done' flag was not set. > > Signed-off-by: Simon Glass Applied to

Re: [PATCH v4 13/15] image: Create a function to do manual relocation

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:18AM -0600, Simon Glass wrote: > Rather than adding an #ifdef and open-coding this calculation, add a > helper function to handle it. Use this in the image code. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description:

Re: [PATCH v4 12/15] image: Split host code out into its own file

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:17AM -0600, Simon Glass wrote: > To avoid having #ifdefs in a few functions which are completely different > in the board and host code, create a new image-host.c file. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc

Re: [PATCH v4 10/15] image: Split board code out into its own file

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:15AM -0600, Simon Glass wrote: > To avoid a large #ifdef in the image.c file, move the affected code into > a separate file. > > Avoid any style fix-ups for easier review. Those are in the next patch. > > Signed-off-by: Simon Glass Applied to u-boot/master,

Re: [PATCH v4 11/15] image: Fix up checkpatch warnings in image-board.c

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:16AM -0600, Simon Glass wrote: > Tidy up the warnings. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v4 09/15] image: Update image_decomp() to avoid ifdefs

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:14AM -0600, Simon Glass wrote: > Adjust this function so that preprocessor macros are not needed. With > this, the host build uses more of the same header files as the target > build. > > Rather than definining CONFIG_SYS_MALLOC_LEN, add a CONSERVE_MEMORY > define,

Re: [PATCH v4 08/15] gzip: Avoid use of u64

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:13AM -0600, Simon Glass wrote: > The gzip API uses the u64 type in it, which is not available in the host > build. This makes it impossible to include the header file. > > We could make this type available, but it seems unnecessary. Limiting the > compression size

Re: [PATCH v4 07/15] image: Update zstd to avoid reporting error twice

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:12AM -0600, Simon Glass wrote: > The zstd implementation prints the error in image_decomp() which is > incorrect and does not match other algorithms. Drop this and let the > caller report the error. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks!

Re: [PATCH v4 05/15] btrfs: Use U-Boot API for decompression

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:10AM -0600, Simon Glass wrote: > Use the common function to avoid code duplication. > > Acked-by: Qu Wenruo > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v4 06/15] image: Avoid switch default in image_decomp()

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:11AM -0600, Simon Glass wrote: > At present this function is full of preprocessor macros. Adjust it to > check for an unsupported algorithm after the switch(). This will allow > us to drop the macros. > > Fix up the return-value path and an extra blank line while we

Re: [PATCH v4 04/15] zstd: Create a function for use from U-Boot

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:09AM -0600, Simon Glass wrote: > The existing zstd API requires the same sequence of calls to perform its > task. Create a helper for U-Boot, to avoid code duplication, as is done > with other compression algorithms. Make use of of this from the image > code. > >

Re: [PATCH v4 03/15] compiler: Add a comment to host_build()

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:08AM -0600, Simon Glass wrote: > This function should have a comment explaining what it does. Add one. > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v4 02/15] Add support for an owned buffer

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:07AM -0600, Simon Glass wrote: > When passing a data buffer back from a function, it is not always clear > who owns the buffer, i.e. who is responsible for freeing the memory used. > An example of this is where multiple files are decompressed from the > firmware

Re: [PATCH v4 01/15] lib: Add memdup()

2021-10-08 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:03:06AM -0600, Simon Glass wrote: > Add a function to duplicate a memory region, a little like strdup(). > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH 0/4] arm64: dts: rockchip: px30: Linux-5.14-rc3 Sync

2021-10-08 Thread Jagan Teki
Hi Kever, Can you push these changes? Jagan.

[PATCH v2 7/7] arm64: dts: imx8mm-u-boot.dtsi: improve odd blob-ext naming

2021-10-08 Thread Marcel Ziswiler
From: Marcel Ziswiler Rather than using odd implicit blob-ext naming, explicitly specify the type to be of blob-ext and therefore also simplify the node naming. Signed-off-by: Marcel Ziswiler --- Changes in v2: - Rather than doing that clean-up to the separate binman dtsi now do it to the

[PATCH v2 5/7] arm64: dts: imx8mm-u-boot.dtsi: alphabetically re-order properties

2021-10-08 Thread Marcel Ziswiler
From: Marcel Ziswiler Alphabetically re-order properties. Signed-off-by: Marcel Ziswiler --- Changes in v2: - Rather than doing that clean-up to the separate binman dtsi now do it to the common u-boot dtsi one. arch/arm/dts/imx8mm-u-boot.dtsi | 34 - 1

[PATCH v2 6/7] arm64: dts: imx8mm-u-boot.dtsi: explicitly add spl filename

2021-10-08 Thread Marcel Ziswiler
From: Marcel Ziswiler Explicitly add SPL aka u-boot-spl.bin filename. Signed-off-by: Marcel Ziswiler --- Changes in v2: - Rather than doing that clean-up to the separate binman dtsi now do it to the common u-boot dtsi one. arch/arm/dts/imx8mm-u-boot.dtsi | 1 + 1 file changed, 1

[PATCH v2 4/7] arm64: dts: imx8mm: use common binman configuration

2021-10-08 Thread Marcel Ziswiler
From: Marcel Ziswiler With the move to using binman to generate SPL aka u-boot-spl-ddr.bin and U-Boot proper aka u-boot.itb every board now covers such configuration in its own U-Boot specific device tree include. Move the comon part of that configuration to the common imx8mm-u-boot.dtsi include

[PATCH v2 2/7] arm64: dts: imx8mm-cl-iot-gate-u-boot.dtsi: alphabetically re-order

2021-10-08 Thread Marcel Ziswiler
From: Marcel Ziswiler Alphabetically re-order nodes and properties. Signed-off-by: Marcel Ziswiler --- Changes in v2: - New patch preparing cl-iot-gate. .../dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi | 202 +- arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi | 202

[PATCH v2 3/7] arm64: dts: imx8mm-cl-iot-gate-u-boot.dtsi: use common imx8mm-u-boot.dtsi

2021-10-08 Thread Marcel Ziswiler
From: Marcel Ziswiler Use common imx8mm-u-boot.dtsi. Signed-off-by: Marcel Ziswiler --- Changes in v2: - New patch preparing cl-iot-gate. .../dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi | 37 +-- arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi | 37 +-- 2 files

[PATCH v2 0/7] arm64: dts: imx8mm: add common -binman.dtsi and further clean-up

2021-10-08 Thread Marcel Ziswiler
From: Marcel Ziswiler With the move to using binman to generate SPL aka u-boot-spl-ddr.bin and U-Boot proper aka u-boot.itb every board now covers such configuration in its own U-Boot specific device tree include. Move the comon part of that configuration to the common imx8mm-u-boot.dtsi

[PATCH v2 1/7] imx8mm-cl-iot-gate: fix imximage intermediate binary naming

2021-10-08 Thread Marcel Ziswiler
From: Marcel Ziswiler This fixes the following build time issue: ... BINMAN all binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000 ./mkimage-out.spl.mkimage': mkimage.flash.mkimage: Can't open: No such file or directory make: ***

Re: [PATCH v4 5/5] sf: Provide a command to access memory-mapped SPI

2021-10-08 Thread Simon Glass
Hi Jagan, On Fri, 8 Oct 2021 at 06:47, Jagan Teki wrote: > > On Mon, Sep 20, 2021 at 3:19 AM Simon Glass wrote: > > > > Add a new 'sf mmap' function to show the address of a SPI offset, if the > > hardware supports it. This is useful on x86 systems. > > I'm not quite sure about growing sf for

[PATCH v3 13/13] ARM: dts: stm32mp: dts: Don't remove OPTEE nodes for DK2 boards

2021-10-08 Thread Alexandru Gagniuc
To prepare for an OP-TEE payload, the spl_board_prepare_for_optee() handler of STM32MP calls. stm32_init_tzc_for_optee(), which will panic(). The reason for the panic is a failure to locate a valid "/reserved-memory/optee" node in the devicetree. This all occurs in SPL, so to re-add the OP-TEE

[PATCH v3 12/13] stm32mp1: spl: Copy optee nodes to target FDT for OP-TEE payloads

2021-10-08 Thread Alexandru Gagniuc
OP-TEE does not take a devicetree for its own use. However, it does pass the devicetree to the normal world OS. In most cases that will be some other devicetree-bearing platform, such as linux. OP-TEE is capable of patching the devicetree and adding the required "/firmware" and "/reserved-memory"

[PATCH v3 11/13] ARM: dts: stm32mp: Add OP-TEE "/firmware" node to SPL dtb

2021-10-08 Thread Alexandru Gagniuc
The optee "/firmware" node is normally used to load the OP-TEE driver. SPL does not use it this way, but instead uses it to patch the kernel devicetree when booting OP-TEE. This seems weird, as OP-TEE -- which would run after SPL -- is capable of patching the devicetree and adding the required

[PATCH v3 10/13] lib: Makefile: Make optee library available in SPL

2021-10-08 Thread Alexandru Gagniuc
We want the optee_copy_fdt_nodes symbols in SPL. This is for cases when booting an OPTEE payload directly. Signed-off-by: Alexandru Gagniuc --- lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile b/lib/Makefile index 962470f496..c7dc217e2b 100644 ---

[PATCH v3 02/13] spl: Move SYS_MMCSD_RAW_MODE_KERNEL_SECTOR to Kconfig

2021-10-08 Thread Alexandru Gagniuc
Although Falcon mode is very useful in improving boot speed, its implementation is quite antiquated. A question that Falcon mode asks is "Where do I look for the kernel". With MMC boot media, the correct answer is CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR. There are a few things to be said about

[PATCH v3 09/13] stm32mp1: spl: Configure MAC address when booting OP-TEE

2021-10-08 Thread Alexandru Gagniuc
When OP-TEE is booted as the SPL payload, the stage after OP-TEE is not guaranteed to be u-boot. Thus the FDT patching in u-boot is not guaranteed to occur. Add this step to SPL. The patching by stm32_fdt_setup_mac_addr() is done in SPL, and patches the target FDT directly. This differs is

[PATCH v3 08/13] arm: stm32mp: Factor out reading MAC address from OTP

2021-10-08 Thread Alexandru Gagniuc
Move the reading the OTP into a separate function. This is required for a subsequent change which sets the MAC in SPL. Signed-off-by: Alexandru Gagniuc --- arch/arm/mach-stm32mp/cpu.c | 37 +++-- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git

[PATCH v3 07/13] arm: stm32mp: bsec: Update OTP shadow registers in SPL

2021-10-08 Thread Alexandru Gagniuc
For TFABOOT and SPL_BUILD, stm32mp_bsec_probe() skipped updating the OTP shadow registers. The idea is that we can't access BSEC from the normal world. This is true with TFABOOT. However, in SPL, we are in the secure world, so skipping probe is incorrect. In fact, SPL is not even built when

[PATCH v3 06/13] fdt_support: Implement fdt_ethernet_set_macaddr()

2021-10-08 Thread Alexandru Gagniuc
Oftentimes we have MAC address information stored in a ROM or OTP. The way to add that to the FDT would be through the u-boot environment, and then fdt_fixup_ethernet(). This is not very useful in SPL. It would be more helpful to be able to "set interface x to MAC y". This is where

[PATCH v3 03/13] stm32mp1: Add support for baudrates higher than 115200

2021-10-08 Thread Alexandru Gagniuc
The UART can reliably go up to 200 baud when connected to the on-board st-link. Unfortunately u-boot will fall back to 115200 unless higher rates are declared via CONFIG_SYS_BAUDRATE_TABLE. Signed-off-by: Alexandru Gagniuc Reviewed-by: Patrick Delaunay --- include/configs/stm32mp1.h | 4

[PATCH v3 04/13] stm32mp1: Add support for falcon mode boot from SD card

2021-10-08 Thread Alexandru Gagniuc
Falcon mode requires a board-specific mechanism to select between fast and normal boot. This is done via spl_start_uboot() Use the USER2 button as the selection mechanism. This is connected to GPIO PA13. This GPIO is already accessible via the "st,fastboot-gpios" devicetree node, but is is also

[PATCH v3 05/13] board: stm32mp1: Implement board_fit_config_name_match() for SPL

2021-10-08 Thread Alexandru Gagniuc
This function is needed when loading a FIT image from SPL. It selects the correct configuration node for the current board. Implement it. Signed-off-by: Alexandru Gagniuc --- board/st/stm32mp1/spl.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/board/st/stm32mp1/spl.c

[PATCH v3 00/13] stm32mp1: Support falcon mode with OP-TEE payloads

2021-10-08 Thread Alexandru Gagniuc
The goal of this project is to to get to linux userspace within a second from power on, and be secure! This is my last full-time day on this project, so I don't expect to do a v4. I chose to use SPL with a FIT payload. We have to add certain logic to SPL, as well as some FDT modifications that

[PATCH v3 01/13] spl: Untagle spl_start_uboot() from spl_mmc.c

2021-10-08 Thread Alexandru Gagniuc
The symbol spl_start_uboot() is provided in spl_mmc.c, but it may also be provided by platform code. Fireworks can be created with the following combination: CONFIG_SPL_OS_BOOT is not set CONFIG_SPL_MMC=y ARCH provides spl_start_uboot() A weak implementation of spl_start_uboot()

Re: [PATCH v4 03/11] efi_loader: capsule: add back efi_get_public_key_data()

2021-10-08 Thread Ilias Apalodimas
Akashi-san, On Thu, Oct 07, 2021 at 03:23:32PM +0900, AKASHI Takahiro wrote: > The commit 47a25e81d35c ("Revert "efi_capsule: Move signature from DTB to > .rodata"") failed to revert the removal of efi_get_public_key_data(). > > Add back this function and move it under lib/efi_loader so that

Re: [PATCH v4 01/11] Revert "Revert "mkeficapsule: Remove dtb related options""

2021-10-08 Thread Ilias Apalodimas
Hi Simon, On Fri, Oct 08, 2021 at 09:38:11AM -0600, Simon Glass wrote: > Hi Takahiro, > > On Thu, 7 Oct 2021 at 00:24, AKASHI Takahiro > wrote: > > > > This reverts commit d428e81266a59974ade74c1ba019af39f23304ab. > > We have agreed with removing dtb-related stuff from mkeficapsule > >

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-08 Thread Pali Rohár
Hello! On Friday 08 October 2021 15:28:03 Luka Kovacic wrote: > Hello Pali, > > On Fri, Oct 8, 2021 at 2:53 PM Pali Rohár wrote: > > > > Hello! > > > > On Friday 08 October 2021 14:09:23 Robert Marko wrote: > > > From: Luka Kovacic > > > > > > The mac command is implemented to enable parsing

Re: [PATCH v1 3/3] rockchip: rk3568: add arch_cpu_init()

2021-10-08 Thread Philipp Tomsich
On Fri, 8 Oct 2021 at 04:01, Nico Cheng wrote: > > We configured the drive strength and security of EMMC in > arch_cpu_init(). Could you point me to a public version of the TRM (and ideally also of the datasheet), so I can review this series? Thanks, Philipp. > > Signed-off-by: Nico Cheng >

Re: [PATCH] pci: Fix printf format for regions

2021-10-08 Thread Stefan Roese
On 08.10.21 17:01, Pali Rohár wrote: Correct printf format for unsigned long long is %llx and not %llxx. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Thanks, Stefan --- drivers/pci/pci_auto_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v4 01/11] Revert "Revert "mkeficapsule: Remove dtb related options""

2021-10-08 Thread Simon Glass
Hi Takahiro, On Thu, 7 Oct 2021 at 00:24, AKASHI Takahiro wrote: > > This reverts commit d428e81266a59974ade74c1ba019af39f23304ab. > We have agreed with removing dtb-related stuff from mkeficapsule > command even if the commit 47a25e81d35c ("Revert "efi_capsule: Move > signature from DTB to

[PATCH v2] pytest: Show a message when sandbox crashes

2021-10-08 Thread Simon Glass
When a test hands on a real board there is no way on the console to obtain any information about why it hung. With sandbox we can actually find out that it died and get a signal or exit code. Add this to make it easier to figure out what happened. So instead of: test/py/u_boot_spawn.py:171: in

Re: [PATCH] mtd: Add SPI Nor Flash chip GD25LQ256D ID

2021-10-08 Thread Bin Meng
HI Jagan, On Fri, Oct 8, 2021 at 8:58 PM Jagan Teki wrote: > > On Thu, Sep 30, 2021 at 4:24 PM wrote: > > > > From: "yanhong.wang" > > > > Signed-off-by: yanhong.wang > > --- > > Applied to u-boot-spi/master Did you address my comments when applying? Regards, Bin

[PATCH] pci: Fix printf format for regions

2021-10-08 Thread Pali Rohár
Correct printf format for unsigned long long is %llx and not %llxx. Signed-off-by: Pali Rohár --- drivers/pci/pci_auto_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci_auto_common.c b/drivers/pci/pci_auto_common.c index 5e7f3dbd10b5..b9a4aef1ecf8

Re: Please pull u-boot-marvell/master

2021-10-08 Thread Tom Rini
On Fri, Oct 08, 2021 at 11:23:10AM +0200, Stefan Roese wrote: > Hi Tom, > > please pull this first batch of Marvell MVEBU related patches: > Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-08 Thread Luka Kovacic
Hello Pali, On Fri, Oct 8, 2021 at 2:53 PM Pali Rohár wrote: > > Hello! > > On Friday 08 October 2021 14:09:23 Robert Marko wrote: > > From: Luka Kovacic > > > > The mac command is implemented to enable parsing Marvell hw_info formatted > > environments. This format is often used on Marvell

Re: [PATCH v2] mtd: spi-nor-core: Add fixups for s25fs512s

2021-10-08 Thread Jagan Teki
On Thu, Sep 30, 2021 at 11:02 AM wrote: > > From: Takahiro Kuwano > > The current S25FS512S support has following issues that need to be fixed. > > - Non-uniform sectors by factory default. The setting needs to be > checked and assign erase hook as needed. > - Page size is wrongly

Re: [PATCH 0/3] stm32mp: Attempt to resolve unintended breakage with v2021.10-rc2

2021-10-08 Thread Patrick DELAUNAY
On 10/8/21 1:28 PM, Marek Vasut wrote: On 10/8/21 11:18 AM, Patrick DELAUNAY wrote: Hi Alex, Hi, [...] Without loss of generality, any CONFIG that conflates u-boot options with SPL options is likely to cause some changes down the line. I have a issue today with the generic part of ARM

Re: [PATCH v2] mtd: spi-nor: Add support for Spansion S25FL256L

2021-10-08 Thread Jagan Teki
On Thu, Sep 30, 2021 at 7:53 AM wrote: > > From: Takahiro Kuwano > > The S25FL256L is a part of the S25FL-L family and has the same feature set > as S25FL128L except the density. > > The datasheet can be found in the following link. > https://www.cypress.com/file/316171/download > > The

Re: [PATCH] mtd: Add SPI Nor Flash chip GD25LQ256D ID

2021-10-08 Thread Jagan Teki
On Thu, Sep 30, 2021 at 4:24 PM wrote: > > From: "yanhong.wang" > > Signed-off-by: yanhong.wang > --- Applied to u-boot-spi/master

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-08 Thread Pali Rohár
Hello! On Friday 08 October 2021 14:09:23 Robert Marko wrote: > From: Luka Kovacic > > The mac command is implemented to enable parsing Marvell hw_info formatted > environments. This format is often used on Marvell Armada devices to store > parameters like the board serial number, factory MAC

Re: [PATCH v2] mtd: spi-nor-ids: Reinstate Micron MT25QL02G

2021-10-08 Thread Jagan Teki
On Tue, Oct 5, 2021 at 2:29 PM Marek Vasut wrote: > > This ID disappeared in 5b66fdb29dc ("mtd: spi: Remove unused files"), > add the ID back, since the chip is used on devices supported by U-Boot. > > Fixes: 5b66fdb29dc ("mtd: spi: Remove unused files") > Signed-off-by: Marek Vasut > Cc:

Re: [PATCH v4 5/5] sf: Provide a command to access memory-mapped SPI

2021-10-08 Thread Jagan Teki
On Mon, Sep 20, 2021 at 3:19 AM Simon Glass wrote: > > Add a new 'sf mmap' function to show the address of a SPI offset, if the > hardware supports it. This is useful on x86 systems. I'm not quite sure about growing sf for limited use cases, maybe support it in existing arguments might be a good

Re: [PATCH v4 4/5] sf: doc: Add documentation for the 'sf' command

2021-10-08 Thread Jagan Teki
On Mon, Sep 20, 2021 at 3:19 AM Simon Glass wrote: > > This command is fairly complicated so documentation is useful. > Unfortunately I an not sure how the MTD side of things works and cannot > find information about that. > > Signed-off-by: Simon Glass > > Acked-by: Pratyush Yadav > ---

Re: [PATCH v4 3/5] sf: Tidy up code to avoid #ifdef

2021-10-08 Thread Jagan Teki
On Mon, Sep 20, 2021 at 3:19 AM Simon Glass wrote: > > Update this code to use IS_ENABLED() instead. > > Signed-off-by: Simon Glass > > Reviewed-by: Pratyush Yadav > --- > Reviewed-by: Jagan Teki

Re: [PATCH v4 2/5] sf: Use const for the stage name

2021-10-08 Thread Jagan Teki
On Mon, Sep 20, 2021 at 3:19 AM Simon Glass wrote: > > This is not updated at runtime so should be marked const. Update the code > accordingly. > > Signed-off-by: Simon Glass > --- > Reviewed-by: Jagan Teki

Re: [PATCH v4 1/5] command: Use a constant pointer for the help

2021-10-08 Thread Jagan Teki
On Mon, Sep 20, 2021 at 3:19 AM Simon Glass wrote: > > This text should never change during execution, so it makes sense to > use a const char * so that it can be declared as const in the code. > Update struct cmd_tbl with a const char * pointer for 'help'. > > We cannot make usage const because

Re: [PATCH] mtd: cqspi: Wait for transfer completion

2021-10-08 Thread Jagan Teki
On Wed, Sep 15, 2021 at 2:05 PM Marek Vasut wrote: > > On 9/15/21 10:28 AM, Pratyush Yadav wrote: > > On 14/09/21 08:22PM, Marek Vasut wrote: > >> On 9/14/21 7:42 PM, Pratyush Yadav wrote: > >>> On 14/09/21 05:22AM, Marek Vasut wrote: > Wait for the read/write transfer finish bit get

Re: [PATCH] mtd: spinand: macronix: Fix ECC Status Read

2021-10-08 Thread Jagan Teki
On Sun, Sep 5, 2021 at 8:12 PM wrote: > > From: Haolin Li > > According to datasheet, the upper four bits are reserved or used for > reflecting the ECC status of the accumulated pages. The error bits > number for the worst segment of the current page is encoded on lower > four bits. Fix it by

Re: [PATCH v1] driver: spi: add bcm iproc qspi support.

2021-10-08 Thread Jagan Teki
On Wed, Aug 25, 2021 at 6:55 PM Bharat Kumar Reddy Gooty wrote: > > From: Rayagonda Kokatanur > > IPROC qspi driver supports both BSPI and MSPI modes. > > Signed-off-by: Rayagonda Kokatanur > Signed-off-by: Bharat Gooty > --- > drivers/spi/Kconfig | 6 + > drivers/spi/Makefile |

Re: Broken build with disabling OpenSSL crypto

2021-10-08 Thread Rudi Heitbaum
On Wed, Oct 06, 2021 at 05:05:24PM -0500, Alex G. wrote: > Hi Jernej, > > On 10/6/21 4:27 PM, Jernej ?krabec wrote: > > Hi everyone! > > > > Commit cb9faa6f98ae ("tools: Use a single target-independent config to > > enable > > OpenSSL") recently introduced option to disable usage of OpenSSL via

[PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-08 Thread Robert Marko
From: Luka Kovacic The mac command is implemented to enable parsing Marvell hw_info formatted environments. This format is often used on Marvell Armada devices to store parameters like the board serial number, factory MAC addresses and some other information. These parameters are usually written

[PATCH 2/2] arm: mvebu: add Globalscale MOCHAbin support

2021-10-08 Thread Robert Marko
Globalscale MOCHAbin is a Armada 7040 based development board. Specifications: * Armada 7040 Quad core ARMv8 Cortex A-72 @ 1.4GHz * 2 / 4 / 8 GB of DDR4 DRAM * 16 GB eMMC * 4MB SPI-NOR (Bootloader) * 1x M.2-2280 B-key socket (for SSD expansion, SATA3 only) * 1x M.2-2250 B-key socket (for modems,

Re: [PATCH 0/3] stm32mp: Attempt to resolve unintended breakage with v2021.10-rc2

2021-10-08 Thread Marek Vasut
On 10/8/21 11:18 AM, Patrick DELAUNAY wrote: Hi Alex, Hi, [...] Without loss of generality, any CONFIG that conflates u-boot options with SPL options is likely to cause some changes down the line. I have a issue today with the generic part of ARM support: 1/ the PSCI is mandatory for

Please pull u-boot-marvell/master

2021-10-08 Thread Stefan Roese
Hi Tom, please pull this first batch of Marvell MVEBU related patches: - a37xx: pci: Increase PCIe IO size from 64 KiB to 1 MiB (Pali) - phy: marvell: a3700: Misc improvements (Pali) - a38x serdes cleanup (Pali) - A3720 PCIe

Re: [PATCH] arm: mvebu: Select SPL_SKIP_LOWLEVEL_INIT on ARMADA_32BIT

2021-10-08 Thread Stefan Roese
On 03.10.21 11:53, Stefan Roese wrote: Select SPL_SKIP_LOWLEVEL_INIT on 32bit Armada platforms via Kconfig, as this was removed from mach/config.h in a2ac2b96 ("Convert CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig"). Signed-off-by: Stefan Roese Fixes: a2ac2b96 ("Convert CONFIG_SKIP_LOWLEVEL_INIT

Re: [PATCH] ARM: mvebu: x530: Remove custom kwbimage.cfg

2021-10-08 Thread Stefan Roese
On 08.10.21 07:52, Stefan Roese wrote: On 07.10.21 10:39, Chris Packham wrote: Commit ca1a4c863232 ("mvebu: select boot device at SoC level") made it unnecessary for the A385 boards to have their own kwbimage.cfg but as the x530 was in flight at the time it was added with it's own kwbimage.cfg.

Re: [PATCH 2/2] arm: mvebu: mvebu_armada-8k: drop Puzzle M801 early init code

2021-10-08 Thread Stefan Roese
On 08.10.21 08:13, Stefan Roese wrote: On 04.10.21 15:12, Robert Marko wrote: Since the CP1 pinctrl is not properly set in the DTS, there is no need for setting the pinctrl by writing hardcoded values to the MPP registers. So, drop the code relating to that. Fixes: 87c220d0 ("arm: mvebu:

Re: [PATCH 1/2] arm: mvebu: dts: m801: correct CP1 pinctrl

2021-10-08 Thread Stefan Roese
On 08.10.21 08:12, Stefan Roese wrote: On 04.10.21 15:12, Robert Marko wrote: Current CP1 pinctrl that is set on the Puzzle M801 is incorrect. CP1 pins are only used for the SMI bus and the MSS I2C, all other pins are just GPIO-s. Due to this being set completely wrong, the pinctrl was

  1   2   >