Re: [PATCH 02/31] kconfig: Add support for conditional values

2022-01-12 Thread Rasmus Villemoes
On 12/01/2022 22.56, Tom Rini wrote: > On Wed, Jan 12, 2022 at 02:28:21PM -0700, Simon Glass wrote: >> Hi Ilias, >> >> On Mon, 1 Nov 2021 at 01:05, Ilias Apalodimas >> wrote: >>> >>> On Mon, 1 Nov 2021 at 03:19, Simon Glass wrote: At present if an optional Kconfig value needs to be used

Re: [PATCH 04/31] stddef: Avoid warning with clang with offsetof()

2022-01-13 Thread Rasmus Villemoes
On 01/11/2021 02.17, Simon Glass wrote: > Some bright sparks have decided that a cast on a constant cannot be a > constant, so offsetof() produces this warning on clang-10: > > include/intel_gnvs.h:113:1: error: static_assert expression is not an > integral constant expression > check_member

Re: [PATCH 02/31] kconfig: Add support for conditional values

2022-01-13 Thread Rasmus Villemoes
On 13/01/2022 13.52, Tom Rini wrote: > On Thu, Jan 13, 2022 at 08:56:02AM +0100, Rasmus Villemoes wrote: >> On 12/01/2022 22.56, Tom Rini wrote: >>> I also think I've seen cases where doing: >>> if (CONFIG_EVALUATES_TO_ZERO) { >>> ... >>> } >

Re: [PATCH v2] introduce CONFIG_DEVICE_TREE_INCLUDES

2022-01-14 Thread Rasmus Villemoes
Ping On 21/11/2021 14.52, 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

Re: [PATCH] introduce CONFIG_DEVICE_TREE_INCLUDES

2022-01-24 Thread Rasmus Villemoes
On 14/01/2022 17.51, Simon Glass wrote: > Hi Rasmus, > > On Tue, 26 Oct 2021 at 02:08, Rasmus Villemoes > wrote: >> >> On 26/10/2021 03.28, Simon Glass wrote: >>> Hi Rasmus, >>> >>> On Tue, 28 Sept 2021 at 02:57, Rasmus Villemoes >>> w

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

2022-01-24 Thread Rasmus Villemoes
On 24/01/2022 18.57, Simon Glass wrote: > Hi, > > On Mon, 24 Jan 2022 at 09:02, Tom Rini wrote: >> >> On Mon, Jan 10, 2022 at 02:34:41PM +0100, Rasmus Villemoes wrote: >> >>> When building for a custom board, it is quite common to maintain a >>> pr

Re: [PATCH] introduce CONFIG_DEVICE_TREE_INCLUDES

2022-01-24 Thread Rasmus Villemoes
On 24/01/2022 18.57, Simon Glass wrote: >> And the thing about "adding the signature" - yes, indeed, _signing_ can >> and should be done after building. But that is not at all what this >> started with, this is about embedding the metadata that U-Boot (or SPL) >> will need for _verifying_ during t

Re: [PATCH] introduce CONFIG_DEVICE_TREE_INCLUDES

2022-01-25 Thread Rasmus Villemoes
On 25/01/2022 00.50, Simon Glass wrote: > Hi Rasmus, > > On Mon, 24 Jan 2022 at 15:15, Rasmus Villemoes > wrote: >> >> On 24/01/2022 18.57, Simon Glass wrote: >> >>>> And the thing about "adding the signature" - yes, indeed, _signing_ can >

Re: [PATCH v2 2/3] allow positional arguments with "run" command

2020-10-19 Thread Rasmus Villemoes
On 19/10/2020 09.31, Wolfgang Denk wrote: > Dear Rasmus, > > In message <2284dd1d-f20c-6246-805e-55454a581...@prevas.dk> you wrote: >> >>> Yes that's good, but is the plan now to take these patches rather than >>> update to the latest hush? I was wondering is Buzybox has any tests >>> for hush. >>

Re: [PATCH 11/11] bootm: Support string substitution in bootargs

2020-10-19 Thread Rasmus Villemoes
On 19/10/2020 15.56, Simon Glass wrote: > In some cases it is necessary to pass parameters to Linux so that it will > boot correctly. For example, the rootdev parameter is often used to > specify the root device. However the root device may change depending on > whence U-Boot loads the kernel. At p

[RFC PATCH] scripts/setlocalversion: avoid keeping double-quotes in UBOOTRELEASE

2020-10-27 Thread Rasmus Villemoes
may contain $() constructs, grep for the few lines we're interested in and eval those. Signed-off-by: Rasmus Villemoes --- This is not really meant for applying, hence RFC. I hope to be able to get U-Boot's and linux' copies completely in sync (since the last sync a few weeks ago

Re: [PATCH 4/5] sandbox: implement reset

2020-10-27 Thread Rasmus Villemoes
On 25/10/2020 07.04, Heinrich Schuchardt wrote: > Up to now the sandbox would shutdown upon a cold reset request. Instead it > should be reset. > > In our coding we use static variables. The only safe way to return to an > initial state is to relaunch the U-Boot binary. > > The reset implementati

Re: [PATCH 4/5] sandbox: implement reset

