Re: [PATCH v6 06/22] mtd: nand: add support for the Sandisk SDTNQGAMA chip

2023-03-08 Thread Michael Nazzareno Trimarchi
On Fri, Mar 3, 2023 at 1:13 AM Johan Jonker wrote: > > Sandisk SDTNQGAMA is a 8GB size, 3.3V 8 bit chip with 16KB page size, > 1KB write size and 40 bit ecc support > > Signed-off-by: Paweł Jarosz > Signed-off-by: Johan Jonker > Reviewed-by: Kever Yang > --- > drivers/mtd/nand/raw/nand_ids.c |

[PATCH 0/1] lib/vsprintf.c: fix integer overflow in vsprintf

2023-03-08 Thread Ying-Chun Liu (PaulLiu)
vsnprintf_internal() adds 'size' to 'buf' and vsprintf() sets 'size' to 'INT_MAX' which can overflow. This causes sprintf() to fail when initializing the environment on 8GB. Instead of using 'INT_MAX', we use SIZE_MAX - buf, which is the largest possible string that could fit without overflowing

[PATCH 1/1] lib/vsprintf.c: fix integer overflow in vsprintf

2023-03-08 Thread Ying-Chun Liu (PaulLiu)
From: Tom Cherry vsnprintf_internal() adds 'size' to 'buf' and vsprintf() sets 'size' to 'INT_MAX' which can overflow. This causes sprintf() to fail when initializing the environment on 8GB. Instead of using 'INT_MAX', we use SIZE_MAX - buf, which is the largest possible string that could fit w

[PATCH] rockchip: sdhci: rk3568: bypass DLL when clk <= 52 MHz

2023-03-08 Thread Vasily Khoruzhick
For Rockchip platform, DLL bypass bit and start bit need to be set if DLL is not locked. With this change applied eMMC in my NanoPi R5S can run at 52 MHz. Based on linux commit b75a52b0dda3 ("mmc: sdhci-of-dwcmshc: Update DLL and pre-change delay for rockchip platform") Signed-off-by: Vasily Kho

Re: [PATCH v2 28/32] test: cmd: fdt: Test fdt memory

2023-03-08 Thread Marek Vasut
On 3/8/23 23:23, Simon Glass wrote: Hi Marek, On Wed, 1 Mar 2023 at 19:09, Marek Vasut wrote: Add 'fdt memory' test which works as follows: - Create custom FDT with /memory node, with select #*cells, map it to sysmem - Perform memory fixup - Read back the /memory node and validate its content

Re: [PATCH v2 02/32] cmd: fdt: Fix handling of empty properties for fdt get addr and fdt get size

2023-03-08 Thread Marek Vasut
On 3/8/23 23:17, Simon Glass wrote: Hi Marek, On Wed, 1 Mar 2023 at 20:09, Marek Vasut wrote: It is perfectly valid to request an address or size of FDT property without value, the only special case if requesting of the value of FDT property without value. Invert the test such, that propertie

Re: [PATCH v2] mtd: rawnand: nand_base: Handle algorithm selection

2023-03-08 Thread Michael Nazzareno Trimarchi
Hi On Wed, Mar 8, 2023 at 10:29 PM Linus Walleij wrote: > > For BRCMNAND with 1-bit BCH ECC (BCH-1) such as used on the > D-Link DIR-885L and DIR-890L routers, we need to explicitly > select the ECC like this in the device tree: > > nand-ecc-algo = "bch"; > nand-ecc-strength = <1>; > nand-e

Please pull u-boot-dm into -next

2023-03-08 Thread Simon Glass
Hi Tom, This is for the -next branch https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/15499 The following changes since commit 70ed05ce6c051e55e126e67e72ab20409134c953: Merge tag 'next-20230307' of https://source.denx.de/u-boot/custodians/u-boot-video into next (2023-03-07 12:

Re: [PATCH v2 1/5] binman: Correct an 'aot' typo

2023-03-08 Thread Simon Glass
Fix this typo. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/bintool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm/next, thanks!

Re: [PATCH v2 21/32] test: cmd: fdt: Test fdt get addr

2023-03-08 Thread Simon Glass
Add 'fdt get addr' test which works as follows: - Create fuller FDT, map it to sysmem - Get address of various properties - Compare addresses calculated by UT and fdt command This test is special in that it has to go through gruesome remapping scheme where the test calculates: - pointer offsets of

Re: [PATCH v2 28/32] test: cmd: fdt: Test fdt memory

2023-03-08 Thread Simon Glass
Hi Marek, On Wed, 1 Mar 2023 at 19:09, Marek Vasut wrote: > > Add 'fdt memory' test which works as follows: > - Create custom FDT with /memory node, with select #*cells, map it to sysmem > - Perform memory fixup > - Read back the /memory node and validate its content > > The test case can be trig

Re: [PATCH v2 2/5] binman: Update bintools documentation

2023-03-08 Thread Simon Glass
This was not regenerated with recent changes. Update it. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/bintools.rst | 70 +++ 1 file changed, 70 insertions(+) Applied to u-boot-dm/next, thanks!

