[PATCH v6 06/12] sandbox: disable CONFIG_WATCHDOG_AUTOSTART

2021-08-19 Thread Rasmus Villemoes
For the unit tests, it is more convenient if the tests are in charge of when the watchdog devices are started and stopped, so prevent wdt-uclass from doing it automatically. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- configs/sandbox64_defconfig | 1

[PATCH v6 08/12] board: x530: switch to wdt_stop_all()

2021-08-19 Thread Rasmus Villemoes
and in the new world order so is the existence of the wdt_stop_all() function. Actually, existence of wdt_stop_all() depends on CONFIG_${SPL_}WDT, so really spell the condition using CONFIG_IS_ENABLED, and make it a C rather than cpp if. Signed-off-by: Rasmus Villemoes --- board/alliedtelesis/x53

[PATCH v6 07/12] watchdog: wdt-uclass.c: add wdt_stop_all() helper

2021-08-19 Thread Rasmus Villemoes
the first error seen. Initially, this will only be used in one single place (board/alliedtelesis/x530/x530.c). Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 25 + include/wdt.h | 8 2 files changed, 33 insertions(+) diff

[PATCH v6 12/12] sandbox: add test of wdt-uclass' watchdog_reset()

2021-08-19 Thread Rasmus Villemoes
: Rasmus Villemoes --- arch/sandbox/dts/test.dts | 2 ++ test/dm/wdt.c | 54 +++ 2 files changed, 56 insertions(+) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index fe5ac6ecd9..bafc2e9494 100644 --- a/arch/sandbox/dts/test.dts

[PATCH v6 11/12] sandbox: add test of wdt_gpio driver

2021-08-19 Thread Rasmus Villemoes
class+index. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- arch/sandbox/dts/test.dts | 6 ++ configs/sandbox64_defconfig | 1 + configs/sandbox_defconfig | 1 + test/dm/wdt.c | 36 +++- 4 files change

[PATCH v6 10/12] watchdog: add gpio watchdog driver

2021-08-19 Thread Rasmus Villemoes
bnHkg4qry+bhx2EDs=nsbvf_...@mail.gmail.com/ If someone feels strongly about this, I can certainly remove the "linux," part from the string - it probably wouldn't the only place where one can't reuse a DT snippet as-is between linux and U-Boot. Reviewed-by: Simon Glass Reviewed-by: S

Re: [PATCH v6 10/12] watchdog: add gpio watchdog driver

2021-08-19 Thread Rasmus Villemoes
On 19/08/2021 13.46, Wolfgang Denk wrote: > Dear Rasmus, > > again: error handling. > > In message <20210819095706.3585923-11-rasmus.villem...@prevas.dk> you wrote: >> >> diff --git a/drivers/watchdog/gpio_wdt.c b/drivers/watchdog/gpio_wdt.c >> new file mode 100644 >> index 00..982a66b3f9

Re: [PATCH v6 10/12] watchdog: add gpio watchdog driver

2021-08-19 Thread Rasmus Villemoes
On 19/08/2021 14.32, Wolfgang Denk wrote: > The existence of bad code is not a justification to add more of it. Obviously true and I agree. However, it is at the same time completely irrelevant in this context, because the pattern of using the return value of dev_get_priv() without a NULL check

Re: [PATCH] global: Remove dead code that starts with CONFIG_[0-9A]

2021-08-20 Thread Rasmus Villemoes
On 19/08/2021 21.02, Tom Rini wrote: > This removes a number of spots of dead code based on symbols that start > with CONFIG_[0-9] or CONFIG_A. How did you find those symbols? I suppose the actual patch is just generated with unifdef or similar. > include/configs/vexpress_common.h | 3

Re: [PATCH] Revert "fdtdec: drop needlessly convoluted CONFIG_PHANDLE_CHECK_SEQ"

2022-08-01 Thread Rasmus Villemoes
On 31/07/2022 15.28, Tom Rini wrote: > On Sat, Jul 30, 2022 at 07:27:26PM -0600, Simon Glass wrote: >> Hi Tom, >> >> Shall I pick it up for the upcoming release? > > I don't think we should pick up the revert as I don't think there's > agreement that reverting this is the right step forward among

Re: [PATCH] dm: rtc: Avoid a race in the rtc_reset test

2022-08-02 Thread Rasmus Villemoes
ay. >>>>> >>>>> Fixes: https://source.denx.de/u-boot/u-boot/-/issues/4 >>>>> Reported-by: Bin Meng >>>>> Reported-by: Tom Rini >>>>> Suggested-by: Rasmus Villemoes >>>>> Signed-off-by: Simon Glass >

Re: [PATCH] checkpatch.pl: Reword IS_ENABLED() warning

2022-08-03 Thread Rasmus Villemoes
On 02/08/2022 14.33, Tom Rini wrote: > While there are good reasons to use 'if (IS_ENABLED(CONFIG_...))' for > runtime tests, there's equally good reasons to use '#ifdef CONFIG_...' > for build time tests. Reword this message to hopefully avoid confusion. > > Cc: Simon Glass > Signed-off-by: Tom

Re: [PATCH 0/3] dwc_eth_qos PHY dt node fixups

2022-08-04 Thread Rasmus Villemoes
On 12/05/2022 09.33, Rasmus Villemoes wrote: > I need the dwc_eth_qos to gain a fix similar to what fec_mxc got in > 89b5bd54c1a4. > > The first patch provides a simplification around the logic for > fetching the phy's address, so there's one less case to worry about. >