2020-10-27 Thread Rasmus Villemoes
On 27/10/2020 14.33, Heinrich Schuchardt wrote: > On 27.10.20 13:12, Rasmus Villemoes wrote: >> On 25/10/2020 07.04, Heinrich Schuchardt wrote: >>> Up to now the sandbox would shutdown upon a cold reset request. Instead it >>> should be reset. >>> >>&g

Re: [PATCH v2 5/8] sandbox: implement reset

2020-10-27 Thread Rasmus Villemoes
On 27/10/2020 19.47, Heinrich Schuchardt wrote: > Up to now the sandbox would shutdown upon a cold reset request. Instead it > should be reset. > > In our coding we use static variables like LIST_HEAD(efi_obj_list). A reset > can occur at any time, e.g. via an UEFI binary calling the reset service

Re: [PATCH] env: env_sf: don't set .init op if not needed

2020-11-03 Thread Rasmus Villemoes
On 03/11/2020 08.52, Wolfgang Denk wrote: > Dear Heiko, > > In message you wrote: >> >>> Apparently the meaning of CONFIG_ENV_IS_NOWHERE is nowhere >>> documented :-( >> >> env/Kconfig says: > > Ah, I missed that. I was only checkng the README and the doc/ > files... > >> config ENV_IS_NOWHERE

Re: [PATCH v2 0/3] allow positional arguments with "run"

2020-11-04 Thread Rasmus Villemoes
On 07/10/2020 09.20, Rasmus Villemoes wrote: > This enables one to use positional arguments $1..$9 in functions > defined in the environment, Tom, can I ask for a decision on these? I know Wolfgang is opposed, and if that counts as a veto, fine, I'd just like to know so these are a

Re: [PATCH] env: env_sf: don't set .init op if not needed

2020-11-05 Thread Rasmus Villemoes
On 05/11/2020 17.40, Wolfgang Denk wrote: > Dear Rasmus, > > In message <8ff3b8ad-8c4e-fe99-69c8-7c174e997...@prevas.dk> you wrote: >> Not in a none standard way! Instead you can define more than one environment storage devices and load them in a board specific order (defined thorug

[PATCH 2/5] fdtdec: introduce fdtdec_get_config_property

2020-11-10 Thread Rasmus Villemoes
Add a wrapper for retrieving a given property from the /config node as a (blob, length) pair. A later patch will need the length of the property and thus cannot just use fdtdec_get_config_string(). Rewrite that to use the new wrapper. Signed-off-by: Rasmus Villemoes --- include/fdtdec.h | 14

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

2020-11-10 Thread Rasmus Villemoes
-enviroment property, whose value will be used to amend the default environment baked into the U-Boot binary itself. Signed-off-by: Rasmus Villemoes --- cmd/nvedit.c | 37 + env/Kconfig | 21 + env/common.c | 19 +++ 3 files changed

[PATCH 0/5] allow default environment to be amended from dtb

2020-11-10 Thread Rasmus Villemoes
ent for setting /config/bootdelay to 123, as the latter takes effect whether the environment is the default one or one loaded from storage.] It does not affect the case where an environment is loaded from a storage device, nor is there any change if the new CONFIG_ option is not selected. Rasm

[PATCH 1/5] fdtdec: make fdtdec_get_config_string() return const char*

2020-11-10 Thread Rasmus Villemoes
Nobody should modify the string returned by fdtdec_get_config_string(), so make it return a const pointer. Signed-off-by: Rasmus Villemoes --- arch/arm/mach-exynos/include/mach/mipi_dsim.h | 2 +- arch/arm/mach-rockchip/rk3188/rk3188.c| 2 +- board/dhelectronics/dh_stm32mp1/board.c

[PATCH 3/5] env: make env_set_default_vars() return void

2020-11-10 Thread Rasmus Villemoes
Unlike most other functions declared in env.h, the return value of this one also isn't documented. It only has a single caller, which ignores the return value. And the companion, env_set_default(), already has void as return type. Signed-off-by: Rasmus Villemoes --- env/common.c

[PATCH 5/5] test: add tests for default environment

2020-11-10 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- configs/sandbox64_defconfig | 1 + configs/sandbox_defconfig | 1 + include/configs/sandbox.h | 8 ++- test/env/Makefile | 1 + test/env/default.c | 102 5 files changed, 112 insertions(+), 1

Re: Antw: [EXT] [systemd-devel] [SPECIFICATION RFC] The firmware and bootloader log specification

2020-11-16 Thread Rasmus Villemoes
On 16/11/2020 08.02, Ulrich Windl wrote: Daniel Kiper schrieb am 14.11.2020 um 00:52 in > Nachricht <20201113235242.k6fzlwmwm2xqh...@tomti.i.net-space.pl>: > ... >> The members of struct bf_log_msg: >> ‑ size: total size of bf_log_msg struct, >> ‑ ts_nsec: timestamp expressed in nanosecon

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

2020-11-17 Thread Rasmus Villemoes
On 17/11/2020 00.52, Simon Glass wrote: > Hi Rasmus, > > On Thu, 12 Nov 2020 at 12:59, Wolfgang Denk wrote: >> >> Dear Rasmus Villemoes, >> >> In message <20201110202603.20944-5-rasmus.villem...@prevas.dk> you wrote: >>> It can be useful to

RFC: Partition type GUID for U-Boot environment

2020-11-17 Thread Rasmus Villemoes
Hi, Would it make sense to choose a canonical "Partition type GUID" [1] for partitions used to store a U-Boot environment? The partition type is mostly informational, but I'm thinking it might make sense to have some canonical thing to put into an image definition rather than having the tool use

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

2020-11-17 Thread Rasmus Villemoes
On 17/11/2020 13.21, Marcin Juszkiewicz wrote: > W dniu 17.11.2020 o 11:05, Rasmus Villemoes pisze: > >> Would it make sense to choose a canonical "Partition type GUID" [1] for >> partitions used to store a U-Boot environment? >> >> The partition type is m

Re: two questions on verified boot

2022-01-27 Thread Rasmus Villemoes
On 27/01/2022 16.06, Simon Glass wrote: > Hi Rasmus, > > On Sun, 21 Nov 2021 at 07:55, Rasmus Villemoes > wrote: >> >> (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 i

Re: [PATCH v3 03/31] str: Fix a few bugs in trailing_strtoln()

2022-01-31 Thread Rasmus Villemoes
On 19/01/2022 02.42, Simon Glass wrote: > At present this has a minor bug in that it reads the byte before the > start of the string. Only for an empty string, AFAICS. Which is a bug, of course, but mostly the caller is to blame. Also it doesn't handle a non-numeric prefix which is > only one ch

[PATCH v2 00/10] new rtc methods, rtc command, and tests

2020-05-19 Thread Rasmus Villemoes
Simon. - The rtc command's interface has been simplified a bit (no separate read/readm; the number of arguments determines whether the user wants the result on the console or to a memory address) - Add tests, both of rtc_{read,write}() and of the shell command, fixing a few things I stumbled on.

[PATCH v2 04/10] rtc: pcf2127: provide ->read method

2020-05-19 Thread Rasmus Villemoes
This simply consists of renaming the existing pcf2127_read_reg() helper to follow the naming of the other methods (i.e. pcf2127_rtc_) and changing the type of its "len" parameter. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- drivers/rtc/pcf2127.c | 6 +++--- 1 file

[PATCH v2 03/10] rtc: fall back to ->{read, write} if ->{read, write}8 are not provided

2020-05-19 Thread Rasmus Villemoes
ovides ->read() would most likely just duplicate the logic here for implementing a ->read8() method in term of its ->read() method. The same remarks of course apply to the write case. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- drivers/rtc/rtc-uclass.c | 24

[PATCH v2 02/10] rtc: add rtc_write() helper

2020-05-19 Thread Rasmus Villemoes
Similar to rtc_read(), introduce a helper that allows the caller to write multiple consecutive 8-bit registers with one call. If the driver provides the ->write method, use that, otherwise loop using ->write8. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- drivers/r

[PATCH v2 06/10] rtc: add rtc command

2020-05-19 Thread Rasmus Villemoes
Mostly as an aid for debugging RTC drivers, provide a command that can be used to read/write arbitrary registers (assuming the driver provides the read/write methods or their single-register-at-a-time variants). Signed-off-by: Rasmus Villemoes --- cmd/Kconfig | 6 ++ cmd/Makefile | 1

[PATCH v2 05/10] rtc: pcf2127: provide ->write method

2020-05-19 Thread Rasmus Villemoes
Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- drivers/rtc/pcf2127.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/rtc/pcf2127.c b/drivers/rtc/pcf2127.c index f48cd8cb18..a3faf62ee0 100644 --- a/drivers/rtc/pcf2127.c +++ b/drivers/rtc/pcf2127.c @@ -42,6 +42,12

[PATCH v2 01/10] rtc: add rtc_read helper and ->read method

2020-05-19 Thread Rasmus Villemoes
ned-off-by: Rasmus Villemoes --- drivers/rtc/rtc-uclass.c | 18 ++ include/rtc.h| 23 +++ 2 files changed, 41 insertions(+) diff --git a/drivers/rtc/rtc-uclass.c b/drivers/rtc/rtc-uclass.c index a0a238aedd..44d76bb70f 100644 --- a/drivers/rtc/rtc-uclas

[PATCH v2 08/10] rtc: i2c_rtc_emul: catch any write to the "reset" register

2020-05-19 Thread Rasmus Villemoes
It's more natural that any write that happens to touch the reset register should cause a reset, rather than just a write that starts at that offset. Signed-off-by: Rasmus Villemoes --- drivers/rtc/i2c_rtc_emul.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver

[PATCH v2 07/10] rtc: sandbox-rtc: fix set method

2020-05-19 Thread Rasmus Villemoes
ead(), so the 31 we just wrote to mday gets overwritten by a 1. Fix it by writing all registers at once, and for consistency, update the get method to retrieve them all with one "i2c transfer". Signed-off-by: Rasmus Villemoes --- drivers/rtc/sandbox_rtc.c | 65 +++---

[PATCH v2 09/10] test: dm: rtc: add test of rtc_read, rtc_write

2020-05-19 Thread Rasmus Villemoes
Define a few aux registers and check that they can be read/written individually. Also check that one can access the time-keeping registers directly and get the expected results. Signed-off-by: Rasmus Villemoes --- arch/sandbox/include/asm/rtc.h | 5 test/dm/rtc.c | 45

[PATCH v2 10/10] test: dm: rtc: add tests of rtc shell command

2020-05-19 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- test/dm/rtc.c | 61 +++ 1 file changed, 61 insertions(+) diff --git a/test/dm/rtc.c b/test/dm/rtc.c index 5301805d19..d1d8ff0375 100644 --- a/test/dm/rtc.c +++ b/test/dm/rtc.c @@ -5,6 +5,7 @@ */ #include

Re: [PATCH v2 1/2] spi: call WATCHDOG_RESET() in spi_nor_wait_till_ready_with_timeout()

2020-05-19 Thread Rasmus Villemoes
On 20/03/2020 11.14, Rasmus Villemoes wrote: > I have a board for which doing "sf erase 0x10 0x8" > consistently causes the external watchdog circuit to reset the > board. Make sure to pet the watchdog during slow operations such as > erasing or writing large ar

Re: [PATCH] env: Add option to only ever append environment

2020-06-01 Thread Rasmus Villemoes
On 29/05/2020 19.54, Marek Vasut wrote: > +config ENV_APPEND > + bool "Always append the environment with new data" > + default n > + help > + If defined, the environment hash table is only ever appended with new > + data, but the existing hash table can never be dropped and

Re: [PATCH v2 06/10] rtc: add rtc command

2020-06-02 Thread Rasmus Villemoes
On 31/05/2020 16.07, Simon Glass wrote: > Hi Rasmus, > > On Tue, 19 May 2020 at 16:01, Rasmus Villemoes > wrote: >> >> +static int do_rtc_read(struct udevice *dev, int argc, char * const argv[]) >> +{ >> + u8 buf[MAX_RTC_BYTES]; >> +

Re: [PATCH v2 10/10] test: dm: rtc: add tests of rtc shell command

2020-06-02 Thread Rasmus Villemoes
On 31/05/2020 16.07, Simon Glass wrote: > On Tue, 19 May 2020 at 16:01, Rasmus Villemoes > wrote: >> >> Signed-off-by: Rasmus Villemoes >> --- >> test/dm/rtc.c | 61 +++ >> 1 file changed, 61 insertions

Re: [PATCH] env: Add option to only ever append environment

2020-06-02 Thread Rasmus Villemoes
On 02/06/2020 13.04, Marek Vasut wrote: > On 6/2/20 8:42 AM, Rasmus Villemoes wrote: >> On 29/05/2020 19.54, Marek Vasut wrote: >>> +config ENV_APPEND >>> + bool "Always append the environment with new data" >>> + default n >>> + help &

Re: [PATCH 0/3] watchdog: honour hw_margin_ms property

2020-06-02 Thread Rasmus Villemoes
On 16/03/2020 16.52, Rasmus Villemoes wrote: > On 14/03/2020 13.04, Stefan Roese wrote: >> On 13.03.20 17:04, Rasmus Villemoes wrote: > >>> That at least solves half my problems and >>> might be useful to others as well. Then I'll have to figure out the >>

Re: [PATCH v2 06/10] rtc: add rtc command

2020-06-02 Thread Rasmus Villemoes
On 02/06/2020 15.22, Simon Glass wrote: > Hi Rasmus, > > On Tue, 2 Jun 2020 at 03:13, Rasmus Villemoes > wrote: >> >> On 31/05/2020 16.07, Simon Glass wrote: >>> Hi Rasmus, >>> >>> On Tue, 19 May 2020 at 16:01, Rasmus Villemoes >>> wro

Re: [PATCH 0/3] watchdog: honour hw_margin_ms property

2020-06-02 Thread Rasmus Villemoes
On 02/06/2020 16.53, Stefan Roese wrote: > On 02.06.20 15:29, Rasmus Villemoes wrote: >> On 16/03/2020 16.52, Rasmus Villemoes wrote: >>> On 14/03/2020 13.04, Stefan Roese wrote: >>>> On 13.03.20 17:04, Rasmus Villemoes wrote: >>> >>>>> Th

Re: [PATCH v2 00/10] new rtc methods, rtc command, and tests

2020-06-02 Thread Rasmus Villemoes
On 20/05/2020 00.01, Rasmus Villemoes wrote: > I need access to registers other than just the timekeeping ones of the > pcf2127, so I wanted to implement ->read8 and ->write8. But for > testing these it appeared there was no convenient way to invoke those > from the shell,

[PATCH v3 00/10] new rtc methods, rtc command, and tests

2020-06-02 Thread Rasmus Villemoes
Simon. - The rtc command's interface has been simplified a bit (no separate read/readm; the number of arguments determines whether the user wants the result on the console or to a memory address) - Add tests, both of rtc_{read,write}() and of the shell command, fixing a few things I stum

[PATCH v3 01/10] rtc: add dm_rtc_read helper and ->read method

2020-06-02 Thread Rasmus Villemoes
ned-off-by: Rasmus Villemoes --- drivers/rtc/rtc-uclass.c | 18 ++ include/rtc.h| 23 +++ 2 files changed, 41 insertions(+) diff --git a/drivers/rtc/rtc-uclass.c b/drivers/rtc/rtc-uclass.c index 926cca234e..92cc8c5664 100644 --- a/drivers/rtc/

[PATCH v3 03/10] rtc: fall back to ->{read, write} if ->{read, write}8 are not provided

2020-06-02 Thread Rasmus Villemoes
r that provides ->read() would most likely just duplicate the logic here for implementing a ->read8() method in term of its ->read() method. The same remarks of course apply to the write case. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- drivers/rtc/rt

[PATCH v3 08/10] rtc: i2c_rtc_emul: catch any write to the "reset" register

2020-06-02 Thread Rasmus Villemoes
It's more natural that any write that happens to touch the reset register should cause a reset, rather than just a write that starts at that offset. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- drivers/rtc/i2c_rtc_emul.c | 3 ++- 1 file changed, 2 insertions(+), 1 del

[PATCH v3 06/10] rtc: add rtc command

2020-06-02 Thread Rasmus Villemoes
Mostly as an aid for debugging RTC drivers, provide a command that can be used to read/write arbitrary registers (assuming the driver provides the read/write methods or their single-register-at-a-time variants). Signed-off-by: Rasmus Villemoes --- cmd/Kconfig | 6 ++ cmd/Makefile | 1

[PATCH v3 02/10] rtc: add dm_rtc_write() helper

2020-06-02 Thread Rasmus Villemoes
Similar to dm_rtc_read(), introduce a helper that allows the caller to write multiple consecutive 8-bit registers with one call. If the driver provides the ->write method, use that, otherwise loop using ->write8. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- drivers/r

[PATCH v3 05/10] rtc: pcf2127: provide ->write method

2020-06-02 Thread Rasmus Villemoes
Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- drivers/rtc/pcf2127.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/rtc/pcf2127.c b/drivers/rtc/pcf2127.c index eea72ad522..88ff8c52c3 100644 --- a/drivers/rtc/pcf2127.c +++ b/drivers/rtc/pcf2127.c @@ -43,6 +43,12

[PATCH v3 07/10] rtc: sandbox-rtc: fix set method

2020-06-02 Thread Rasmus Villemoes
ead(), so the 31 we just wrote to mday gets overwritten by a 1. Fix it by writing all registers at once, and for consistency, update the get method to retrieve them all with one "i2c transfer". Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- drivers/rtc

[PATCH v3 04/10] rtc: pcf2127: provide ->read method

2020-06-02 Thread Rasmus Villemoes
This simply consists of renaming the existing pcf2127_read_reg() helper to follow the naming of the other methods (i.e. pcf2127_rtc_) and changing the type of its "len" parameter. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- drivers/rtc/pcf2127.c | 6 +++--- 1 file

[PATCH v3 09/10] test: dm: rtc: add test of dm_rtc_read, dm_rtc_write

2020-06-02 Thread Rasmus Villemoes
Define a few aux registers and check that they can be read/written individually. Also check that one can access the time-keeping registers directly and get the expected results. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- arch/sandbox/include/asm/rtc.h | 5 test/dm/rtc.c

[PATCH v3 10/10] test: dm: rtc: add tests of rtc shell command

2020-06-02 Thread Rasmus Villemoes
Add tests of the "list", "read" and "write" subcommands of the rtc shell command. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- test/dm/rtc.c | 58 +++ 1 file changed, 58 insertions(+) diff --git a

Re: [PATCH v2 00/10] new rtc methods, rtc command, and tests

2020-06-02 Thread Rasmus Villemoes
On 02/06/2020 21.29, Simon Glass wrote: > Hi Rasmus, > > On Tue, 2 Jun 2020 at 12:40, Rasmus Villemoes > wrote: >> >> Urgh. The name rtc_read() is already used for a local helper by a number >> of rtc drivers (also rtc_write, for somewhat fewer drivers). So I can &g

Re: [PATCH 0/3] watchdog: honour hw_margin_ms property

2020-06-04 Thread Rasmus Villemoes
On 02/06/2020 17.38, Rasmus Villemoes wrote: > On 02/06/2020 16.53, Stefan Roese wrote: >> On 02.06.20 15:29, Rasmus Villemoes wrote: >>> On 16/03/2020 16.52, Rasmus Villemoes wrote: >>>> On 14/03/2020 13.04, Stefan Roese wrote: >>>>> On 13.03.20 17:04

[PATCH] powerpc: reduce number of WATCHDOG_RESET calls from flush_cache

2020-06-04 Thread Rasmus Villemoes
ng done, the hashing is also bounded by memory speed - so if 64K works for those cases, it should certainly also work when memory access is the only thing being done. Signed-off-by: Rasmus Villemoes --- arch/powerpc/lib/cache.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff

[RFC PATCH] allow choosing -Os/-O2 separately for SPL and TPL

2020-06-05 Thread Rasmus Villemoes
ned-off-by: Rasmus Villemoes --- Kconfig | 20 Makefile | 6 -- config.mk | 6 ++ 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/Kconfig b/Kconfig index f698e0a94f..0468bd0089 100644 --- a/Kconfig +++ b/Kconfig @@ -66,6 +66,26 @@ config CC_OPTIMIZ

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

2021-08-31 Thread Rasmus Villemoes
On 31/08/2021 10.17, Stefan Roese wrote: > Hi Rasmus, > > I've pulled this patchset now into next [1] and have run it through > CI via Azure. Here an error occurs: > > https://dev.azure.com/sr0718/u-boot/_build/results?buildId=109&view=logs&j=50449d1b-398e-53ae-48fa-6bf338edeb51&t=97605dd2-f5a5-5

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

2021-09-16 Thread Rasmus Villemoes
ethernet found. With this, ethernet (at least ping and tftp) works as expected from the U-Boot shell. Cc: Fabio Estevam Cc: Joris Offouga Cc: "Christian Bräuner Sørensen" Signed-off-by: Rasmus Villemoes --- arch/arm/dts/imx7d-sdb.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deleti

Re: [PATCH 00/16] tools: Add support for signing devicetree blobs

2021-11-26 Thread Rasmus Villemoes
On 12/11/2021 20.28, Simon Glass wrote: > At present mkimage supports signing FITs, the standard U-Boot image type. > > Various people are opposed to using FIT since: > > a) it requires adding support for FIT into other bootloaders, notably >UEFI > b) it requires packaging a kernel in this st

Re: ignore more files in Git?

2021-11-30 Thread Rasmus Villemoes
On 30/11/2021 17.02, Tom Rini wrote: > On Tue, Nov 30, 2021 at 05:39:36PM +0200, Andy Shevchenko wrote: >>> These files are products of `make O=...`. There are no issues when I >>> build inside the tree (dunno why). But I definitely won't build in the >>> source tree folder. >> >> I realized that

Re: [RFC PATCH v3 8/8] tools: gen_pre_load_header.sh: initial import

2021-12-06 Thread Rasmus Villemoes
On 17/11/2021 18.52, Philippe Reynes wrote: > This commit adds a script gen_pre_load_header.sh > that generate the header used by the image pre-load > stage. > > Signed-off-by: Philippe Reynes > --- > tools/gen_pre_load_header.sh | 174 +++ > 1 file changed, 174 i

Re: [RFC PATCH v3 8/8] tools: gen_pre_load_header.sh: initial import

2021-12-09 Thread Rasmus Villemoes
On 10/12/2021 01.14, Simon Glass wrote: > Hi, > > On Wed, 8 Dec 2021 at 11:10, Philippe REYNES > wrote: >> >> >> Everybody agrees with this proposal ? > > So long as this is not a shell script and is done with a binman entry, yes. No, no and please no. Binman really isn't as wonderful and magi

Re: how to see cpp(C preprocessor) output for a file?

2021-12-14 Thread Rasmus Villemoes
On 14/12/2021 09.23, c...@etri.re.kr wrote: > Hello, > > Is there any way I can see the cpp output of a file (for example > arch/arm/lib/vsprintf.c) after the build? (in the Makefile option for > example) make foo/bar/baz.i for any foo/bar/baz.c file which normally produces foo/bar/baz.o. If yo

Re: how to see cpp(C preprocessor) output for a file?

2021-12-14 Thread Rasmus Villemoes
On 14/12/2021 16.10, Chan Kim wrote: > But when I do > make CROSS_COMPILE=aarch64-none-elf- lib/tiny-printf.1 > make: *** No rule to make target 'lib/tiny-printf.1'. Stop. letter i , not digit 1 Rasmus

[PATCH] scripts/Makefile.lib: do not include CONFIG_DEVICE_TREE_INCLUDES in dtsi_include_list

2024-09-03 Thread Rasmus Villemoes
just add the items directly to the $(foreach) loop. Fixes: a958988b62 ("scripts/Makefile.lib: Add dtsi include files as deps for building DTB") Signed-off-by: Rasmus Villemoes --- Aside: The later change $(obj) -> $(u_boot_dtsi_loc) (commit df6fb77c98aa) makes no difference wrt. this

[PATCH] treewide: drop redundant "type string" for SYS_SOC and friends

2024-09-04 Thread Rasmus Villemoes
t found. This does not change boards which add a prompt string, e.g. string "Board name" because I think those change the semantics of the symbol into being user-settable. Signed-off-by: Rasmus Villemoes --- arch/arm/mach-octeontx/Kconfig| 1 - arch/arm/mach-octeontx2/Kc

Re: [PATCH] treewide: drop redundant "type string" for SYS_SOC and friends

2024-09-04 Thread Rasmus Villemoes
Rasmus Villemoes writes: So the moment I sent this I noticed that my $subject is a bit odd, in that there's no "type string" anywhere, with or without the quotes. A better $subject would have been treewide: drop redundant type annotations for SYS_SOC and friends Rasmus

Re: [PATCH v6] mmc: Poll CD in case cyclic framework is enabled

2024-09-09 Thread Rasmus Villemoes
Marek Vasut writes: > In case the cyclic framework is enabled, poll the card detect of already > initialized cards and deinitialize them in case they are removed. Since > the card initialization is a longer process and card initialization is > done on first access to an uninitialized card anyway,

Re: [PATCH v6] mmc: Poll CD in case cyclic framework is enabled

2024-09-10 Thread Rasmus Villemoes
Tom Rini writes: > On Mon, Sep 09, 2024 at 10:46:21AM +0200, Rasmus Villemoes wrote: >> >> >> Again, just do cyclic_unregister() unconditionally. > > The challenge here is that Simon asked for all of this as part of > feedback for v3. What are your thoughts her

Re: [PATCH] scripts/Makefile.lib: do not include CONFIG_DEVICE_TREE_INCLUDES in dtsi_include_list

2024-09-10 Thread Rasmus Villemoes
Rasmus Villemoes writes: > The commit mentioned in Fixes broke the > CONFIG_DEVICE_TREE_INCLUDES feature, with the result that any board > setting any non-empty value for that fails to build. > FWIW, it's quite easy to reproduce, though I don't know if it makes

[PATCH] dfu: define a callback function for the dfu_alt_info environment variable

2024-09-11 Thread Rasmus Villemoes
he dfu_alt_info variable so that we only do set dfu_reinit_needed if the commands actually did modify that variable. Signed-off-by: Rasmus Villemoes --- drivers/dfu/dfu.c | 16 drivers/dfu/dfu_mmc.c | 3 ++- include/dfu.h | 1 + include/env_callback.h | 7 +++ 4 fi

[PATCH 0/3] env: mmc: fix use of two separate partitions with proper type GUID

2024-09-12 Thread Rasmus Villemoes
not changing anything for existing setups that use the two-copies-one-partition scheme, other than complaining loudly if the system is misconfigured and avoiding such random corruption of neighbouring partitions. Rasmus Villemoes (3): env: mmc: refactor mmc_offset_try_partition() env: mmc: do not re

[PATCH 1/3] env: mmc: refactor mmc_offset_try_partition()

2024-09-12 Thread Rasmus Villemoes
mp; !str) for () and put those for loops in separate functions. No functional change intended, but I did change the direct access of info.type_guid into using the disk_partition_type_guid() helper, so that I could avoid the #ifdef and use IS_ENABLED() in the if() statement. Signed-off-by: Rasmus V