Re: [PATCH] binman: Avoid requiring a home directory on startup

2023-03-08 Thread Simon Glass
Hi Quentin, On Mon, 20 Feb 2023 at 04:15, Quentin Schulz wrote: > > Hi Simon, > > On 2/18/23 00:49, Simon Glass wrote: > > Hi Quentin, > > > > On Fri, 17 Feb 2023 at 05:21, Quentin Schulz > > wrote: > >> > >> Hi all, > >> > >> On 2/17/23 03:55, Simon Glass wrote: > >>> Hi Tom, > >>> > >>> On Thu

Re: [PATCH v2 3/5] binman: Move the tools directory into the Bintool class

2023-03-08 Thread Simon Glass
We want to be able to change this directory. Use a class member to hold the value, since changing a constant is not good. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/bintool.py | 7 --- tools/binman/bintool_test.py | 4 ++-- 2 files changed, 6 insertions(+), 5 de

Re: [PATCH v2 1/4] buildman: Add a note about the out-env file

2023-03-08 Thread Simon Glass
This file holds the environment used when doing a build. Add a note about it. Signed-off-by: Simon Glass --- (no changes since v1) tools/buildman/buildman.rst | 2 ++ 1 file changed, 2 insertions(+) Applied to u-boot-dm/next, thanks!

Re: [PATCH v4 2/2] bootstd: Replicate the dtb-filename quirks of distroboot

2023-03-08 Thread Simon Glass
For EFI, the distro boot scripts search in three different directories for the .dtb file. The SOC-based filename fallback is supported only for 32-bit ARM. Adjust the code to mirror this behaviour. Also some boards can use a prior-stage FDT if one is not found in the normal way. Support this and

Re: [PATCH v2 02/24] Revert "patman: test_util: Print test stdout/stderr within test summaries"

2023-03-08 Thread Simon Glass
Unfortunately this adds a new feature to concurrencytest and it has not made it upstream to the project[1]. Drop it for now so we can use the upstream module. Once it is applied we can bring this functionality back. [1] https://github.com/cgoldberg/concurrencytest This reverts commit ebcaafcded4

Re: [PATCH v2 04/24] patman: Move library functions into a library directory

2023-03-08 Thread Simon Glass
The patman directory has a number of modules which are used by other tools in U-Boot. This makes it hard to package the tools using pypi since the common files must be copied along with the tool that uses them. To address this, move these files into a new u_boot_pylib library. This can be packaged

Re: [PATCH v4 1/2] bootflow: Rename bootflow_flags_t

2023-03-08 Thread Simon Glass
These flags actually relate to the iterator, not the bootflow struct itself. Rename them. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootdev-uclass.c | 16 ++--- boot/bootflow.c | 20 cmd/bootflow.c | 8 +++ doc/develop/bootstd.rs

Re: [PATCH v2 05/24] script: Add a script to build a PyPi package

2023-03-08 Thread Simon Glass
Create a script which can package a tool for use with PyPi and the 'pip' tool. This involves quite a few steps so is best automated. Future work will enable use of this for some of the tools in U-Boot. Signed-off-by: Simon Glass --- Changes in v2: - Drop test files - Fix removable of the /tmp di

Re: [PATCH v2 06/24] patman: Add support for building a u_boot_tools PyPi package

2023-03-08 Thread Simon Glass
Create the necessary files to build this new package. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 18 +- tools/u_boot_pylib/LICENSE| 339 ++ tools/u_boot_pylib/README.rst | 15 ++ tools/u_boot_pylib/pyprojec

Re: [PATCH v2 01/24] binman: Avoid unwanted output in testFitFirmwareLoadables()

2023-03-08 Thread Simon Glass
This prints a message about the missing tee-os generated by the test. This is confusing, so suppress it. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/ftest.py | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) Applied to u-boot-dm/next, thanks!

Re: [PATCH v2 08/24] patman: Add support for building a patman PyPi package

2023-03-08 Thread Simon Glass
Create the necessary files to build this new package. Signed-off-by: Simon Glass --- Changes in v2: - Rename the package to patch-manager Makefile| 1 + tools/patman/pyproject.toml | 29 + 2 files changed, 30 insertions(+) create mode 100644 to

Re: [PATCH v2 12/24] buildman: Use importlib to find the help

2023-03-08 Thread Simon Glass
Use this function so that the help can be found even when buildman is running from a package. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to use importlib to find the help tools/buildman/control.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Applied to u-boot

Re: [PATCH 3/9] binman: Use correct argument name in docstrings

2023-03-08 Thread Simon Glass
On Sun, 19 Feb 2023 at 15:02, Jonas Karlman wrote: > > Use correct argument name in docstrings. > > Signed-off-by: Jonas Karlman > --- > tools/binman/entry.py | 2 +- > tools/binman/etype/blob.py| 2 +- > tools/binman/etype/section.py | 4 ++-- > 3 files changed, 4 insertions(+), 4 d

Re: [PATCH 2/9] binman: Fix spelling of nodes in code comments