Re: [PATCH] net: dwc_eth_qos: fix double resource leak in eqos_remove()

2022-08-04 Thread Rasmus Villemoes
On 16/05/2022 02.26, Ramon Fried wrote: > On Wed, May 11, 2022 at 5:13 PM Rasmus Villemoes > wrote: >> >> Not only does eqos_remove() fail to free the buffers that have been >> allocated by eqos_probe_resources_core(), it repeats those allocations >> and thus dro

Re: [PATCH] net: dwc_eth_qos: lift parsing of max-speed DT property to common code

2022-08-04 Thread Rasmus Villemoes
On 16/05/2022 02.27, Ramon Fried wrote: > On Wed, May 11, 2022 at 5:58 PM Rasmus Villemoes > wrote: >> >> I have an iMX8MP with a ti,dp83867 phy in front of the eqos >> interface. The phy is Gbit capable - however, the C and D differential >> pairs are not physicall

[PATCH] arm64: explicitly disable pointer authentication instructions

2022-08-08 Thread Rasmus Villemoes
standard-branch-protection, this changes nothing. For the Yocto toolchain, this reduces the size of both SPL and U-Boot proper by about 3% for my imx8mp target. If you don't have a Yocto toolchain, the effect can easily be reproduced by applying this patch and changing =none to =standard. S

Why is arm64 built with -ffixed-r9 ?

2022-08-08 Thread Rasmus Villemoes
Looking at one of the .o.cmd files, I noticed that we build arm64 with both -ffixed-r9 and -ffixed-x18. The latter is obviously what we use for gd, but the former doesn't seem to serve any purpose on arm64, and just seems to be an accident of the makefile fragment organization. When I just remove

Re: RFC: Partition type GUID for U-Boot environment

2020-11-20 Thread Rasmus Villemoes
On 17/11/2020 19.27, Tom Rini wrote: > On Tue, Nov 17, 2020 at 11:05:36AM +0100, Rasmus Villemoes wrote: > >> Hi, >> >> Would it make sense to choose a canonical "Partition type GUID" [1] for >> partitions used to store a U-Boot environment? >> >

Re: [PATCH 4/5] env: allow default environment to be amended from control dtb

2020-11-20 Thread Rasmus Villemoes
On 20/11/2020 11.13, Wolfgang Denk wrote: > Dear Rasmus, > > In message <76615995-6700-1b3e-b598-4913e9882...@prevas.dk> you wrote: >> >> Sure. So would you be ok with some /config/extra-environment node which >> gets appended after the normal environment has been loaded? Then if I > > In princip

[PATCH 0/3] add partition type GUID for U-Boot environment

2020-11-20 Thread Rasmus Villemoes
uid set to the value defined here. Rasmus Villemoes (3): lib/uuid.c: change prototype of uuid_guid_get_str() doc/README.gpt: define partition type GUID for U-Boot environment doc/README.gpt: reflow partition type GUID table disk/part_efi.c| 9 + doc

[PATCH 1/3] lib/uuid.c: change prototype of uuid_guid_get_str()

2020-11-20 Thread Rasmus Villemoes
ery in the header so that the compiler always sees a declaration and can thus do type-checking, whether or not PARTITION_TYPE_GUID is enabled or not. Signed-off-by: Rasmus Villemoes --- disk/part_efi.c | 9 + include/uuid.h | 4 +--- lib/uuid.c | 11 +-- 3 files changed, 11

[PATCH 3/3] doc/README.gpt: reflow partition type GUID table

2020-11-20 Thread Rasmus Villemoes
The previous patch made the table look bad. Fix it, and leave some space for a future element being a bit longer than the current maximum. Signed-off-by: Rasmus Villemoes --- doc/README.gpt | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a

[PATCH 2/3] doc/README.gpt: define partition type GUID for U-Boot environment

2020-11-20 Thread Rasmus Villemoes
future type GUIDs be defined in the context of U-Boot, it's sensible to use that same namespace GUID. [1] https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs [2] https://en.wikipedia.org/wiki/Universally_unique_identifier#Versions_3_and_5_(namespace_name-based) [3] https://www

Re: Uboot SPI uclass - question

2020-11-22 Thread Rasmus Villemoes
On 02/11/2020 19.14, Moshe, Yaniv wrote: > Hi Simon, > Hope you're doing good. > > My name is Yaniv, and I have a question regarding an old commit in U-boot: > commit 60e2809a848bccd3a8090d3f2237964670f2780c > Author: Simon Glass mailto:s...@chromium.org>> > Date: Tue Feb 17 15:29:35 2015 -0700

Re: [PATCH] string: Use memcpy() within memmove() when we can

2020-11-25 Thread Rasmus Villemoes
On 25/11/2020 12.26, Patrick Delaunay wrote: > A common use of memmove() can be handled by memcpy(). Also memcpy() > includes an optimization for large sizes: it copies a word at a time. So > we can get a speed-up by calling memcpy() to handle our move in this case. > > Update memmove() to call al

[U-Boot] [PATCH] fix always succesful memory test

2016-01-07 Thread Rasmus Villemoes
Since 51209b1f42cb ("Use common mtest iteration counting"), do_mem_mtest has always reported 0 errors and hence returned 0, even if errors were detected. Fix the helpers mem_test_alt() and mem_test_quick() to return the number of errors found. Signed-off-by: Rasmus Villemoes -