[PATCH 2/3] env: mmc: do not return an offset before the start of the partition

2024-09-12 Thread Rasmus Villemoes
wo copies from the end of the partition" logic to at least produce something within that partition. That will also catch a bug where the partition is too small for even one copy of the environment. Signed-off-by: Rasmus Villemoes --- env/mmc.c | 10 +- 1 file changed, 9 insertions(+), 1

[PATCH 3/3] env: mmc: rework mmc_env_partition_by_guid() to work with two separate partitions

2024-09-12 Thread Rasmus Villemoes
, the behaviour is unchanged: We return that single partition, and *copy is left as-is, so the logic in the caller will either use the last (copy==0) or second-to-last (copy==1) ENV_SIZE bytes. Signed-off-by: Rasmus Villemoes --- env/mmc.c | 46 +- 1

[PATCH] watchdog: introduce separate SPL symbol for WDT_GPIO

2024-10-07 Thread Rasmus Villemoes
to WDT_GPIO such that boards that already have it enabled and all the SPL prerequisites satisfied will continue to have it in SPL. Signed-off-by: Rasmus Villemoes --- drivers/watchdog/Kconfig | 9 + drivers/watchdog/Makefile | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff

Re: [RFC PATCH v1] dts: imx8mp-u-boot.dtsi align flash.bin