2023-03-08 Thread Simon Glass
On Sun, 19 Feb 2023 at 15:02, Jonas Karlman wrote: > > Replace notes with nodes in code comments and docstrings. > > Signed-off-by: Jonas Karlman > --- > tools/binman/etype/fit.py | 2 +- > tools/binman/etype/section.py | 2 +- > tools/binman/state.py | 2 +- > 3 files changed, 3 ins

Re: [PATCH 1/9] binman: Remove redundant SetAllowFakeBlob from blob-ext entry

2023-03-08 Thread Simon Glass
On Sun, 19 Feb 2023 at 15:02, Jonas Karlman wrote: > > Entry_blob_ext contains an implementation of SetAllowFakeBlob that is > identical to the one in the base Entry class, remove it. > > Signed-off-by: Jonas Karlman > --- > tools/binman/etype/blob_ext.py | 8 > 1 file changed, 8 deleti

Re: [PATCH v2 07/24] patman: Avoid importing test_checkpatch before it is needed

2023-03-08 Thread Simon Glass
Tests are not packaged with patman so this file will not be accessible when installing with pip. Move the import later in the file, when we know the file is present. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to avoid importing test_checkpatch before it is needed tools/patma

Re: [PATCH v2 2/4] buildman: Write out the build command used

2023-03-08 Thread Simon Glass
It is sometimes useful to see the exact 'make' command used by buildman for a commit. Add an output file for this. Signed-off-by: Simon Glass --- (no changes since v1) tools/buildman/builderthread.py | 13 + tools/buildman/buildman.rst | 8 tools/buildman/func_test.py

Re: [PATCH v2 3/4] buildman: Support disabling LTO

2023-03-08 Thread Simon Glass
This cuts down build performance considerably and is not always needed, when checking for build errors, etc. Add a flag to disable it. Signed-off-by: Simon Glass --- (no changes since v1) tools/buildman/builder.py | 5 - tools/buildman/builderthread.py | 2 ++ tools/buildman/build

Re: [PATCH v2 4/4] buildman: Add a flag for reproducible builds

2023-03-08 Thread Simon Glass
This is quite a useful thing to use when building since it avoids small size changes between commits. Add a -r flag for it. Also undefine CONFIG_LOCALVERSION_AUTO since this appends the git hash to the version string, causing every build to be slightly different. Signed-off-by: Simon Glass ---

Re: [PATCH v2 09/24] buildman: Move the main code into a function

2023-03-08 Thread Simon Glass
Put this code into a function so it is easy for it be run when packaged. Signed-off-by: Simon Glass --- Changes in v2: - Add patch to split out the main code into a function tools/buildman/main.py | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) Applied to u

Re: [PATCH v2 5/5] binman: Make the tooldir configurable

2023-03-08 Thread Simon Glass
Add a command-line argument for setting the tooldir, so that the default can be overridden. Add this directory to the toolpath automatically. Create the directory if it does not already exist. Put the default in the argument parser instead of the class, so that it is more obvious. Update a few te

Re: [PATCH v2 03/24] Remove concurrencytest

2023-03-08 Thread Simon Glass
While our version is better, it is tricky to use it when we are trying to package things with pip. Drop it. Somewhat reduced functionality is provided by the upstream version[1], along with a rather annoying message each time it is used[2] [3]. [1] pip install concurrencytest [2] https://github.c

Re: [PATCH v2 04/32] cmd: fdt: Fix fdt rsvmem behavior on non-existent index and error message space

2023-03-08 Thread Simon Glass
In case 'fdt rsvmem delete index' is passed a non-existent index, one which does not exist in 'fdt rsvmem print', then the following command triggers a print of help message for 'fdt' command instead of erroring out: => fdt rsvmem delete 1234 This is because the subcommand errornously returns 'err'

Re: [PATCH v2 11/24] buildman: Fix use of a type as a variable

2023-03-08 Thread Simon Glass
Using 'str' as a variable makes it impossible to use it as a type in the same function. Fix this by using a different name. Signed-off-by: Simon Glass --- Changes in v2: - Add patch to fix use of a type as a variable tools/buildman/control.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

Re: [PATCH v2 13/24] buildman: Add support for building a buildman PyPi package

2023-03-08 Thread Simon Glass
Create the necessary files to build this new package. It is not actually clear whether this is useful, since buildman has no purpose outside U-Boot. It is included for completeness, since adding this later would be more trouble. Move the main program into a function so that it can easily be calle

Re: [PATCH v2 10/24] buildman: Hide the test options unless test code is available

2023-03-08 Thread Simon Glass
It doesn't make much sense to expose tests when buildman is running outside of the U-Boot git checkout. Hide the option in this case Signed-off-by: Simon Glass --- Changes in v2: - Add a patch to hide the test options unless test code is available tools/buildman/cmdline.py | 14 ++

Re: [PATCH v2 14/24] dtoc: Hide the test options unless test code is available

