Re: [cmd] clarification on syntax of 'chpart' command

2021-05-06 Thread Wolfgang Denk
Dear Adarsh, In message you wrote: > > I was trying to verify and use 'chpart' command on Beaglebone black with an > SDHC card ( with multiple partitions ) and am unable to get its exact > syntax.Is this command applicable to > any particular category of storage devices (viz. NOR flash,NAND flas

Re: [RFC] efi_loader: improve firmware capsule authentication

2021-05-06 Thread AKASHI Takahiro
Heinrich, On Mon, Apr 26, 2021 at 11:44:59AM +0900, AKASHI Takahiro wrote: > Heinrich, > > Do you have any comments? > # not only on this issue, but also other issues that I pointed out > # in the initial RFC. Ping? -Takahiro Akashi > On Fri, Apr 23, 2021 at 02:38:09PM +0530, Sughosh Ganu wrot

[PATCH 6/7] rtc: davinci: add driver model support

2021-05-06 Thread Dario Binacchi
Update the driver to support the device tree and the driver model. The read / write helpers in rtc_ops allow access to scratch registers only. The offset parameter is added to the address of the scratch0 register. Signed-off-by: Dario Binacchi --- drivers/rtc/davinci.c | 373 +++

[PATCH 5/7] arm: dts: sync rtc node of am335x boards with Linux 5.9-rc7

2021-05-06 Thread Dario Binacchi
There have been some changes to the am335x- DTs related to the rtc node, so let's re-syncs them with Linux. Signed-off-by: Dario Binacchi --- arch/arm/dts/am335x-bone-common.dtsi| 5 + arch/arm/dts/am335x-evm.dts | 5 + arch/arm/dts/am335x-evmsk.dts | 5 +

[PATCH 7/7] rtc: davinci: fix date loaded on reset

2021-05-06 Thread Dario Binacchi
On reset, the RTC loads the 2000-01-01 date with a wrong day of the week (Sunday instead of Saturday). Signed-off-by: Dario Binacchi --- drivers/rtc/davinci.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/rtc/davinci.c b/drivers/rtc/davinci.c index b0a077cba7..88fd56b

[PATCH 4/7] rtc: davinci: use unlock/lock mechanism

2021-05-06 Thread Dario Binacchi
The RTC module contains a kicker mechanism to prevent any spurious writes from changing the register values. To set the time, you must first unlock the TC registers, update them and then lock. Signed-off-by: Dario Binacchi --- drivers/rtc/davinci.c | 14 ++ 1 file changed, 14 insert

[PATCH 3/7] rtc: davinci: check BUSY bit before set TC registers

2021-05-06 Thread Dario Binacchi
To write correct data to the TC registers, the STATUS register must be read until the BUSY bit is equal to zero. Once the BUSY flag is zero, there is a 15 μs access period in which the TC registers can be programmed. The rtc_wait_not_busy() has been inspired by the Kernel. Signed-off-by: Dario Bin

[PATCH 2/7] rtc: davinci: replace 32bit access with 8bit access

2021-05-06 Thread Dario Binacchi
Use 32-bit access only where it is needed. Most of the RTC registers contain useful information in the 8 least significant bits, the others are reserved. Signed-off-by: Dario Binacchi --- drivers/rtc/davinci.c | 32 1 file changed, 16 insertions(+), 16 deletions

[PATCH 1/7] rtc: davinci: enable compilation for omap architectures

2021-05-06 Thread Dario Binacchi
The Davinci's onchip RTC is also present on TI OMAP1, AM33XX, AM43XX and DRA7XX SOCs. So, let's enable compilation for these architectures too. Signed-off-by: Dario Binacchi --- drivers/rtc/Kconfig | 7 +++ drivers/rtc/davinci.c | 11 --- 2 files changed, 15 insertions(+), 3 dele

[PATCH 0/7] rtc: davinci: add driver model support

2021-05-06 Thread Dario Binacchi
The series adds driver model support for omap RTC plus some fixes. Dario Binacchi (7): rtc: davinci: enable compilation for omap architectures rtc: davinci: replace 32bit access with 8bit access rtc: davinci: check BUSY bit before set TC registers rtc: davinci: use unlock/lock mechanism

[v3] armv8: ls1012a: Pass PPFE firmware to Linux through FDT

2021-05-06 Thread Biwen Li
From: Chaitanya Sakinam Read Linux PPFE firmware from flash partition and pass it to Linux through FDT entry. So that we can avoid placing PPFE firmware in Linux rootfs. (FDT may increase at max by 64KB) Signed-off-by: Chaitanya Sakinam Signed-off-by: Anji J Signed-off-by: Biwen Li --- Change

Re: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC

2021-05-06 Thread Tianrui Wei
On 5/7/2021 11:41 AM, Sean Anderson wrote: On 5/6/21 11:28 PM, Tianrui Wei wrote: On 5/7/2021 11:15 AM, Sean Anderson wrote: On 5/6/21 11:06 PM, Tianrui Wei wrote: Hi Sean, Many thanks again for reviewing our code! We really appreciate it. Will fix the things you're suggesting ;p Though

Re: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC

2021-05-06 Thread Sean Anderson
On 5/6/21 11:28 PM, Tianrui Wei wrote: On 5/7/2021 11:15 AM, Sean Anderson wrote: On 5/6/21 11:06 PM, Tianrui Wei wrote: Hi Sean, Many thanks again for reviewing our code! We really appreciate it. Will fix the things you're suggesting ;p Though I have a few questions in line in the comment

Re: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC

2021-05-06 Thread Tianrui Wei
On 5/7/2021 11:15 AM, Sean Anderson wrote: On 5/6/21 11:06 PM, Tianrui Wei wrote: Hi Sean, Many thanks again for reviewing our code! We really appreciate it. Will fix the things you're suggesting ;p Though I have a few questions in line in the comment. Also, checkpatch didn't catch any of

Re: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC

2021-05-06 Thread Sean Anderson
On 5/6/21 11:06 PM, Tianrui Wei wrote: Hi Sean, Many thanks again for reviewing our code! We really appreciate it. Will fix the things you're suggesting ;p Though I have a few questions in line in the comment. Also, checkpatch didn't catch any of the identation issues. I was wondering if the

Re: [PATCH V4 1/2] mmc: add OpenPiton mmc support

2021-05-06 Thread Sean Anderson
On 5/6/21 10:57 PM, Tianrui Wei wrote: Hi Sean, Thanks for reviewing the patches, I'll fix the initialization thing and the tegra_mmc credit :P Please also add a changelog to your next revision. It helps reviewers know what you have fixed. --Sean On 5/7/2021 10:55 AM, Sean Anderson wrote

Re: [PATCH V4 1/2] mmc: add OpenPiton mmc support

2021-05-06 Thread Tianrui Wei
Hi Sean, Thanks for reviewing the patches, I'll fix the initialization thing and the tegra_mmc credit :P On 5/7/2021 10:55 AM, Sean Anderson wrote: On 5/6/21 10:50 PM, Tianrui Wei wrote: Hi Sean, Many thanks for taking your valuable time to review our patch and give suggestions. I'll impro

Re: [PATCH V4 1/2] mmc: add OpenPiton mmc support

2021-05-06 Thread Sean Anderson
On 5/6/21 10:50 PM, Tianrui Wei wrote: Hi Sean, Many thanks for taking your valuable time to review our patch and give suggestions. I'll improve both our patches accordingly. Just for the record, what would be the exact command you'd recommend to run checkpatch.pl? Because it only showed one war

Re: [PATCH V4 1/2] mmc: add OpenPiton mmc support

2021-05-06 Thread Tianrui Wei
Hi Sean, Many thanks for taking your valuable time to review our patch and give suggestions. I'll improve both our patches accordingly. Just for the record, what would be the exact command you'd recommend to run checkpatch.pl? Because it only showed one warning about me not putting my name on

Re: [PATCH 12/49] image: Create a function to do manual relocation

2021-05-06 Thread Simon Glass
Hi Rasmus, On Tue, 4 May 2021 at 01:17, Rasmus Villemoes wrote: > > On 04/05/2021 01.10, 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 > > --- > > > > (n

Re: [PATCH V4 1/2] mmc: add OpenPiton mmc support

2021-05-06 Thread Sean Anderson
On 5/5/21 11:40 PM, Tianrui Wei wrote: From: Tianrui Wei Date: Thu, 6 May 2021 11:30:20 +0800 Subject: [PATCH V4 1/2] mmc: add OpenPiton mmc support This patch adds mmc support for OpenPiton. Specifically, some dts bindings were not used because our mmc controller doens't have those configurati

Re: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC

2021-05-06 Thread Sean Anderson
On 5/5/21 11:42 PM, Tianrui Wei wrote: From: Tianrui Wei Date: Thu, 6 May 2021 11:30:20 +0800 Subject: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC This patch add board support for OpenPiton. Please add some information to the commit message describing the board. Signed-off-by: Tianr

Re: [PULL] u-boot-riscv/master

2021-05-06 Thread Sean Anderson
On 5/6/21 9:41 PM, Leo Liang wrote: On Fri, May 07, 2021 at 09:09:43AM +0800, Tom Rini wrote: On Fri, May 07, 2021 at 09:06:33AM +0800, Leo Liang wrote: Hi Tom, CI result: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/7400 The following changes since commit 8ddaf94358975

Re: [PULL] u-boot-riscv/master

2021-05-06 Thread Sean Anderson
Hi Leo, Are you maintaining RISC-V now? Should I be CC-ing you on my series? Can you update MAINTAINERS with this information? Thanks. --Sean On 5/6/21 9:06 PM, Leo Liang wrote: Hi Tom, CI result: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/7400 The following changes s

Re: [PULL] u-boot-riscv/master

2021-05-06 Thread Leo Liang
On Fri, May 07, 2021 at 09:09:43AM +0800, Tom Rini wrote: > On Fri, May 07, 2021 at 09:06:33AM +0800, Leo Liang wrote: > > > Hi Tom, > > > > CI result: > > https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/7400 > > > > The following changes since commit 8ddaf943589756442bba21e5b

[PATCH] Makefile: Handle building in a very old build directory

2021-05-06 Thread Simon Glass
Versions of U-Boot before 2014.01 created a symlink from include/asm to the architecture-specific header directory. If an ARM board is build with that old version, then sandbox is built on a more recent version (both with in-tree builds), the include/asm symlink confuses the build system. It picks

Re: [PULL] u-boot-riscv/master

2021-05-06 Thread Tom Rini
On Fri, May 07, 2021 at 09:06:33AM +0800, Leo Liang wrote: > Hi Tom, > > CI result: > https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/7400 > > The following changes since commit 8ddaf943589756442bba21e5be645cd47526d82b: > > Merge tag 'dm-pull-29apr21' of > https://source.d

[PULL] u-boot-riscv/master

2021-05-06 Thread Leo Liang
Hi Tom, CI result: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/7400 The following changes since commit 8ddaf943589756442bba21e5be645cd47526d82b: Merge tag 'dm-pull-29apr21' of https://source.denx.de/u-boot/custodians/u-boot-dm (2021-04-29 21:03:38 -0400) are available

[PATCH v2] armv8: Update erratum number to align with doc

2021-05-06 Thread Ran Wang
Change the USB erratum number A-050106 to A-050204 as A-050106 is a duplicate and never be published. Fixes 0cfa00cdb94 (“armv8: Add workaround for USB erratum A-050106”) Signed-off-by: Ran Wang --- Change in v2: - Update copyright information. arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 8 +++

Re: [PATCHv3 14/26] power: domain: Introduce driver for raw TI K3 PDs

2021-05-06 Thread Jaehoon Chung
Hi Tero, On 5/6/21 2:55 AM, Tero Kristo wrote: > From: Tero Kristo > > Normally, power domains are handled via TI-SCI in K3 SoCs. However, > SPL is not going to have access to sysfw resources, so it must control > them directly. Add driver for supporting this. > > Signed-off-by: Tero Kristo >

Re: [PATCH 3/3] pci: pcie_dw_rockchip: Use udelay instead of msleep

2021-05-06 Thread Anand Moon
Hi Patrick, On Wed, 28 Apr 2021 at 00:57, Patrick Wildt wrote: > > Am Tue, Apr 27, 2021 at 11:11:19AM +0530 schrieb Anand Moon: > > hi Patrick, > > > > On Tue, 27 Apr 2021 at 01:38, Patrick Wildt wrote: > > > > > > Am Mon, Apr 26, 2021 at 01:26:32PM + schrieb Anand Moon: > > > > Use udelay i

Re: [PATCH v2 01/50] lib: Add memdup()

2021-05-06 Thread Sean Anderson
On 5/6/21 1:41 PM, Simon Glass wrote: > Hi Pratyush, > > On Thu, 6 May 2021 at 10:07, Pratyush Yadav wrote: >> >> On 06/05/21 08:23AM, Simon Glass wrote: >>> Add a function to duplicate a memory region, a little like strdup(). >>> >>> Signed-off-by: Simon Glass >>> --- >>> >>> Changes in v2:

Re: [PATCH 17/17] configs: am64x_evm_a53: Add Initial support

2021-05-06 Thread Vignesh Raghavendra
On 4/23/21 9:57 PM, Dave Gerlach wrote: > Add initial A53 defconfig support for AM64x SoCs. > > Signed-off-by: Dave Gerlach > --- > configs/am64x_evm_a53_defconfig | 96 + > 1 file changed, 96 insertions(+) > create mode 100644 configs/am64x_evm_a53_defconfig

Re: [PATCH v2 01/50] lib: Add memdup()

2021-05-06 Thread Simon Glass
Hi Pratyush, On Thu, 6 May 2021 at 10:07, Pratyush Yadav wrote: > > On 06/05/21 08:23AM, Simon Glass wrote: > > Add a function to duplicate a memory region, a little like strdup(). > > > > Signed-off-by: Simon Glass > > --- > > > > Changes in v2: > > - Add a patch to introduce a memdup() functio

Re: [PATCH v2 01/50] lib: Add memdup()

2021-05-06 Thread Pratyush Yadav
On 06/05/21 08:23AM, Simon Glass wrote: > Add a function to duplicate a memory region, a little like strdup(). > > Signed-off-by: Simon Glass > --- > > Changes in v2: > - Add a patch to introduce a memdup() function > > include/linux/string.h | 13 + > lib/string.c | 13 +

Re: [PATCH 0/9] riscv: Partially move to binman to generate u-boot.itb

2021-05-06 Thread Simon Glass
Hi Bin, On Wed, 5 May 2021 at 19:42, Bin Meng wrote: > > Hi Simon, > > On Thu, May 6, 2021 at 7:37 AM Simon Glass wrote: > > > > Hi Bin, > > > > On Wed, 5 May 2021 at 08:16, Bin Meng wrote: > > > > > > This series updates binman to handle creation of u-boot.itb image for > > > RISC-V SiFive Unl

Re: [PATCH v3 03/20] drivers: reset: Handle gracefully NULL pointers

2021-05-06 Thread Simon Glass
Hi Kishon, On Thu, 6 May 2021 at 07:09, Kishon Vijay Abraham I wrote: > > Hi Simon, > > On 06/05/21 5:07 am, Simon Glass wrote: > > Hi Kishon, > > > > On Tue, 4 May 2021 at 21:25, Kishon Vijay Abraham I wrote: > >> > >> Hi Simon, > >> > >> On 04/05/21 10:28 pm, Simon Glass wrote: > >>> Hi Kishon

Re: [PATCH v4 5/5] test: Add gpio-sysinfo test

2021-05-06 Thread Tom Rini
On Tue, Apr 20, 2021 at 10:50:58AM -0400, Sean Anderson wrote: > This adds a test for the gpio-sysinfo driver. > > Signed-off-by: Sean Anderson > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v2 2/2] sandbox: add test of CONFIG_ENV_IMPORT_FDT

2021-05-06 Thread Tom Rini
On Wed, Apr 21, 2021 at 11:06:55AM +0200, Rasmus Villemoes wrote: > Check that a variable defined in /config/environment is found in the > run-time environment, and that clearing fdt_env_path from within that > node works. > > Reviewed-by: Simon Glass > Signed-off-by: Rasmus Villemoes > Acked-b

Re: [PATCH v2 1/2] env: allow environment to be amended from control dtb

2021-05-06 Thread Tom Rini
On Wed, Apr 21, 2021 at 11:06:54AM +0200, Rasmus Villemoes wrote: > It can be useful to use the same U-Boot binary for multiple purposes, > say the normal one, one for developers that allow breaking into the > U-Boot shell, and one for use during bootstrapping which runs a > special-purpose bootcm

Re: [Uboot-stm32] [PATCH 2/2] cmd: pinmux: support pin name in status command

2021-05-06 Thread Simon Glass
Hi Patrick, On Thu, 6 May 2021 at 02:38, Patrick DELAUNAY wrote: > > Hi, > > On 4/29/21 6:10 PM, Simon Glass wrote: > > Hi Patrick, > > > > On Wed, 28 Oct 2020 at 03:06, Patrick Delaunay > > wrote: > >> Allow pin name parameter for pimux staus command, > >> as gpio command to get status of one

Re: [PATCH v4 4/5] sysinfo: Add gpio-sysinfo driver

2021-05-06 Thread Tom Rini
On Tue, Apr 20, 2021 at 10:50:57AM -0400, Sean Anderson wrote: > This uses the newly-added dm_gpio_get_values_as_int_base3 function to > implement a sysinfo device. The revision map is stored in the device tree. > > Signed-off-by: Sean Anderson > Reviewed-by: Simon Glass Applied to u-boot/mast

Re: [PATCH v4 3/5] sysinfo: Require that sysinfo_detect be called before other methods

2021-05-06 Thread Tom Rini
On Tue, Apr 20, 2021 at 10:50:56AM -0400, Sean Anderson wrote: > This has the uclass enforce calling detect() before other methods. This > allows drivers to cache information in detect() and perform (cheaper) > retrieval in the other accessors. This also modifies the only instance > where this se

Re: [PATCH v4 2/5] sysinfo: Use global sysinfo IDs for existing sysinfo drivers

2021-05-06 Thread Tom Rini
On Tue, Apr 20, 2021 at 10:50:55AM -0400, Sean Anderson wrote: > Since 07c9e683a4 ("smbios: Allow a few values to come from sysinfo") > there are common global sysinfo IDs. This patch moved existing IDs above > SYSINFO_ID_USER. > > Signed-off-by: Sean Anderson > Reviewed-by: Simon Glass Applie

Re: [PATCH v4 1/5] dm: gpio: Fix gpio_get_list_count failing with livetree

2021-05-06 Thread Tom Rini
On Tue, Apr 20, 2021 at 10:50:54AM -0400, Sean Anderson wrote: > of_parse_phandle_with_args (called by dev_read_phandle_with_args) does not > support getting the length of a phandle list by using the index -1. > Instead, use dev_count_phandle_with_args which supports exactly this > use-case. > >

Re: [PATCH v2] cmd: gpt: Add option to write GPT partitions to environment variable

2021-05-06 Thread Tom Rini
On Fri, Feb 26, 2021 at 10:17:33AM -0800, Farhan Ali wrote: > This change would enhance the existing 'gpt read' command to allow > (optionally) writing of the read GPT partitions to an environment > variable in the UBOOT partitions layout format. This would allow users > to easily change the overa

Re: [PATCH] fdt_support.c: Allow late kernel cmdline modification

2021-05-06 Thread Tom Rini
On Mon, Feb 22, 2021 at 07:18:51PM +, Niko Mauno wrote: > By declaring board-specific board_fdt_chosen_bootargs() the kernel > command line arguments can be adjusted before injecting to flat dt > chosen node. > > Signed-off-by: Niko Mauno Applied to u-boot/master, thanks! -- Tom signatu

[PATCH v2] psci: rename psci_features function

2021-05-06 Thread Igor Opaniuk
From: Igor Opaniuk s/psci_features/request_psci_features/g for the case when both ARCH_SUPPORT_PSCI=y and ARM_PSCI_FW=y, that leads to these compilation issues: drivers/firmware/psci.c:69:12: error: conflicting types for 'psci_features' 69 | static int psci_features(u32 psci_func_id) |

[PATCH v2 44/50] image: Reduce variable scope in boot_get_ramdisk()

2021-05-06 Thread Simon Glass
Move the variables declarations to where they are needed, to reduce the number of #ifdefs needed. Signed-off-by: Simon Glass --- (no changes since v1) common/image-board.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/common/image-board.c b/common

[PATCH v2 36/50] image: Drop IMAGE_ENABLE_IGNORE

2021-05-06 Thread Simon Glass
We can use the new host_build() function for this, so drop it. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fit.c | 2 +- include/image.h| 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index 070835b3a87..c1

[PATCH v2 23/50] image: Drop IMAGE_ENABLE_OF_LIBFDT

2021-05-06 Thread Simon Glass
Add a host Kconfig for OF_LIBFDT. With this we can use CONFIG_IS_ENABLED(OF_LIBFDT) directly in the host build, so drop the unnecessary indirection. Signed-off-by: Simon Glass --- (no changes since v1) arch/arc/lib/bootm.c| 2 +- arch/arm/lib/bootm.c| 4 ++-- arch/microblaze/li

[PATCH v2 26/50] image: Use Kconfig to enable FIT_RSASSA_PSS on host

2021-05-06 Thread Simon Glass
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. Signed-off-by: Simon Glass --- (no changes since v1) common/image-sig.c | 4 ++-- include/image.h | 3 --- include

[PATCH v2 32/50] image: Drop IMAGE_ENABLE_SHAxxx

2021-05-06 Thread Simon Glass
We already have a host Kconfig for these SHA options. Use CONFIG_IS_ENABLED(SHAxxx) directly in the code shared with the host build, so we can drop the unnecessary indirections. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fit.c | 6 +++--- include/image.h| 21 ---

[PATCH v2 16/50] image: Add Kconfig options for FIT in the host build

2021-05-06 Thread Simon Glass
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_HOST_xxx is distinct from CONFIG_xxx. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v2 33/50] image: Drop IMAGE_BOOT_GET_CMDLINE