2024-10-14 Thread Rasmus Villemoes
On man, okt 14 2024, Heiko Schocher wrote: > > Board boots fine from emmc, sd card. Booting blank board with > uuu works with posted RFC patch, as it seems to me code in > > spl_romapi_load_image_stream() > > waits for more bytes than flash.bin currently has... appending some > zero bytes at the

Re: [PATCH 02/13] cyclic: introduce u-boot/schedule.h

2024-10-09 Thread Rasmus Villemoes
Simon Glass writes: > On Thu, 3 Oct 2024 at 15:28, Rasmus Villemoes wrote: >> common/cyclic.c | 1 + >> include/cyclic.h | 12 +--- >> include/u-boot/schedule.h | 24 >> 3 files changed, 26 insertions(+), 11 d

Re: [PATCH 1/4] serial: fix circular rx buffer edge case

2024-10-09 Thread Rasmus Villemoes
Simon Glass writes: > On Thu, 3 Oct 2024 at 08:10, Rasmus Villemoes wrote: >> >> drivers/serial/serial-uclass.c | 10 ++ >> include/serial.h | 4 ++-- >> 2 files changed, 8 insertions(+), 6 deletions(-) > > Reviewed-by: Simon Glass

Re: [PATCH v8 05/27] sha1: Remove sha1 non-watchdog API