2023-03-08 Thread Simon Glass
It doesn't make much sense to expose tests when dtoc is running outside of the U-Boot git checkout. Hide the option in this case. Signed-off-by: Simon Glass --- Changes in v2: - Add a patch to hide the test options unless test code is available tools/dtoc/main.py | 19 +-- 1 fi

Re: [PATCH v2 15/24] dtoc: Move the main code into a function

2023-03-08 Thread Simon Glass
Put this code into a function so it is easy for it be run when packaged. Signed-off-by: Simon Glass --- Changes in v2: - Add patch to split out the main code into a function tools/dtoc/main.py | 100 +++-- 1 file changed, 52 insertions(+), 48 deletions(-

Re: [PATCH v2 17/24] dtoc: Add support for building a dtoc PyPi package

2023-03-08 Thread Simon Glass
Create the necessary files to build this new package. This is needed for binman. Move the main program into a function so that it can easily be called by the PyPi-created script. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 1 + tools/dtoc/README.rst

Re: [PATCH v2 18/24] binman: Move the main code into a function

2023-03-08 Thread Simon Glass
Put this code into a function so it is easy for it be run when packaged. Signed-off-by: Simon Glass --- Changes in v2: - Add patch to split out the main code into a function tools/binman/main.py | 12 1 file changed, 8 insertions(+), 4 deletions(-) Applied to u-boot-dm/next, than

Re: [PATCH v2 16/24] dtoc: Use pathlib to find the test directory

2023-03-08 Thread Simon Glass
Update this so that the directory being used is declared at the top of the file. Use pathlib as it seems to be more modern. Signed-off-by: Simon Glass --- (no changes since v1) tools/dtoc/test_dtoc.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Applied to u-boot-dm/next, thank

Re: [PATCH v2 19/24] binman: Hide the 'test' command unless test code is available

2023-03-08 Thread Simon Glass
It doesn't make much sense to expose tests when dtoc is running outside of the U-Boot git checkout. Hide the option in this case. Fix a long line while we are here. Signed-off-by: Simon Glass --- Changes in v2: - Add a patch to hide the test options unless test code is available tools/binman/

Re: [PATCH v2 20/24] binman: Use importlib to find the help

2023-03-08 Thread Simon Glass
Use this function so that the help can be found even when binman is running from a package. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to use importlib to find the help tools/binman/control.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Applied to u-boot-dm/

Re: [PATCH v2 23/24] doc: Add notes on how to install patman and binman

2023-03-08 Thread Simon Glass
These can be installed with 'pip' now. Add the details for those who are interested. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/binman.rst | 13 + tools/patman/patman.rst | 12 2 files changed, 25 insertions(+) Applied to u-boot-dm/next, thanks!

Re: [PATCH v2 03/32] cmd: fdt: Fix fdt rm behavior on non-existent property and error message space

2023-03-08 Thread Simon Glass
In case an FDT contains a node '/test-node@1234' , with no property called 'noprop' in that node, the following command triggers a print of help message for 'fdt' command instead of erroring out: => fdt rm /test-node@1234 noprop This is because the subcommand errornously returns 'err' instead of CM

Re: [PATCH v2 06/32] cmd: fdt: Check argc before accessing argv in fdt memory

2023-03-08 Thread Simon Glass
On case 'fdt memory' is invoked without parameters, argv[2]/argv[3] is not valid and this command would SEGFAULT in sandbox environment. Add missing argc test to avoid the crash and rather print usage help message. Signed-off-by: Marek Vasut Reviewed-by: Simon Glass --- Cc: Heinrich Schuchardt

Re: [PATCH v2 22/24] test: Add concurrencytest to the requirements

2023-03-08 Thread Simon Glass
This allows tests to run in parallel and speeds up some tests markedly, particularly with binman. Add it to the requirements. Signed-off-by: Simon Glass --- (no changes since v1) test/py/requirements.txt | 1 + 1 file changed, 1 insertion(+) Applied to u-boot-dm/next, thanks!

Re: [PATCH v2 02/32] cmd: fdt: Fix handling of empty properties for fdt get addr and fdt get size

2023-03-08 Thread Simon Glass
Hi Marek, On Wed, 1 Mar 2023 at 20:09, Marek Vasut wrote: > > It is perfectly valid to request an address or size of FDT property > without value, the only special case if requesting of the value of > FDT property without value. Invert the test such, that properties > without value still set the

Re: [PATCH v2 21/24] binman: Add support for building a binmanu PyPi package

2023-03-08 Thread Simon Glass
Create the necessary files to build this new package. It is not actually clear whether this is useful, since buildman has no purpose outside U-Boot. Move the main program into a function so that it can easily be called by the PyPi-created script. Signed-off-by: Simon Glass --- (no changes sinc

Re: [PATCH v2 24/24] CI: Add a check for building tools for PyPi

2023-03-08 Thread Simon Glass
Add a simple check that the PyPi packages can be built. Signed-off-by: Simon Glass --- Changes in v2: - Update the cover letter .azure-pipelines.yml | 10 ++ .gitlab-ci.yml | 6 ++ 2 files changed, 16 insertions(+) Applied to u-boot-dm/next, thanks!

Re: [PATCH v2 01/32] cmd: fdt: Import is_printable_string() from DTC to fix u32 misprint

2023-03-08 Thread Simon Glass
Import is_printable_string() implementation from DTC 1.7.0 as of DTC commit 039a994 ("Bump version to v1.7.0") . This fixes a print of u32 property which so far used to be printed as string by U-Boot fdt print command. We might see the case where the parsed property value, in this case it is a 32-

Re: [PATCH v2 18/32] test: cmd: fdt: Test fdt resize

2023-03-08 Thread Simon Glass
Add 'fdt resize' test which works as follows: - Create simple FDT with extra size 0, map it to sysmem - 'resize' the FDT by 0x2000 bytes - Verify the new space has been added to the FDT The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used durin

Re: [PATCH v2 07/32] cmd: fdt: Align checksign parameter names in help text

2023-03-08 Thread Simon Glass
The help text references 'addr' as an optional key start address, but the explanation references the same as 'start', make sure they both read as 'addr'. Also update the abbreviated 'addr' in the explanation to 'address'. Signed-off-by: Marek Vasut Reviewed-by: Simon Glass --- Cc: Heinrich Schuc

Re: [PATCH v2 25/32] test: cmd: fdt: Test fdt rm

2023-03-08 Thread Simon Glass
Add 'fdt rm' test which works as follows: - Create fuller FDT, map it to sysmem - Selectively delete nodes or properties by both path and aliases - Verify created nodes or properties using fdt print command The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output fro

Re: [PATCH v2 05/32] cmd: fdt: Check argc before accessing argv in fdt bootcpu

2023-03-08 Thread Simon Glass
On case 'fdt bootcpu' is invoked without parameters, argv[2] is not valid and this command would SEGFAULT in sandbox environment. Add missing argc test to avoid the crash and rather print usage help message. Signed-off-by: Marek Vasut Reviewed-by: Simon Glass --- Cc: Heinrich Schuchardt Cc: Sim

Re: [PATCH v2 14/32] test: cmd: fdt: Generate fuller DT internally and switch fdt get value to it

2023-03-08 Thread Simon Glass
Implement function to generate internal test DT fragment and switch the 'fdt get value' test to this instead of depending on the sandbox DT. Rename clk-test node to test-node node. This FDT fragment will be reused by other tests. No functional change. Signed-off-by: Marek Vasut Reviewed-by: Simon

Re: [PATCH v2 17/32] test: cmd: fdt: Test fdt move

2023-03-08 Thread Simon Glass
Add 'fdt move' test which works as follows: - Create simple FDT, map it to sysmem - 'move' the FDT into new zeroed out sysmem location - Verify newly active FDT is in the new location - Compare both locations The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output f

Re: [PATCH v2 22/32] test: cmd: fdt: Test fdt get size

2023-03-08 Thread Simon Glass
Add 'fdt get size' test which works as follows: - Create fuller FDT, map it to sysmem - Get size of various properties - Get node count of available nodes - Test non-existent nodes and properties The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands

Re: [PATCH v2 08/32] cmd: fdt: Handle 64bit pointers in fdt get addr

2023-03-08 Thread Simon Glass
The command assumed 32bit pointers so far, with 64bit pointer the command would overwrite a piece of stack. Fix it by extending the array size to cater for 64bit pointer, and use snprintf() to avoid writing past the end of the array ever again. Signed-off-by: Marek Vasut Reviewed-by: Simon Glass

Re: [PATCH v2 10/32] cmd: fdt: Add support for integer arrays in fdt get value with index

2023-03-08 Thread Simon Glass
Currently any integer array value is set as long up-to-40 character hexadecimal string into environment variable when extracted from an FDT using 'fdt get value path prop index', because the support for handling integer arrays is not implemented, and fdt_value_env_set() code falls back into the has

Re: [PATCH v2 12/32] test: cmd: fdt: Rename fdt_test_resize() to fdt_test_addr_resize()

2023-03-08 Thread Simon Glass
The 'fdt' command has a 'resize' subcommand, rename the fdt_test_resize() to fdt_test_addr_resize() to avoid confusion about what it is testing. There is currently no resize test. Signed-off-by: Marek Vasut Reviewed-by: Simon Glass --- Cc: Heinrich Schuchardt Cc: Simon Glass Cc: Tom Rini ---

Re: [PATCH v2 09/32] cmd: fdt: Map address returned from fdt get addr to sysmem

2023-03-08 Thread Simon Glass
The address returned from 'fdt get addr' command must be mapped into sysmem, as this is a working FDT. Access to this address without mapping it would lead to crash e.g. in sandbox. The following command triggers the crash: " ./u-boot -Dc 'fdt addr $fdtcontroladdr ; fdt get addr var / compatible ;

Re: [PATCH v2 15/32] test: cmd: fdt: Test alias resolution in 'fdt get value'

2023-03-08 Thread Simon Glass
The 'fdt' command help contains the following note: " Dereference aliases by omitting the leading '/', e.g. fdt print ethernet0. " Add test for it. Signed-off-by: Marek Vasut Reviewed-by: Simon Glass --- Cc: Heinrich Schuchardt Cc: Simon Glass Cc: Tom Rini --- V2: Add RB from Simon --- test/

Re: [PATCH v2 11/32] test: Add ut_assert_nextline_empty() empty line helper

2023-03-08 Thread Simon Glass
Add helper macro to test for empty lines, which is an inobvious wrapper around ut_assert_nextline("%s", "") . Signed-off-by: Marek Vasut Reviewed-by: Simon Glass --- Cc: Heinrich Schuchardt Cc: Simon Glass Cc: Tom Rini --- V2: Add RB from Simon --- include/test/ut.h | 4 1 file changed,

Re: [PATCH v2 16/32] test: cmd: fdt: Test both string and integer arrays in 'fdt get value'

2023-03-08 Thread Simon Glass
The 'fdt get value' subcommand now supports extraction of integer value from integer arrays, add test for it, including a test for special case unindexed integer array read, which is handled as hash and treated as a long string instead of integer. Signed-off-by: Marek Vasut Reviewed-by: Simon Gla

Re: [PATCH v2 13/32] test: cmd: fdt: Rename fdt_test_get() to fdt_test_get_value()

2023-03-08 Thread Simon Glass
The 'fdt get' command has a 'get value' subcommand, rename the fdt_test_get() to fdt_test_get_value() to avoid confusion about what it is testing. There is currently no get 'get name', 'get addr', 'get size' subcommand test. Signed-off-by: Marek Vasut Reviewed-by: Simon Glass --- Cc: Heinrich Sc

Re: [PATCH v2 20/32] test: cmd: fdt: Test fdt get name

2023-03-08 Thread Simon Glass
Add 'fdt get name' test which works as follows: - Create fuller FDT, map it to sysmem - Get name of / node 0, 1 and /clk-test node 0 - Compare output and validate the node name - Get name of / node 2 and /clk-test node 1 - Compare output and validate the node is not present - Get name of / node -1

Re: [PATCH v2 23/32] test: cmd: fdt: Test fdt set

2023-03-08 Thread Simon Glass
Add 'fdt set' test which works as follows: - Create fuller FDT, map it to sysmem - Set either existing property to overwrite it, or new property - Test setting both single properties as well as string and integer arrays - Test setting to non-existent nodes and aliases - Verify set values using 'fdt

Re: [PATCH v2 32/32] test: cmd: fdt: Add list of remaining missing tests

2023-03-08 Thread Simon Glass
Add list of missing tests for the 'fdt' command, currently the missing sandbox tests are only 'fdt boardsetup' and 'fdt checksign' . Signed-off-by: Marek Vasut Reviewed-by: Simon Glass --- Cc: Heinrich Schuchardt Cc: Simon Glass Cc: Tom Rini --- V2: Add RB from Simon --- test/cmd/fdt.c | 7 +

Re: [PATCH v2 27/32] test: cmd: fdt: Test fdt bootcpu

2023-03-08 Thread Simon Glass
Add 'fdt bootcpu' test which works as follows: - Create basic FDT, map it to sysmem - Print the FDT bootcpu - Set the FDT bootcpu and read the value back using 'fdt header get' - Perform the previous step twice to validate bootcpu overwrite The test case can be triggered using: " ./u-boot -Dc 'ut

Re: [PATCH v2 24/32] test: cmd: fdt: Test fdt mknode

2023-03-08 Thread Simon Glass
Add 'fdt mknode' test which works as follows: - Create fuller FDT, map it to sysmem - Create node either in / or subnode - Attempt to create node over existing node, which fails - Attempt to create subnodes in non-existing nodes or aliases - Verify created nodes using fdt list command The test cas

Re: [PATCH v3 1/4] patman: Drop an incorrect comment about git am

2023-03-08 Thread Simon Glass
Patman does not do this anymore, as of this commit: 7428dc14b0f ("patman: Remove the -a option") Drop the comment. Signed-off-by: Simon Glass Reviewed-by: Douglas Anderson --- Changes in v3: - Mention the commit where the -a option was dropped Changes in v2: - Fix 'uncorrect' typo in subj

Re: [PATCH] buildman: Correct CROSS_COMPILE output for sandbox

2023-03-08 Thread Simon Glass
At present, 'buildman -A sandbox' adds the path containing the toolchain at present. We can assume that this is in the path and we don't want to set CROSS_COMPILE=/bin/ so change this to align with what MakeEnvironment() does. Signed-off-by: Simon Glass --- tools/buildman/toolchain.py | 3 +--

Re: [PATCH v3 2/4] patman: Refactor MakeCcFile() into two functions

2023-03-08 Thread Simon Glass
This function is quite long. Moving the handling of a commit into a separate function. This will make it easier to do the work in parallel. Update function comments while we are here. Signed-off-by: Simon Glass Reviewed-by: Douglas Anderson --- Changes in v3: - Reword comment for all_skips - S

Re: [PATCH v3 4/4] patman: Check patches in parallel

2023-03-08 Thread Simon Glass
For large series this can take a while. Run checkpatch in parallel to try to reduce the time. The checkpatch information is still reported in sequential order, so a very slow patch at the start can still slow things down. But overall this gives good results. Signed-off-by: Simon Glass Reviewed-by

Re: [PATCH v3 3/4] patman: Run get_maintainer.pl in parallel

2023-03-08 Thread Simon Glass
This script can take ages on some series. Try to limit the time by using threads. If a few stubborn patches remain, show progress so the user has some idea what is going on. Signed-off-by: Simon Glass Reviewed-by: Douglas Anderson --- (no changes since v1) tools/patmanu/func_test.py | 2 ++

[PATCH v2] nand: brcmnand: add iproc support

2023-03-08 Thread Linus Walleij
Add support for the iproc Broadcom NAND controller, used in Northstar SoCs for example. Based on the Linux driver. Cc: Philippe Reynes Cc: Dario Binacchi Reviewed-by: Michael Trimarchi Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Check return value of dev_read_resource() - Use devm_ior

[PATCH v2] mtd: rawnand: nand_base: Handle algorithm selection

2023-03-08 Thread Linus Walleij
For BRCMNAND with 1-bit BCH ECC (BCH-1) such as used on the D-Link DIR-885L and DIR-890L routers, we need to explicitly select the ECC like this in the device tree: nand-ecc-algo = "bch"; nand-ecc-strength = <1>; nand-ecc-step-size = <512>; This is handled by the Linux kernel but U-Boot cor

[PATCH v9 3/6] tpm: Support boot measurements

2023-03-08 Thread Eddie James
Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and measuring the U-Boot version. Much of the code was used in the EFI subsystem, so remove it there and use the common functions. Signed-off-by: Eddie James --- Changes since

[PATCH v9 6/6] doc: Add measured boot documentation

2023-03-08 Thread Eddie James
Briefly describe the feature and specify the requirements. Signed-off-by: Eddie James Reviewed-by: Simon Glass --- doc/usage/index.rst | 1 + doc/usage/measured_boot.rst | 23 +++ 2 files changed, 24 insertions(+) create mode 100644 doc/usage/measured_boot.rst dif

[PATCH v9 4/6] bootm: Support boot measurement

2023-03-08 Thread Eddie James
Add a configuration option to measure the boot through the bootm function. Add the measurement state to the booti and bootz paths as well. Signed-off-by: Eddie James Reviewed-by: Simon Glass --- Changes since v8: - Added a configuration option to select to ignore any existing event log. This

[PATCH v9 2/6] tpm: sandbox: Update for needed TPM2 capabilities

2023-03-08 Thread Eddie James
The driver needs to support getting the PCRs in the capabilities command. Fix various other things and support the max number of PCRs for TPM2. Remove the !SANDBOX dependency for EFI TCG2 as well. Signed-off-by: Eddie James Reviewed-by: Simon Glass Acked-by: Ilias Apalodimas --- Changes since v

[PATCH v9 5/6] test: Add sandbox TPM boot measurement

2023-03-08 Thread Eddie James
Use the sandbox TPM driver to measure some boot images in a unit test case. Signed-off-by: Eddie James Reviewed-by: Simon Glass Acked-by: Ilias Apalodimas --- Changes since v5: - Only compile in the measurement u-boot command when CONFIG_MEASURED_BOOT is enabled. arch/sandbox/dts/sandbox.

[PATCH v9 0/6] tpm: Support boot measurements

2023-03-08 Thread Eddie James
This series adds support for measuring the boot images more generically than the existing EFI support. Several EFI functions have been moved to the TPM layer. The series includes optional measurement from the bootm command. A new test case has been added for the bootm measurement to test the new p

[PATCH v9 1/6] tpm: Fix spelling for tpmu_ha union

2023-03-08 Thread Eddie James
tmpu -> tpmu Signed-off-by: Eddie James Reviewed-by: Ilias Apalodimas --- include/tpm-v2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tpm-v2.h b/include/tpm-v2.h index 2b6980e441..6684033deb 100644 --- a/include/tpm-v2.h +++ b/include/tpm-v2.h @@ -169,7 +169

Re: [PATCH v8 0/6] tpm: Support boot measurements

2023-03-08 Thread Eddie James
On 3/6/23 00:58, Ilias Apalodimas wrote: Hi Eddie, This has a few failures on the CI [0]. Please have a look and let me know if you can't understand the failures Hi, I think I have fixed the sandbox ones for v9. I'm unsure about the EFI selftest one in qemu targets... Thanks, Eddie

RE: [PATCH] README.mpc85xx-sd-spi-boot: Suggest the NXP boot format github repo

2023-03-08 Thread Leo Li
> -Original Message- > From: Pali Rohár > Sent: Wednesday, March 8, 2023 2:54 PM > To: Leo Li > Cc: Fabio Estevam ; Priyanka Jain > ; Fabio Estevam ; > ka...@kernel.org; u-boot@lists.denx.de > Subject: Re: [PATCH] README.mpc85xx-sd-spi-boot: Suggest the NXP boot > format github repo >

[PATCH v4 00/10] Renesas RZ/N1 SoC initial support

2023-03-08 Thread Ralph Siemsen
The RZ/N1 is a family of SoC devices from Renesas [1], featuring ARM Cortex-A7 and/or Cortex-M3 CPU, industrial ethernet protocols, integrated Ethernet switch, and numerous peripherals. This is a first step in upstreaming support for the RZ/N1 family. Currently it contains just enough to boot to t

Re: [PATCH] README.mpc85xx-sd-spi-boot: Suggest the NXP boot format github repo

2023-03-08 Thread Pali Rohár
On Tuesday 28 February 2023 23:53:02 Leo Li wrote: > > -Original Message- > > From: Pali Rohár > > Sent: Tuesday, February 28, 2023 9:32 AM > > To: Leo Li > > Cc: Fabio Estevam ; Priyanka Jain > > ; Fabio Estevam ; > > ka...@kernel.org; u-boot@lists.denx.de > > Subject: Re: [PATCH] README

kwbimage config file documentation (Was: Re: [PATCH RFC u-boot-mvebu 00/59] arm: mvebu: Various fixes)

2023-03-08 Thread Pali Rohár
On Saturday 25 February 2023 01:18:26 Martin Rowe wrote: > - taken a look at the kwbimage documentation, but I don't think I can > be of much help there It should be pretty straightforward. Looking at how is documentation for other format written (in the same manpage ./doc/mkimage.1), then lookin

[PATCH v4 08/10] board: schneider: add RZN1 board support

2023-03-08 Thread Ralph Siemsen
Add support for Schneider Electronics RZ/N1D and RZ/N1S boards, which are based on the Reneasas RZ/N1 SoC devices. The intention is to support both boards using a single defconfig, and to handle the differences at runtime. Signed-off-by: Ralph Siemsen --- Changes in v4: - add binman support via

[PATCH v4 10/10] doc: renesas: add Renesas board docs

2023-03-08 Thread Ralph Siemsen
Collect the list of currerently supported Renesas boards. For the RZ/N1 board, add details about booting and flashing. Signed-off-by: Ralph Siemsen --- (no changes since v1) doc/board/renesas/index.rst | 9 +++ doc/board/renesas/renesas.rst | 115 ++ 2 file

[PATCH v4 07/10] ARM: rzn1: basic support for Renesas RZ/N1 SoC

2023-03-08 Thread Ralph Siemsen
The RZ/N1 is a family of SoC devics from Renesas, featuring: * ARM Cortex-A7 CPU (single/dual core) and/or Cortex-M3 * Integrated SRAM up to 6MB * Integrated gigabit ethernet switch * Optional DDR2/3 controller * I2C, SPI, UART, NAND, QSPI, SDIO, USB, CAN, RTC, LCD Add basic support in the form o

[PATCH v4 09/10] tools: spkgimage: add Renesas SPKG format

2023-03-08 Thread Ralph Siemsen
Renesas RZ/N1 devices contain BootROM code that loads a custom SPKG image from QSPI, NAND or USB DFU. Support this format in mkimage tool. SPKGs can optionally be signed, however creation of signed SPKG is not currently supported. Example of how to use it: tools/mkimage -n board/schneider/rzn1-s

[PATCH v4 03/10] clk: renesas: add R906G032 driver

2023-03-08 Thread Ralph Siemsen
Clock driver for the Renesas RZ/N1 SoC family. This is based on Linux kernel 6.2.y drivers/clk/renesas/r9a06g032-clocks.c as found in commit 02693e11611e ("clk: renesas: r9a06g032: Repair grave increment error"), with the following additional patch series applied: https://lore.kernel.org/linux-rene

[PATCH v4 05/10] ram: cadence: add driver for Cadence EDAC

2023-03-08 Thread Ralph Siemsen
Driver for Cadence EDAC DDR controller, as found in the Renesas RZ/N1. Signed-off-by: Ralph Siemsen --- (no changes since v3) Changes in v3: - assorted small cleanups - support version 1.0 silicon (previously #if 0...) drivers/ram/Kconfig | 1 + drivers/ram/Makefile|

[PATCH v4 06/10] dts: basic devicetree for Renesas RZ/N1 SoC

2023-03-08 Thread Ralph Siemsen
This is taken from Linux kernel 5.17, and contains just bare minimum functionality: CPU, UART and system timer. Additional functionality (from newer kernel versions) will be added later. Note that the Linux side is under active development. Signed-off-by: Ralph Siemsen --- The following changes

[PATCH v4 04/10] pinctrl: renesas: add R906G032 driver

2023-03-08 Thread Ralph Siemsen
Pinctrl/pinconf driver for Renesas RZ/N1 (R906G032) SoC. This is quite rudimentary right now, and only supports applying a default pin configuration as specified by the device tree. Signed-off-by: Ralph Siemsen --- (no changes since v1) drivers/pinctrl/Makefile | 1 + driv

  1   2   >