2021-05-06 Thread Simon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Update the only place where this is used and drop it. Signed-off-by: Simon Glass --- (no changes since v1) common/image-board.c | 2 +- include/image.h | 6 -- 2 files changed, 1 insertion(+), 7 deletions(-)

[PATCH v2 17/50] kconfig: Add host support to CONFIG_IS_ENABLED()

2021-05-06 Thread Simon Glass
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. It would be more convenient if we could use, for example, CONFIG_IS_ENABLED

[PATCH v2 22/50] image: Drop IMAGE_ENABLE_FIT

2021-05-06 Thread Simon Glass
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 --- (no changes since v1) arch/arm/mach-imx/hab.c | 2 +- common/bootm.c | 10 +- common/image-board.c

[PATCH v2 28/50] image: Drop IMAGE_ENABLE_CRC32

2021-05-06 Thread Simon Glass
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. Also update hash.c to make crc32 optional. Signed-off-by: Simon Glass

[PATCH v2 29/50] Kconfig: Rename SPL_MD5_SUPPORT to SPL_MD5

2021-05-06 Thread Simon Glass
Drop the _SUPPORT suffix so we can use CONFIG_IS_ENABLED() with this option. Signed-off-by: Simon Glass --- (no changes since v1) common/spl/Kconfig | 2 +- include/image.h| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 8