2024-10-04 Thread Rasmus Villemoes
Raymond Mao writes: > We don't need an API specially for non-watchdog since sha1_csum_wd > supports it by disabling CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG. > Set 0x1 as default chunk size for SHA1. > I have to say I believe this is a step in the wrong direction. Having everybody call a funct

Re: [PATCH] cmd/mem.c: fix undefined behavior in mem cmp

2024-09-30 Thread Rasmus Villemoes
Quentin Schulz writes: > Hi Rasmus, > > On 9/27/24 8:56 PM, Rasmus Villemoes wrote: >> Quentin Schulz writes: >> >>> From: Quentin Schulz >>> >>> My linter complains that "When using void pointers in calculations, the >>> behaviou

[PATCH] envtools: make them build again

2024-10-16 Thread Rasmus Villemoes
with that __ASSEMBLY__ hackery in place, everything builds fine. Fixes: 0f92fa45603 ("env: Remove and add needed includes") Signed-off-by: Rasmus Villemoes --- Resending because I failed to send to the list the first time around. Sorry for the noise. tools/env/fw_env.c | 3 ++- 1 file cha

Re: [PATCH 0/8] membuff: Add tests and update to support a flag for empty/full

2024-10-18 Thread Rasmus Villemoes
On tor, okt 17 2024, Simon Glass wrote: > > membuf: Support a flag for being full > No, that is the worst of all worlds, especially with it being a build-time flag. The right implementation is the one where the head and tail indices are free-running, where you get such a "flag" for free, becau