[U-Boot] [PATCH] fw_setenv: avoid writing environment when nothing has changed

2018-09-05 Thread Rasmus Villemoes
In the case where one deletes an already-non-existing variable, or sets a variable to the value it already has, there is no point in writing the environment back, thus reducing wear on the underlying storage device. Signed-off-by: Rasmus Villemoes --- tools/env/fw_env.c | 10 +- 1 file

Re: [U-Boot] [PATCH v2] fw_setenv: avoid writing environment when nothing has changed

2018-10-30 Thread Rasmus Villemoes
On 2018-09-27 22:45, Rasmus Villemoes wrote: > In the case where one deletes an already-non-existing variable, or sets > a variable to the value it already has, there is no point in writing the > environment back, thus reducing wear on the underlying storage > device. > > In the

Re: [U-Boot] [PATCH] fw_setenv: avoid writing environment when nothing has changed

2018-09-23 Thread Rasmus Villemoes
On 2018-09-05 21:22, Rasmus Villemoes wrote: > In the case where one deletes an already-non-existing variable, or sets > a variable to the value it already has, there is no point in writing the > environment back, thus reducing wear on the underlying storage > d

Re: [U-Boot] [PATCH] fw_setenv: avoid writing environment when nothing has changed

2018-09-25 Thread Rasmus Villemoes
On 2018-09-24 09:42, Alex Kiernan wrote: > On Wed, Sep 5, 2018 at 8:23 PM Rasmus Villemoes > wrote: >> >> In the case where one deletes an already-non-existing variable, or sets >> a variable to the value it already has, there is no point in writing the >> environme

[U-Boot] [PATCH v2] fw_setenv: avoid writing environment when nothing has changed

2018-09-27 Thread Rasmus Villemoes
. because one is corrupt), make sure that any call of fw_setenv causes the two to become synchronized, even if the fw_setenv call does not change anything in the good copy. Signed-off-by: Rasmus Villemoes --- Add logic to ensure a corrupt copy gets replaced, even if fw_setenv wouldn't change anythi

[U-Boot] [PATCH] Makefile: always preserve output for images that can contain HAB Blocks

2018-03-02 Thread Rasmus Villemoes
value of V, we _additionally_ write the information to make's stdout, whatever that might be. Signed-off-by: Rasmus Villemoes --- My first attempt did $(if $(KBUILD_VERBOSE:0=), | tee , >) $(MKIMAGEOUTPUT) but we can't use a pipeline, since tee is always succesful, so we wou

[U-Boot] [PATCH v2] Allow providing default environment from file