[PATCH v2 42/50] image: Drop #ifdefs for fit_print_contents()

2021-05-06 Thread Simon Glass
Use a simple return to drop the unwanted code. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fit.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index 3ee306143b3..f8aa61fc99d 100644 --- a/common/imag

[PATCH v2 19/50] image: Rename SPL_SHAxxx_SUPPORT to SPL_FIT_SHAxxx

2021-05-06 Thread Simon Glass
These option are named inconsistently with other SPL options, thus making them incompatible with the CONFIG_IS_ENABLED() macro. Rename them. Signed-off-by: Simon Glass --- (no changes since v1) common/spl/Kconfig | 8 include/image.h| 8 2 files changed, 8 insertions(+),

[PATCH v2 30/50] image: Drop IMAGE_ENABLE_MD5

2021-05-06 Thread Simon Glass
Add a host Kconfig for MD5. With this we can use CONFIG_IS_ENABLED(MD5) directly in the host build, so drop the unnecessary indirection. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fit.c | 2 +- include/image.h| 8 tools/Kconfig | 5 + 3 files change

[PATCH v2 41/50] image: Drop unnecessary #ifdefs from image.h

2021-05-06 Thread Simon Glass
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 --- (no changes since v1) include/image.h| 40 -- include/u-boot/hash-checksum.h | 5 +++-