[PATCH 05/13] fs/cramfs: use schedule instead of cyclic_run as callback

2024-10-03 Thread Rasmus Villemoes
anged that .outcb to cyclic_run instead of schedule, which would otherwise match all the other WATCHDOG_RESET replacements done. As the HW_WATCHDOG case is not handled by cyclic_run, this seems to be an oversight. Signed-off-by: Rasmus Villemoes --- fs/cramfs/uncompress.c | 4 ++-- 1 file

[PATCH 06/13] test: dm: wdt: replace cyclic_run() by schedule()

2024-10-03 Thread Rasmus Villemoes
ned-off-by: Rasmus Villemoes --- test/dm/wdt.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/dm/wdt.c b/test/dm/wdt.c index 1df2da23c6c..4d751b7e8cf 100644 --- a/test/dm/wdt.c +++ b/test/dm/wdt.c @@ -3,7 +3,6 @@ * Copyright 2017 Google, Inc */ -#include

[PATCH 10/13] i2c: rzg2l: include u-boot/schedule.h

2024-10-03 Thread Rasmus Villemoes
This TU currently relies on getting a declaration of schedule() through some nested include. Include the proper header directly. Signed-off-by: Rasmus Villemoes --- drivers/i2c/rz_riic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/rz_riic.c b/drivers/i2c/rz_riic.c index