2018-03-20 Thread Rasmus Villemoes
repository. Tested-by: Sean Nyekjaer Signed-off-by: Rasmus Villemoes --- v2: * rename CONFIG_DEFAULT_ENV_FROM_FILE -> CONFIG_USE_DEFAULT_ENV_FILE * add Tested-by * provide a little more rationale (example use case instead of just "sometimes be useful") * rebase to current master (v

Re: [U-Boot] [PATCH v2] Allow providing default environment from file

2018-03-20 Thread Rasmus Villemoes
On 2018-03-20 15:20, Lukasz Majewski wrote: > Hi Rasmus, > >> Modifying the default environment via CONFIG_EXTRA_ENV_SETTINGS is >> somewhat inflexible, partly because the cpp language does not allow >> appending to an existing macro. This prevents reuse of "environment >> fragments" for different

[U-Boot] [PATCH 1/2] Makefile: always preserve output for images that can contain HAB Blocks

2018-03-23 Thread Rasmus Villemoes
nformation to make's stdout, whatever that might be. Signed-off-by: Rasmus Villemoes --- Makefile | 4 ++-- scripts/Makefile.lib | 2 +- scripts/Makefile.spl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5fa14789d9..a63dc96e57 10

[U-Boot] [PATCH 2/2] tools/imximage: use 0x prefix in HAB Blocks line

2018-03-23 Thread Rasmus Villemoes
The u-boot-ivt.img.log file contains 0x prefixes in the HAB Blocks line, while the SPL.log does not. For consistency, and to make it easier to extract and put into a .csf file for use with NXP's code signing tool, add 0x prefixes here. Signed-off-by: Rasmus Villemoes --- doc/README.mxc_hab

Re: [U-Boot] [PATCH v2] Allow providing default environment from file

2018-04-04 Thread Rasmus Villemoes
On 2018-03-20 15:47, Rasmus Villemoes wrote: > On 2018-03-20 15:20, Lukasz Majewski wrote: >> Hi Rasmus, >> >>> Modifying the default environment via CONFIG_EXTRA_ENV_SETTINGS is >>> somewhat inflexible, partly because the cpp language does not allow >>

[U-Boot] [RFC PATCH] Allow providing default environment from file

2018-01-24 Thread Rasmus Villemoes
as the one the mkenvimage tool accepts. I have no idea how portable the sed script implementing the "allow embedded newlines in values" is. Nor do I know if one can expect xxd to be available. Signed-off-by: Rasmus Villemoes --- Makefile | 16 e

Re: [U-Boot] [RFC PATCH] Allow providing default environment from file

2018-01-25 Thread Rasmus Villemoes
On 2018-01-25 10:30, Lukasz Majewski wrote: > Hi Rasmus, > >> It is sometimes useful to be able to define the entire default >> environment in an external file. > > There is already available script for extracting the environment. > > Please look into: > ./scripts/get_default_envs.sh > > Maybe

Re: [U-Boot] [RFC PATCH] Allow providing default environment from file

2018-02-02 Thread Rasmus Villemoes
On 2018-01-24 10:55, Rasmus Villemoes wrote: > It is sometimes useful to be able to define the entire default > environment in an external file. This implements a Kconfig option for > allowing that. ping ___ U-Boot mailing list U-Boot@list

Re: [U-Boot] Default environment file

2019-06-12 Thread Rasmus Villemoes
On 12/06/2019 10.43, Stefano Babic wrote: > Hi Pascal, > > On 12/06/19 10:20, Linder Pascal wrote: >> Hi everyone, >> >> >> I am currently moving the configurations of the KM boards from header files >> to Kconfig. But for the customly defined environment variables I did not >> found a decent so

[U-Boot] booting multi-image with several embedded dtbs

2019-08-28 Thread Rasmus Villemoes
Hi, I have a (legacy) multi-image uImage with several embedded dtbs, but no initrd. I.e. one created by something like "mkimage -T multi -d zImage:dtb1:dtb2:dtb3". I thought I could boot that using the bootm command like this bootm $loadaddr:0 - $loadaddr:3 # choose dtb3 but that fails with E

[U-Boot] [PATCH] Makefile: fix newline escaping for CONFIG_DEFAULT_ENV_FILE

2019-08-28 Thread Rasmus Villemoes
I wanted this to be compatible with mkenvimage, including the ability to embed newlines in variables by escaping them. But I failed to check that it works more than once. Fixes: f3d8f7dd73a (Allow providing default environment from file) Signed-off-by: Rasmus Villemoes --- Makefile | 2 +- 1

[U-Boot] [PATCH] ARM: mxs: spl_boot.c: make early_delay more robust

2019-09-10 Thread Rasmus Villemoes
nd once bitten, twice shy. Signed-off-by: Rasmus Villemoes --- arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c index cb361ac65c..336266fe82 100644 --- a/a

[U-Boot] [PATCH 2/2] ARM: asm/io.h: remove redundant #if !defined(readb) block

2019-09-10 Thread Rasmus Villemoes
readb is unconditionally defined earlier in io.h, so there's no point checking whether it's undefined. Signed-off-by: Rasmus Villemoes --- arch/arm/include/asm/io.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/

[U-Boot] [PATCH 1/2] ARM: asm/io.h: kill off confusing #ifdef __mem_pci block

2019-09-10 Thread Rasmus Villemoes
the first definitions have. So I'm guessing this is practically dead code. Signed-off-by: Rasmus Villemoes --- arch/arm/include/asm/io.h | 41 --- 1 file changed, 41 deletions(-) diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index e6d27b6

[U-Boot] [PATCH 1/4] arm: mxs: fix register definitions for clkctrl_gpmi and clkctrl_sspX

2019-09-12 Thread Rasmus Villemoes
isting ops registers. Signed-off-by: Rasmus Villemoes --- arch/arm/include/asm/arch-mxs/regs-clkctrl-mx23.h | 6 -- arch/arm/include/asm/arch-mxs/regs-clkctrl-mx28.h | 15 ++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/arch/arm/include/asm/arch-mxs/regs-clkctrl

[U-Boot] [PATCH 2/4] arm: mxs: fix comments in arch_cpu_init to match the code

2019-09-12 Thread Rasmus Villemoes
The comment says to clear the bypass bit, but in fact it sets it, thus selecting ref_xtal. And the next line of code does not set the divider to 12, but to (the reset value of) 1. Signed-off-by: Rasmus Villemoes --- arch/arm/cpu/arm926ejs/mxs/mxs.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[U-Boot] [PATCH 3/4] arm: mxs: be more careful when enabling gpmi_clk

2019-09-12 Thread Rasmus Villemoes
The data sheet says that the DIV field cannot change while the CLKGATE bit is set or modified. So do it a little more carefully, by first clearing the bit, waiting for that to appear, then setting the DIV field. Signed-off-by: Rasmus Villemoes --- arch/arm/cpu/arm926ejs/mxs/mxs.c | 5 - 1

[U-Boot] [PATCH 0/4] arm: mxs: mxs_set_gpmiclk

2019-09-12 Thread Rasmus Villemoes
While trying to implement an mxs_set_gpmiclk() I stumbled on a few minor things. Rasmus Villemoes (4): arm: mxs: fix register definitions for clkctrl_gpmi and clkctrl_sspX arm: mxs: fix comments in arch_cpu_init to match the code arm: mxs: be more careful when enabling gpmi_clk arm: mxs

[U-Boot] [PATCH 4/4] arm: mxs: implement mxs_set_gpmiclk

2019-09-12 Thread Rasmus Villemoes
ble that at its maximum frequency. Signed-off-by: Rasmus Villemoes --- arch/arm/cpu/arm926ejs/mxs/clock.c| 41 +++ arch/arm/include/asm/arch-mxs/clock.h | 1 + 2 files changed, 42 insertions(+) diff --git a/arch/arm/cpu/arm926ejs/mxs/clock.c b/arch/arm/cpu/arm926ejs/mx

[U-Boot] [RFC PATCH 2/3] u-boot/sha256.h: include linux/types.h

2019-09-19 Thread Rasmus Villemoes
One cannot use sha256.h by itself - the includer must already have made sure that uint32_t and friends are defined; i.e., having included linux/types.h either directly or indirectly. That's a little annoying, so just make the header self-contained. Signed-off-by: Rasmus Villemoes --- incl

[U-Boot] [RFC PATCH 0/3] collect entropy, populate /chosen/rng-seed

2019-09-19 Thread Rasmus Villemoes
t there's quite a few that flip randomly between boots - so mixing in a MB or two seems that it should provide plenty of real entropy. Rasmus Villemoes (3): u-boot/sha256.h: add SHA256_INIT macro u-boot/sha256.h: include linux/types.h add infrastructure for collecting entropy common/fdt_sup

[U-Boot] [RFC PATCH 1/3] u-boot/sha256.h: add SHA256_INIT macro

2019-09-19 Thread Rasmus Villemoes
To be used for statically initializing a sha256 context. Signed-off-by: Rasmus Villemoes --- include/u-boot/sha256.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/u-boot/sha256.h b/include/u-boot/sha256.h index 9aa1251789..10f42091ee 100644 --- a/include/u-boot/sha256

[U-Boot] [RFC PATCH 3/3] add infrastructure for collecting entropy

2019-09-19 Thread Rasmus Villemoes
Fb 40d07670: 34281000 600a9100 00026040 2046e400..(4...`@`F So some bits are always the same, but there's quite a few that flip randomly between boots - so mixing in a MB or two seems that it should provide plenty of real entropy. Signed-off-by: Rasmus Villemoes --- common/

Re: [U-Boot] [PATCH 0/4] arm: mxs: mxs_set_gpmiclk

2019-09-27 Thread Rasmus Villemoes
On 12/09/2019 11.17, Rasmus Villemoes wrote: > While trying to implement an mxs_set_gpmiclk() I stumbled on a few minor > things. > > Rasmus Villemoes (4): > arm: mxs: fix register definitions for clkctrl_gpmi and clkctrl_sspX > arm: mxs: fix comments in arch_cpu_init

Re: [PATCH] Revert "config: tools only: add VIDEO to build bmp_logo"

2023-01-25 Thread Rasmus Villemoes
On 20/01/2023 16.23, Tom Rini wrote: > On Fri, Jan 20, 2023 at 08:30:27AM +, Peter Robinson wrote: >> On Thu, Jan 19, 2023 at 2:02 PM Tom Rini wrote: >>> >>> On Thu, Jan 19, 2023 at 11:52:11AM +, Peter Robinson wrote: On Thu, Jan 19, 2023 at 11:33 AM Fabio Estevam wrote: > >

Re: [PATCH] Revert "config: tools only: add VIDEO to build bmp_logo"

2023-01-25 Thread Rasmus Villemoes
On 25/01/2023 15.28, Rasmus Villemoes wrote: > On 20/01/2023 16.23, Tom Rini wrote: >> On Fri, Jan 20, 2023 at 08:30:27AM +, Peter Robinson wrote: >>> On Thu, Jan 19, 2023 at 2:02 PM Tom Rini wrote: >>>> >>>> On Thu, Jan 19, 2023 at 11:52:11AM +,

Re: [PATCH] phy: add of_set_phy_supported() helper, call from phy_config()

2023-01-26 Thread Rasmus Villemoes
On 18/09/2022 08.13, Ramon Fried wrote: > On Tue, Aug 9, 2022 at 2:53 PM Rasmus Villemoes > wrote: >> >> Currently, U-Boot doesn't parse a "max-speed" DT property in a phy's >> DT node. That property is a standard binding which should be honoured, >&

Re: [PATCH] build_bug.h: Also define static_assert() when __CHECKER__ is defined

2023-01-26 Thread Rasmus Villemoes
On 26/01/2023 19.17, Christophe Leroy wrote: > When doing a build with C=2, the following failure is encountered on > several files: > > CHECK arch/powerpc/cpu/mpc8xxx/fsl_lbc.c > arch/powerpc/cpu/mpc8xxx/fsl_lbc.c: note: in included file (through > arch/powerpc/include/asm/global

Re: [PATCH] build_bug.h: Also define static_assert() when __CHECKER__ is defined

2023-01-27 Thread Rasmus Villemoes
On 27/01/2023 09.41, Christophe Leroy wrote: > > Also I have a problem with the following u-boot commit : aa9e891c633 > ("include/linux/stddef.h: avoid 'warning: preprocessor token offsetof > redefined'") > > On uboot mainline I get: > ... > What can we do about it ? At least reverting it rep

Re: [PATCH v2 09/87] Rename ARCH_NPCM7xx

2023-01-29 Thread Rasmus Villemoes
On 29/01/2023 01.57, Simon Glass wrote: > CONFIG options must not use lower-case letter. Why? Rasmus

Re: [PATCH v2 09/87] Rename ARCH_NPCM7xx

2023-01-30 Thread Rasmus Villemoes
On 30/01/2023 16.54, Tom Rini wrote: > On Sun, Jan 29, 2023 at 10:57:28PM +0100, Rasmus Villemoes wrote: >> On 29/01/2023 01.57, Simon Glass wrote: >>> CONFIG options must not use lower-case letter. >> >> Why? > > So, kconfiglib complains about these. Which I

Re: [PATCH] phy: add of_set_phy_supported() helper, call from phy_config()

2023-01-30 Thread Rasmus Villemoes
On 30/01/2023 18.16, Tom Rini wrote: > On Thu, Jan 26, 2023 at 05:54:51PM -0700, Simon Glass wrote: >> Hi Rasmus, >> >> On Tue, 9 Aug 2022 at 05:53, Rasmus Villemoes >> wrote: >>> >>> Currently, U-Boot doesn't parse a "max-speed" DT

[PATCH] introduce CONFIG_DEVICE_TREE_INCLUDES

2021-09-28 Thread Rasmus Villemoes
t node, so I don't want to tie this exclusively to use for verified boot. Signed-off-by: Rasmus Villemoes --- Getting the public key metadata into .dtsi form can be done with a little scripting (roughly 'mkimage -K' of a dummy image followed by 'dtc -I dtb -O dts'). I have

Re: [PATCH] imx: imx7d-sdb: fix ethernet, sync .dts with linux

2021-09-28 Thread Rasmus Villemoes
On 16/09/2021 18.52, Fabio Estevam wrote: > Hi Rasmus, > > On Thu, Sep 16, 2021 at 11:53 AM Rasmus Villemoes > wrote: >> >> Commit 0d52bab46 (mx7dsabre: Enable DM_ETH) changed these flags from 0 >> (aka GPIO_ACTIVE_HIGH) to GPIO_ACTIVE_LOW. It claimed to "Als

Re: [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-10-04 Thread Rasmus Villemoes
On 02/10/2021 02.38, Simon Glass wrote: > At present U-Boot environment variables, and thus scripts, are defined > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > to this file and dealing with quoting and newlines is harder than it > should be. It would be better if we co

Re: [PATCH] introduce CONFIG_DEVICE_TREE_INCLUDES

2021-10-04 Thread Rasmus Villemoes
Please note that this is not a resubmission of fdt_add_pubkey, I merely mentioned that in passing (and cc'ed Roman because of his interest in that) as a previous attempt at solving the problem of getting the public key info baked into U-Boot's .dtb, an approach that I've since learnt is not without

Re: [PATCH 08/10] env: Use strncpy() instead of ad-hoc code to copy variable value

2021-10-12 Thread Rasmus Villemoes
On 12/10/2021 13.04, Marek Behún wrote: > From: Marek Behún > > Copy the value of the found variable into given buffer with strncpy(). > > Signed-off-by: Marek Behún > --- > cmd/nvedit.c | 15 +-- > 1 file changed, 5 insertions(+), 10 deletions(-) > > diff --git a/cmd/nvedit.c b/c

Re: [PATCH 08/10] env: Use strncpy() instead of ad-hoc code to copy variable value

2021-10-12 Thread Rasmus Villemoes
On 12/10/2021 14.00, Marek Behún wrote: > On Tue, 12 Oct 2021 13:41:43 +0200 > Rasmus Villemoes wrote: > >> On 12/10/2021 13.04, Marek Behún wrote: >> I understand why you want to avoid an open-coded copying, but strncpy >> is almost certainly the wrong tool

[PATCH 0/2] imx8m rom api fixups

2021-10-14 Thread Rasmus Villemoes
While trying to figure out why I can't get an imx8mp to boot via usb serial download, I stumbled on the distinct lack of documentation on both the ROM API and the USB protocol, and what appears to be an actual bug in the rom api interface code. Rasmus Villemoes (2): arm: imx:

[PATCH 1/2] arm: imx: move spl_imx_romapi.c to imx8m/ subdirectory

2021-10-14 Thread Rasmus Villemoes
arily meaningful to enable BOOTROM_SUPPORT for those other platforms, it makes better sense for code which is specific to imx8m to live in imx8m/. Signed-off-by: Rasmus Villemoes --- arch/arm/mach-imx/Makefile | 2 -- arch/arm/mach-imx/imx8m/Makefile | 1 + arc

[PATCH 2/2] arm: imx8m: sanitize use of ROM API

2021-10-14 Thread Rasmus Villemoes
the first bug. Signed-off-by: Rasmus Villemoes --- arch/arm/include/asm/mach-imx/sys_proto.h | 5 ++- arch/arm/mach-imx/imx8m/soc.c | 33 ++--- arch/arm/mach-imx/imx8m/spl_imx_romapi.c | 45 ++- 3 files changed, 41 insertions(+), 42 deletions(-) diff --g

Re: [PATCH 1/2] arm: imx: move spl_imx_romapi.c to imx8m/ subdirectory

2021-10-15 Thread Rasmus Villemoes
On 15/10/2021 11.02, Peng Fan (OSS) wrote: > > > On 2021/10/14 20:52, Rasmus Villemoes wrote: >> Currently, if one builds for an iMX platform != imx8m and selects >> CONFIG_SPL_BOOTROM_SUPPORT, the build breaks because some >> definitions (struct rom_api, the enum

Re: [PATCH v2 15/16] clk: Detect failure to set defaults

2021-10-20 Thread Rasmus Villemoes
On 20/08/2021 20.18, Simon Glass wrote: > Hi Harm, > > On Wed, 18 Aug 2021 at 08:09, Harm Berntsen wrote: >> >> On Thu, 2021-05-13 at 19:39 -0600, Simon Glass wrote: >>> int clk_uclass_post_probe(struct udevice *dev) >>> { >>> + int ret; >>> + >>> /* >>> * when a clock pr

serial download on imx8mp

2021-10-22 Thread Rasmus Villemoes
Hi I'm having trouble getting serial download to work on an imx8mp evk. I'm building on top of v2021.10. The SPL + U-Boot proper that I build work fine when I write them to an SD card and boot from that, also boot from eMMC with the same binaries works fine. I can also succesfully get the SPL to

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Rasmus Villemoes
On 21/10/2021 18.03, Tom Rini wrote: > On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon Glass wrote: >> Hi Marek, >> >> On Thu, 21 Oct 2021 at 07:28, Marek Behún wrote: >>> >>> On Thu, 21 Oct 2021 15:25:37 +0200 >>> Marek Behún wrote: >>> Hello, On Thu, 21 Oct 2021 15:06:51 +0200 >>

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-25 Thread Rasmus Villemoes
On 24/10/2021 21.54, Simon Glass wrote: > Hi Rasmus, > > On Fri, 22 Oct 2021 at 00:41, Rasmus Villemoes > wrote: >> >> On 21/10/2021 18.03, Tom Rini wrote: >>> On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon Glass wrote: >>>> Hi Marek, >>>&

Re: [PATCH] introduce CONFIG_DEVICE_TREE_INCLUDES

2021-10-25 Thread Rasmus Villemoes
On 28/09/2021 10.56, Rasmus Villemoes wrote: > The build system already automatically looks for and includes an > in-tree *-u-boot.dtsi when building the control .dtb. However, there > are some things that are awkward to maintain in such an in-tree file, > most notably the metadata a

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-25 Thread Rasmus Villemoes
On 25/10/2021 17.18, Simon Glass wrote: > Hi Rasmus, > > On Mon, 25 Oct 2021 at 01:06, Rasmus Villemoes > wrote: >> Exactly, there's really never any case where that would be sensible. But >> I would probably go a bit further and simply restrict varnames to th

Re: [PATCH] introduce CONFIG_DEVICE_TREE_INCLUDES

2021-10-26 Thread Rasmus Villemoes
On 26/10/2021 03.28, Simon Glass wrote: > Hi Rasmus, > > On Tue, 28 Sept 2021 at 02:57, Rasmus Villemoes > wrote: >> >> The build system already automatically looks for and includes an >> in-tree *-u-boot.dtsi when building the control .dtb. However, there >>

[PATCH] mpc83xx: make ARCH_MPC8309 select SYS_FSL_ERRATUM_ESDHC111

2019-12-11 Thread Rasmus Villemoes
The mpc8309 is also affected by the "Manual Asynchronous CMD12 abort operation causes protocol violations" erratum, though it is enumerated as eSDHC16 in the errata sheet for mpc8309. Signed-off-by: Rasmus Villemoes --- arch/powerpc/cpu/mpc83xx/Kconfig | 1 + 1 file changed, 1

[PATCH] spl_fit.c: enable loading compressed u-boot from fit image

2019-12-11 Thread Rasmus Villemoes
content is uncompressed. Signed-off-by: Klaus H. Sorensen Signed-off-by: Rasmus Villemoes --- common/spl/spl_fit.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index b3e3ccd5a2..98271eb878 100644 --- a/common/spl/spl_f

[PATCH] cmd/eeprom.c: prepend 0x to hex numbers in output message format

2019-12-11 Thread Rasmus Villemoes
From: "Klaus H. Sorensen" If the numbers do not happen to contain any digits from [a-f], it's not clear that they are base 16. Signed-off-by: Klaus H. Sorensen Signed-off-by: Rasmus Villemoes --- cmd/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] powerpc: mpc83xx: convert CONFIG_FSL_ELBC to Kconfig

2019-12-12 Thread Rasmus Villemoes
This complements commit 068789773d0 which did the conversion for mpc85xx. Signed-off-by: Rasmus Villemoes --- arch/powerpc/cpu/mpc83xx/Kconfig | 7 +++ include/configs/MPC8313ERDB_NAND.h | 1 - include/configs/MPC8313ERDB_NOR.h | 1 - include/configs/MPC8315ERDB.h | 2 -- include

[PATCH] mpc83xx: immap_83xx: add spi8xxx_t in immap for mpc8309

2019-12-12 Thread Rasmus Villemoes
Allow drivers/spi/mpc8xxx_spi.c to be built for an mpc8309 target. Signed-off-by: Rasmus Villemoes --- arch/powerpc/include/asm/immap_83xx.h | 3 +-- arch/powerpc/include/asm/mpc8xxx_spi.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm

[PATCH] mpc83xx: set MPC83XX_GPIO_CTRLRS to 2 for MPC8309

2019-12-12 Thread Rasmus Villemoes
The MPC8309 has two gpio controllers (which is already correctly reflected in its struct immap definition). Signed-off-by: Rasmus Villemoes --- arch/powerpc/include/asm/arch-mpc83xx/gpio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/arch

[PATCH] doc: really get rid of Documentation/ directory

2019-12-12 Thread Rasmus Villemoes
oc/ is from 4.0-rc1. So replace the latter by the former, and making Documentation/ finally empty. Signed-off-by: Rasmus Villemoes --- Documentation/.gitignore | 1 - .../devicetree/bindings/net/ethernet.txt | 66 --- doc/device-tree-bindings/net/ethern

[PATCH] sysreset_mpc83xx: fix mcp83xx -> mpc83xx typo

2019-12-13 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- configs/gazerbeam_defconfig | 2 +- drivers/sysreset/Kconfig| 2 +- drivers/sysreset/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/gazerbeam_defconfig b/configs/gazerbeam_defconfig index 3a29bb1277..2d690245f1

commit "dm: spi: Avoid setting the speed with every transfer"

2019-12-14 Thread Rasmus Villemoes
Hi I'm wondering how commit 60e2809a84 (dm: spi: Avoid setting the speed with every transfer) works. AFAIU, the currently selected speed is a property of the SPI master, so suppose we have two slaves, A which has max_hz = 10MHz and B which has max_hz = 20MHz. Now suppose we do transfers to A, then

[PATCH] env: another attempt at fixing SPL build failures

2019-12-15 Thread Rasmus Villemoes
conditionals such as #if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT) found in drivers/reset/reset-socfpga.c to just CONFIG_IS_ENABLED(ENV_SUPPORT). Signed-off-by: Rasmus Villemoes --- env/Kconfig | 3 +++ env/Makefile | 13 + 2 files changed, 8 insertions(+), 8 delet

[PATCH] mpc83xx_clk: always treat MPC83XX_CLK_PCI as invalid

2019-12-19 Thread Rasmus Villemoes
n the CFG_CLKIN_DIV configuration input, but that can't be read from software, so to properly fill out ->speed[MPC83XX_CLK_PCI] I think one would need guidance from Kconfig or dtb. Partially fixes: 07d538d281 clk: Add MPC83xx clock driver Signed-off-by: Rasmus Villemoes --- drivers/clk/mpc8

Re: an off-by-one error in dm_test_rtc_set_get()?

2021-10-28 Thread Rasmus Villemoes
On 27/10/2021 15.22, Tom Rini wrote: > On Wed, Oct 27, 2021 at 12:43:38PM +0800, Bin Meng wrote: >> Hi Simon, >> >> gitlab reported the following test error below: >> >> === FAILURES >> === >> __ test_ut[ut_dm_

Re: [PATCH v2] imx: spl: fix imx8m secure boot

2021-11-01 Thread Rasmus Villemoes
On 17/08/2021 08.17, Heiko Schocher wrote: > cherry-picked from NXP code: > 719d665a87c6: ("MLK-20467 imx8m: Fix issue for booting signed image through > uuu") > > which fixes secure boot on imx8m based boards. > [...] > Works on sdcard and QSPI NOR boot on phycore-imx8mp board. Hm, the subje

Re: Injecting public keys into FTDs for FIT verification

2021-11-05 Thread Rasmus Villemoes
On 05/11/2021 11.16, Jan Kiszka wrote: > Hi all, > > in order to use CONFIG_FIT_SIGNATURE and also > CONFIG_SPL_FIT_SIGNATURE, a public key needs to be placed into the > control FDT. So far, I only found mkimage being able to do that during > FIT image signing. That is fairly unhandy and often inc

Re: [RFC 0/2] Do not stop with an error when mkimage fails

2021-11-09 Thread Rasmus Villemoes
On 09/11/2021 20.42, Tom Rini wrote: > On Tue, Nov 09, 2021 at 08:21:07PM +0100, Heiko Thiery wrote: >> Hi Wolfgang, >> >> I know this is not a perfect solution but I don't know how to get my >> board merged without doing this kind of workaround for the U-Boot CI. > > Unfortunately in these days

Re: [RFC 0/2] Do not stop with an error when mkimage fails

2021-11-09 Thread Rasmus Villemoes
On 10/11/2021 01.18, Rasmus Villemoes wrote: > On 09/11/2021 20.42, Tom Rini wrote: >> On Tue, Nov 09, 2021 at 08:21:07PM +0100, Heiko Thiery wrote: >>> Hi Wolfgang, >>> > >>> I know this is not a perfect solution but I don't know how to get my

[PATCH v2] introduce CONFIG_DEVICE_TREE_INCLUDES

2021-11-21 Thread Rasmus Villemoes
t node, so I don't want to tie this exclusively to use for verified boot. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- v2: rebase to current master, add paragraph to doc/develop/devicetree/control.rst as suggested by Simon. I've taken the liberty of keeping his R-b t

two questions on verified boot

2021-11-21 Thread Rasmus Villemoes
(1) When one wants to get rid of CONFIG_LEGACY_IMAGE_FORMAT, one also has to wrap any boot script in a FIT rather than a uImage. While it's not directly documented anywhere how to do that, it seems that a minimal .its for achieving it is /dts-v1/; / { description = "U-Boot script(s)";

[RFC PATCH] dts: automatically build necessary .dtb files

2022-01-10 Thread Rasmus Villemoes
te from all the arch/*/dts/Makefile files to the new scripts/Makefile.dts. Signed-off-by: Rasmus Villemoes --- arch/arc/dts/Makefile| 2 ++ arch/arm/dts/Makefile| 2 ++ arch/m68k/dts/Makefile | 2 ++ arch/microblaze/dts/Makefile | 2 ++ arch/mips/dts/Makefile | 2 +

<    3   4   5   6   7   8   9   10   11   >