[PATCH v2 27/50] Kconfig: Rename SPL_CRC32_SUPPORT to SPL_CRC32

2021-05-06 Thread Simon Glass
Drop the _SUPPORT suffix so we can use CONFIG_IS_ENABLED() with this option. Signed-off-by: Simon Glass --- (no changes since v1) common/spl/Kconfig| 4 ++-- configs/axm_defconfig | 2 +- configs/chromebit_mickey_defconfig| 2 +- configs/chro

[PATCH v2 37/50] image: Drop IMAGE_ENABLE_SIGN/VERIFY defines

2021-05-06 Thread Simon Glass
Add host Kconfigs for FIT_SIGN and RSA_VERIFY. With these we can use CONFIG_IS_ENABLED() directly in the host build, so drop the unnecessary indirections IMAGE_ENABLE_SIGN and HOST_RSA_VERIFY. Also drop FIT_IMAGE_ENABLE_VERIFY which is not actually used. Leave IMAGE_ENABLE_VERIFY_ECDSA along since

[PATCH v2 20/50] hash: Use Kconfig to enable hashing in host tools

2021-05-06 Thread Simon Glass
At present when building host tools, we force CONFIG_SHA1 to be enabled regardless of the board Kconfig setting. This is done in the image.h header file. Clean this up by adding new Kconfig options to enable hashing on the host, relying on CONFIG_IS_ENABLED() to deal with the different builds. To