[PATCH 09/13] lib/sha*: include u-boot/schedule.h instead of cyclic.h

2024-10-03 Thread Rasmus Villemoes
These library routines obviously do not make use of the cyclic_register() etc. API, but do need to call schedule(). Include the proper header. Eventually, their ifdef logic should be updated to avoid talking about CONFIG_WATCHDOG. Signed-off-by: Rasmus Villemoes --- lib/sha1.c | 2 +- lib

[PATCH 07/13] cyclic: make cyclic_run static

2024-10-03 Thread Rasmus Villemoes
The only caller left is schedule(); everybody outside cyclic.c now calls or references schedule(). Signed-off-by: Rasmus Villemoes --- common/cyclic.c | 2 +- include/cyclic.h | 12 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/common/cyclic.c b/common/cyclic.c

[PATCH 08/13] watchdog.h: change include of cyclic.h to u-boot/schedule.h

2024-10-03 Thread Rasmus Villemoes
call schedule() should themselves include u-boot/schedule.h, but this is a step towards getting rid of unnecessary include statements in cyclic.h and global_data.h. Signed-off-by: Rasmus Villemoes --- include/watchdog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include

[PATCH 02/13] cyclic: introduce u-boot/schedule.h

2024-10-03 Thread Rasmus Villemoes
ut the new header in include/u-boot/ and hence make the include statements say . Signed-off-by: Rasmus Villemoes --- common/cyclic.c | 1 + include/cyclic.h | 12 +--- include/u-boot/schedule.h | 24 3 files changed, 26 insertions(+), 11 delet

[PATCH 01/13] doc: cyclic: remove reference to WATCHDOG_RESET

2024-10-03 Thread Rasmus Villemoes
which at least to me makes it more readable. Signed-off-by: Rasmus Villemoes --- doc/develop/cyclic.rst | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/develop/cyclic.rst b/doc/develop/cyclic.rst index 893c269099a..6f1da6f0d9b 100644 --- a/doc/develop/cyclic.r

[PATCH 00/13] disentangling cyclic API from schedule()

2024-10-03 Thread Rasmus Villemoes
RESET() invocation has) to u-boot/schedule.h, because again, most of those TUs are not really concerned with implementing init_func_watchdog_init or need to call it. But that is for later. CI seems happy: https://github.com/u-boot/u-boot/pull/673 Rasmus Villemoes (13): doc: cyclic: remove referen

<    4   5   6   7   8   9   10   >