[PATCH v2 35/50] image: Drop IMAGE_OF_SYSTEM_SETUP

2021-05-06 Thread Simon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fdt.c | 2 +- include/image.h| 6 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/common/image-fdt.c b/common/image-

[PATCH v2 38/50] image: Drop IMAGE_ENABLE_BEST_MATCH

2021-05-06 Thread Simon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fit.c | 2 +- include/image.h| 5 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/common/image-fit.c b/common/image-f

[PATCH v2 31/50] image: Drop IMAGE_ENABLE_SHA1

2021-05-06 Thread Simon Glass
We already have a host Kconfig for SHA1. Use CONFIG_IS_ENABLED(SHA1) directly in the code shared with the host build, so we can drop the unnecessary indirection. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fit.c | 2 +- include/image.h| 11 --- 2 files change

[PATCH v2 21/50] hash: Drop some #ifdefs in hash.c

2021-05-06 Thread Simon Glass
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. This should really use a driver approach, e.g. as is done with partition dri

[PATCH v2 18/50] image: Shorten FIT_ENABLE_SHAxxx_SUPPORT

2021-05-06 Thread Simon Glass
The ENABLE part of this name is redundant, since all boolean Kconfig options serve to enable something. The SUPPORT part is also redundant since Kconfigs can be assumed to enable support for something. Together they just serve to make these options overly long and inconsistent with other options.

[PATCH v2 24/50] image: Use Kconfig to enable CONFIG_FIT_VERBOSE on host

2021-05-06 Thread Simon Glass
Add a host Kconfig for FIT_VERBOSE. With this we can use CONFIG_IS_ENABLED(FIT_VERBOSE) directly in the host build, so drop the forcing of this in the image.h header. Signed-off-by: Simon Glass --- (no changes since v1) include/image.h | 5 ++--- tools/Kconfig | 5 + 2 files changed, 7 i

[PATCH v2 34/50] image: Drop IMAGE_OF_BOARD_SETUP

2021-05-06 Thread Simon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fdt.c | 4 ++-- include/image.h| 6 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/common/image-fdt.c b/common/ima

[PATCH v2 25/50] image: Rename CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT

2021-05-06 Thread Simon Glass
Drop the ENABLE and SUPPORT parts of this, which are redundant. Signed-off-by: Simon Glass --- (no changes since v1) common/Kconfig.boot | 2 +- common/image-sig.c | 4 ++-- configs/bcm963158_ram_defconfig | 2 +- configs/sandbox_defconfig | 2 +- include/image.h

[PATCH v2 43/50] image: Drop most #ifdefs in image-board.c

2021-05-06 Thread Simon Glass
Remove ifdefs in this file, so far as possible without too much refactoring. Signed-off-by: Simon Glass --- (no changes since v1) common/image-board.c | 111 +++ include/image.h | 7 ++- 2 files changed, 55 insertions(+), 63 deletions(-) diff --g

[PATCH v2 45/50] image: Split up boot_get_ramdisk()

2021-05-06 Thread Simon Glass
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 this up along with checkpatch violations. Signed-off-by: Simon Glass ---

[PATCH v2 50/50] image: Remove #ifdefs from select_fdt()

2021-05-06 Thread Simon Glass
Use boolean variables to deal with the strange #ifdef logic of this function, so we can remove the #ifdefs. Also drop one from its caller, boot_get_fdt() Signed-off-by: Simon Glass --- Changes in v2: - Correct logic for the non-FIT case - Consider selecting a raw FDT to be success common/image

[PATCH v2 49/50] image: Split up boot_get_fdt()

2021-05-06 Thread Simon Glass
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 --- (no changes since v1) common/image-fdt.c | 227 + 1 file changed, 127 insert

[PATCH v2 48/50] image: Reduce variable scope in boot_get_fdt()

2021-05-06 Thread Simon Glass
Move the variables declarations to where they are needed, to reduce the number of #ifdefs needed. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fdt.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/common/image-fdt.c b/common/im

[PATCH v2 47/50] image: Remove some #ifdefs from image-fit and image-fit-sig

2021-05-06 Thread Simon Glass
Drop the #ifdefs which are easy to remove without refactoring. Signed-off-by: Simon Glass --- (no changes since v1) common/Kconfig.boot| 10 ++ common/image-fit-sig.c | 8 ++-- common/image-fit.c | 7 --- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a

[PATCH v2 46/50] image: Remove #ifdefs from select_ramdisk()

2021-05-06 Thread Simon Glass
Use boolean variables to deal with the strange #ifdef logic of this function, so we can remove the #ifdefs. Signed-off-by: Simon Glass --- (no changes since v1) common/image-board.c | 139 ++- 1 file changed, 72 insertions(+), 67 deletions(-) diff --git

[PATCH v2 40/50] image: Tidy up fit_unsupported_reset()

2021-05-06 Thread Simon Glass
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 --- (no changes since v1) common/bootm_os.c | 8 include/image.h |

[PATCH v2 10/50] image: Split board code out into its own file

2021-05-06 Thread Simon Glass
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 --- (no changes since v1) common/Makefile | 2 +- common/image-board.c | 925

[PATCH v2 39/50] image: Drop IMAGE_ENABLE_EN/DECRYPT defines

2021-05-06 Thread Simon Glass
Add a host Kconfigs for IMAGE_ENABLE_ENCRYPT. With this we can use CONFIG_IS_ENABLED() directly in the host build, so drop the unnecessary indirections IMAGE_IMAGE_ENABLE_ENCRYPT and IMAGE_IMAGE_ENABLE_DECRYPT. Signed-off-by: Simon Glass --- (no changes since v1) common/image-cipher.c | 6 +++

[PATCH v2 15/50] image: Remove ifdefs around image_setup_linux() el at

2021-05-06 Thread Simon Glass
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 --- (no changes since v1) common/bootm.c | 16 common/image-board.c | 11 +++ 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a

[PATCH v2 14/50] image: Avoid #ifdefs for manual relocation

2021-05-06 Thread Simon Glass
Add a macro to handle manually relocating a pointer. Update the iamge code to use this to avoid needing #ifdefs. Signed-off-by: Simon Glass --- (no changes since v1) common/image-sig.c | 43 --- include/relocate.h | 6 ++ 2 files changed, 30 inserti

[PATCH v2 13/50] image: Create a function to do manual relocation

2021-05-06 Thread Simon Glass
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 --- (no changes since v1) common/image.c | 33 +++-- include/relocate.h | 24 +++- 2 fil

[PATCH v2 11/50] image: Fix up checkpatch warnings in image-board.c

2021-05-06 Thread Simon Glass
Tidy up the warnings. Signed-off-by: Simon Glass --- (no changes since v1) common/image-board.c | 142 ++- 1 file changed, 72 insertions(+), 70 deletions(-) diff --git a/common/image-board.c b/common/image-board.c index 0c4e32e14e4..5d3eafb5245 100644 -

[PATCH v2 12/50] image: Split host code out into its own file

2021-05-06 Thread Simon Glass
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 --- (no changes since v1) common/image-board.c | 17 + common/image-host.c | 27 +++ common/

[PATCH v2 09/50] image: Update image_decomp() to avoid ifdefs

2021-05-06 Thread Simon Glass
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, since that is the purpose of the value. This appears to have no impact on

[PATCH v2 08/50] gzip: Avoid use of u64

2021-05-06 Thread Simon Glass
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 to that of the 'unsigned long' type seems good enough. On 32-bit machines

[PATCH v2 07/50] image: Update zstd to avoid reporting error twice

2021-05-06 Thread Simon Glass
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 --- (no changes since v1) common/image.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) d

[PATCH v2 06/50] image: Avoid switch default in image_decomp()

2021-05-06 Thread Simon Glass
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 are here. Signed-off-by: Simon Glass --- (no changes since v1) comm

[PATCH v2 02/50] Add support for an owned buffer

2021-05-06 Thread Simon Glass
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 image, using a temporary buffer for reading (since the compressed data has

[PATCH v2 05/50] btrfs: Use U-Boot API for decompression

2021-05-06 Thread Simon Glass
Use the common function to avoid code duplication. Acked-by: Qu Wenruo Signed-off-by: Simon Glass --- (no changes since v1) fs/btrfs/compression.c | 51 +- 1 file changed, 5 insertions(+), 46 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/

[PATCH v2 04/50] zstd: Create a function for use from U-Boot

2021-05-06 Thread Simon Glass
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. Note that the zstd code lacks a test in test/compression.c and this should be

[PATCH v2 01/50] lib: Add memdup()

2021-05-06 Thread Simon Glass
Add a function to duplicate a memory region, a little like strdup(). Signed-off-by: Simon Glass --- Changes in v2: - Add a patch to introduce a memdup() function include/linux/string.h | 13 + lib/string.c | 13 + test/lib/string.c | 32 ++

[PATCH v2 03/50] compiler: Add a comment to host_build()

2021-05-06 Thread Simon Glass
This function should have a comment explaining what it does. Add one. Signed-off-by: Simon Glass --- Changes in v2: - Correct 'hose' typo include/compiler.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/compiler.h b/include/compiler.h index 27b9843497a..67e52050b12 100644 --

[PATCH v2 00/50] image: Reduce #ifdefs and ad-hoc defines in image code

2021-05-06 Thread Simon Glass
Much of the image-handling code predates the introduction of Kconfig and has quite a few #ifdefs in it. It also uses its own IMAGE_... defines to help reduce the #ifdefs, which is unnecessary now that we can use IS_ENABLED() et al. The image code is also where quite a bit of code is shared with th

Re: [PATCH V2] ARM: stm32: Update dhelectronics/dh_stm32mp1/MAINTAINERS file

2021-05-06 Thread Patrick DELAUNAY
Hi, On 5/5/21 6:23 PM, Christoph Niedermaier wrote: Adding new DH electronics mailing list. Signed-off-by: Christoph Niedermaier --- V2: Correct message tag --- board/dhelectronics/dh_stm32mp1/MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/board/dhelectronics/dh_stm32mp1/MA

  1   2   >