Re: [PATCH] gpio-uclass: fix off-by-one in gpio_request_list_by_name_nodev()

2023-04-19 Thread Rasmus Villemoes
On 20/04/2023 00.40, Simon Glass wrote: > On Wed, 19 Apr 2023 at 22:11, Rasmus Villemoes > wrote: >> >> By the time we jump to the err label, count represents the number of >> gpios we've succesfully requested. So by subtracting one, we fail to >> free the mo

[PATCH] imx8mp: binman: rename spl and u-boot nodes

2023-09-19 Thread Rasmus Villemoes
label and not actually the node name. Homogenize these cases and make imx8mp the same as the other imx8m* variants. The binman type is explicitly given and no longer derived from the node name, and the csf.sh script will work for all four SOCs. Signed-off-by: Rasmus Villemoes --- arch/arm/dt

[PATCH] mx8m: csf.sh: pad csf blob for u-boot.itb to CSF_SIZE minus IVT header

2023-09-19 Thread Rasmus Villemoes
_download_image(). Extend the logic in the csf.sh script so that the csf blob is padded to CONFIG_CSF_SIZE minus the size of the IVT header. Signed-off-by: Rasmus Villemoes --- doc/imx/habv4/csf_examples/mx8m/csf.sh | 8 1 file changed, 8 insertions(+) diff --git a/doc/imx/habv4/csf_examples/mx8

[PATCH 0/4] mkimage: also honour -B even without external data

2023-09-19 Thread Rasmus Villemoes
I was surprised to discover that mkimage effectively ignores -B when used by itself - the help text suggests otherwise, and it's a completely reasonable thing to have. Also, binman already translates a fit,align property into a -B argument, without requiring fit,external-offset to be set. R

[PATCH 1/4] mkimage: also honour -B even without external data

2023-09-19 Thread Rasmus Villemoes
unexpected for -B to be effectively ignored without -E. Signed-off-by: Rasmus Villemoes --- tools/fit_image.c | 40 1 file changed, 40 insertions(+) diff --git a/tools/fit_image.c b/tools/fit_image.c index 9fe69ea0d9..2f5b25098a 100644 --- a/tools/fit_image.c

[PATCH 2/4] binman: test: rename 275_fit_align.dts -> 275_fit_align_external.dts

2023-09-19 Thread Rasmus Villemoes
In preparation for adding a test case for fit,align without fit,external-offset present, rename the existing test case and corresponding file. Signed-off-by: Rasmus Villemoes --- tools/binman/ftest.py | 4 ++-- .../test/{275_fit_align.dts

[PATCH 4/4] binman: update documentation for fit,align property

2023-09-19 Thread Rasmus Villemoes
Eliminate the repetition "what alignment to use ... and provides the alignment to use", and indicate that fit,align can both be used by itself and together with fit,external-offset. Signed-off-by: Rasmus Villemoes --- tools/binman/entries.rst | 5 ++--- 1 file changed, 2 insert

[PATCH 3/4] tools: binman: add test case for fit, align without fit, external-offset

2023-09-19 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- tools/binman/ftest.py | 10 + tools/binman/test/311_fit_align.dts | 58 + 2 files changed, 68 insertions(+) create mode 100644 tools/binman/test/311_fit_align.dts diff --git a/tools/binman/ftest.py b/tools/binman

[PATCH resend 1/2] imx: spl_imx_romapi: avoid tricky use of spl_load_simple_fit() to get full FIT size

2023-09-19 Thread Rasmus Villemoes
y" external data, has been tacked on beyond the fdt structure), and always provide valid data from the ->read callback. This only affects the CONFIG_SPL_LOAD_FIT case - I don't have any hardware or experience with the CONFIG_SPL_LOAD_IMX_CONTAINER case, so I leave that alone for now

[PATCH resend 0/2] imx: spl_imx_romapi: simplify stream loading

2023-09-19 Thread Rasmus Villemoes
ading with IMX_HAB actually work. [1] https://lore.kernel.org/u-boot/20230523113651.292806-1-rasmus.villem...@prevas.dk/ Rasmus Villemoes (2): imx: spl_imx_romapi: avoid tricky use of spl_load_simple_fit() to get full FIT size imx: spl_imx_romapi.c: remove dead code arch/ar

[PATCH resend 2/2] imx: spl_imx_romapi.c: remove dead code

2023-09-19 Thread Rasmus Villemoes
These IS_ENABLED(CONFIG_SPL_LOAD_FIT) cases can no longer be reached, and thus get_fit_image_size() is also redundant. Signed-off-by: Rasmus Villemoes --- arch/arm/mach-imx/spl_imx_romapi.c | 25 ++--- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/arch/arm

Re: [PATCH] mx8m: csf.sh: pad csf blob for u-boot.itb to CSF_SIZE minus IVT header

2023-09-19 Thread Rasmus Villemoes
On 19/09/2023 20.27, Marek Vasut wrote: > On 9/19/23 12:00, Rasmus Villemoes wrote: >> When built with CONFIG_IMX_HAB, the full FIT image, including stuff >> tacked on beyond the end of the fdt structure, is expected to be (fdt >> size rounded up to 0x1000 boundary)+CONFI

[PATCH v2] mx8m: csf.sh: pad csf blob for u-boot.itb to CSF_SIZE minus IVT header

2023-09-20 Thread Rasmus Villemoes
_download_image(). Extend the logic in the csf.sh script so that the csf blob is padded to CONFIG_CSF_SIZE minus the size of the IVT header. Signed-off-by: Rasmus Villemoes --- v2: use dd instead of truncate. doc/imx/habv4/csf_examples/mx8m/csf.sh | 13 + 1 file changed, 13 insertions(+) d

Re: [PATCH 1/4] mkimage: also honour -B even without external data

2023-09-21 Thread Rasmus Villemoes
On 21/09/2023 03.02, Simon Glass wrote: > Hi Rasmus, > > On Tue, 19 Sept 2023 at 05:37, Rasmus Villemoes > wrote: >> >> In some cases, using the "external data" feature is impossible or >> undesirable, but one may still want (or need) the FIT image to have

[PATCH 0/5] use .dtso for device tree overlay sources

2023-09-25 Thread Rasmus Villemoes
This is not quite complete as there are some files under test/ that still need converting, but as they currently rely on being compiled to .dtb (in order to, in turn, be applicable for the .dtb -> .dtb.S -> .dtb.o rules), that's a bit more involved than simple renaming. Rasmus Villemoes (5

[PATCH 2/5] iot2050: rename overlay sources to .dtso

2023-09-25 Thread Rasmus Villemoes
.dtso, and the .dts->.dtbo rule is gone since v6.5 (commit 81d362732bac). So this is also a step towards staying closer to linux with respect to both Kbuild and device tree sources. Signed-off-by: Rasmus Villemoes --- ... => k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dts

[PATCH 1/5] arm: dts: imx8mm-cl-iot-gate: rename overlay sources to .dtso

2023-09-25 Thread Rasmus Villemoes
.dtso, and the .dts->.dtbo rule is gone since v6.5 (commit 81d362732bac). So this is also a step towards staying closer to linux with respect to both Kbuild and device tree sources. Signed-off-by: Rasmus Villemoes --- ...-cl-iot-gate-ied-adc0.dts => imx8mm-cl-iot-gate-ied-adc0.dtso} | 0

[PATCH 3/5] arm64: zynqmp: rename overlay sources to .dtso

2023-09-25 Thread Rasmus Villemoes
.dtso, and the .dts->.dtbo rule is gone since v6.5 (commit 81d362732bac). So this is also a step towards staying closer to linux with respect to both Kbuild and device tree sources. Signed-off-by: Rasmus Villemoes --- .../dts/{zynqmp-sck-kr-g-revA.dts => zynqmp-sck-kr-g-revA.dtso} | 0 .

[PATCH 4/5] sandbox: rename overlay sources to .dtso

2023-09-25 Thread Rasmus Villemoes
.dtso, and the .dts->.dtbo rule is gone since v6.5 (commit 81d362732bac). So this is also a step towards staying closer to linux with respect to both Kbuild and device tree sources. Signed-off-by: Rasmus Villemoes --- arch/sandbox/dts/{overlay0.dts => overlay0.dtso} | 0 arch/sandb

[PATCH 5/5] doc: use .dtso as extension for device tree overlay sources

2023-09-25 Thread Rasmus Villemoes
Moving towards using .dtso for overlay sources, update the documentation examples to follow that pattern. Signed-off-by: Rasmus Villemoes --- doc/develop/uefi/uefi.rst | 4 ++-- doc/usage/fdt_overlays.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/develop/uefi

Re: [PATCH] scripts/Makefile.lib: also consider $(CONFIG_SYS_BOARD)-u-boot.dtsi

2023-09-25 Thread Rasmus Villemoes
On 04/05/2023 14.35, Rasmus Villemoes wrote: > On 03/05/2023 16.54, Tom Rini wrote: >> The one last problem now is on stm32mp15_dhcor_basic which is a >> defconfig missing one from OF_LIST but including it in the its file, so >> the above is the patch we need. >> >

Re: [PATCH 1/4] mkimage: also honour -B even without external data

2023-09-25 Thread Rasmus Villemoes
On 22/09/2023 17.26, Simon Glass wrote: >>> Shouldn't this be fdt_open_into()? >> >> I honestly just copy-pasted fit_extract_data() and shaved it down to the >> part that does the "align the FDT part of the file". >> >> I don't really understand your question. Are you saying this doesn't >> work (

Re: [PATCH 0/2] make CONFIG_SPL_SYS_MALLOC_SIMPLE && CONFIG_SYS_SPL_MALLOC actually work

2023-09-25 Thread Rasmus Villemoes
On 21/09/2023 03.02, Simon Glass wrote: > Hi Rasmus, > > On Fri, 15 Sept 2023 at 11:51, Rasmus Villemoes > wrote: >> >> Currently, setting both CONFIG_SPL_SYS_MALLOC_SIMPLE and >> CONFIG_SYS_SPL_MALLOC (but not CONFIG_SPL_STACK_R) doesn't work as >> e

[PATCH 0/2] serial: introduce CONFIG_CONSOLE_FLUSH_ON_NEWLINE

2023-09-25 Thread Rasmus Villemoes
ary C programs. Rasmus Villemoes (2): serial: serial-uclass.c: move definition of _serial_flush up a bit serial: introduce CONFIG_CONSOLE_FLUSH_ON_NEWLINE common/Kconfig | 11 +++ drivers/serial/serial-uclass.c | 28 2 files changed, 27 inser

[PATCH 1/2] serial: serial-uclass.c: move definition of _serial_flush up a bit

2023-09-25 Thread Rasmus Villemoes
Preparation for next patch. Signed-off-by: Rasmus Villemoes --- drivers/serial/serial-uclass.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c index 067fae2614..2f75ff878c 100644 --- a

[PATCH 2/2] serial: introduce CONFIG_CONSOLE_FLUSH_ON_NEWLINE

2023-09-25 Thread Rasmus Villemoes
one doesn't then know exactly where the hang happens. Introduce a config knob allowing one to wait for the uart fifo to drain whenever a newline character is printed, roughly corresponding to the effect of setvbuf(..., _IOLBF, ...) in ordinary C programs. Signed-off-by: Rasmus Vill

Re: [PATCH 1/4] mkimage: also honour -B even without external data

2023-09-25 Thread Rasmus Villemoes
On 25/09/2023 15.10, Simon Glass wrote: > Hi Rasmus, > > On Mon, 25 Sept 2023 at 02:47, Rasmus Villemoes > wrote: >> Since patches 2,3,4 touch binman code, could you take all four? > > Yes, will do. I didn't pick them up in the most recent PR as I try to > h

Re: [PATCH] scripts/Makefile.lib: also consider $(CONFIG_SYS_BOARD)-u-boot.dtsi

2023-09-25 Thread Rasmus Villemoes
On 25/09/2023 20.19, Tom Rini wrote: > On Mon, Sep 25, 2023 at 10:27:43AM +0200, Rasmus Villemoes wrote: >> On 04/05/2023 14.35, Rasmus Villemoes wrote: >>> On 03/05/2023 16.54, Tom Rini wrote: >> >>>> The one last problem now is on stm32mp15_dhcor_basic which

Re: [PATCH 4/4] binman: update documentation for fit,align property

2023-09-25 Thread Rasmus Villemoes
On 25/09/2023 17.14, Jonas Karlman wrote: >> fit,align >> -Indicates what alignment to use for the FIT and its external data, >> -and provides the alignment to use. This is passed to mkimage via >> -the -B flag. >> +Indicates what alignment to use for the FIT a

Re: [PATCH 1/4] mkimage: also honour -B even without external data

2023-09-28 Thread Rasmus Villemoes
On 27/09/2023 21.02, Sean Anderson wrote: > On 9/19/23 07:37, Rasmus Villemoes wrote: >> In some cases, using the "external data" feature is impossible or >> undesirable, but one may still want (or need) the FIT image to have a >> certain alignment. Also, given

[PATCH 5/4] mkimage: update man page and -h output

2023-09-28 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- doc/mkimage.1 | 6 -- tools/mkimage.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/mkimage.1 b/doc/mkimage.1 index 76c7859bb0..1a4bc25936 100644 --- a/doc/mkimage.1 +++ b/doc/mkimage.1 @@ -281,8 +281,10 @@ properties. A \(oqdata

Re: [PATCH v2 1/6] Kbuild: Fix cleanup of generated sources in tools

2023-09-28 Thread Rasmus Villemoes
On 20/06/2023 00.41, Tobias Deiminger wrote: > quiet_cmd_wrap = WRAP$@ > -cmd_wrap = echo "\#include <../$(patsubst $(obj)/%,%,$@)>" >$@ > +cmd_wrap = echo "\#include <../$(patsubst $(obj)/generated/%,%,$@)>" >$@ > > -$(obj)/boot/%.c $(obj)/common/%.c $(obj)/env/%.c $(obj)/lib/%.c: > +$(obj

Re: [PATCH] scripts/Makefile.lib: also consider $(CONFIG_SYS_BOARD)-u-boot.dtsi

2023-10-02 Thread Rasmus Villemoes
On 29/09/2023 18.02, Tom Rini wrote: > On Fri, Sep 29, 2023 at 09:15:00AM -0600, Simon Glass wrote: >> Honestly at this point I've forgotten what this is all about. Fair enough, let me try to recap, though even a summary is a bit long. (1) I wanted to do what $subject says, and you seemed to be

Re: [PATCH] scripts/Makefile.lib: also consider $(CONFIG_SYS_BOARD)-u-boot.dtsi

2023-10-02 Thread Rasmus Villemoes
On 02/10/2023 20.56, Simon Glass wrote: > Hi Tom, > > On Mon, 2 Oct 2023 at 10:22, Tom Rini wrote: >> >>> I'm really not sure that replacing build rules with a board CONFIG is >>> a good idea. I suppose part of my confusion is why the Makefile is >>> considered a problem? >> >> Because it's dupl

Re: [PATCH v2 1/1] input: avoid NULL dereference

2023-10-02 Thread Rasmus Villemoes
On 03/10/2023 00.46, Tom Rini wrote: > On Tue, Oct 03, 2023 at 12:27:25AM +0200, Heinrich Schuchardt wrote: >> >> error = stdio_register(dev); >> -#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT) >> -/* check if this is the standard input device */ >> -if (!error && s

[PATCH] Makefile: make u-boot-initial-env target depend explicitly on scripts_basic

2023-10-03 Thread Rasmus Villemoes
ule itself must depend on the phony scripts_basic target. Signed-off-by: Rasmus Villemoes --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8af1fa9468..069c03696a 100644 --- a/Makefile +++ b/Makefile @@ -2447,7 +2447,7 @@ cmd_g

Re: [PATCH] Makefile: make u-boot-initial-env target depend explicitly on scripts_basic

2023-10-11 Thread Rasmus Villemoes
On 04/10/2023 04.10, Simon Glass wrote: > On Tue, 3 Oct 2023 at 04:02, Rasmus Villemoes > wrote: >> >> We're seeing sporadic errors like >> >> ENVCinclude/generated/env.txt >> HOSTCC scripts/basic/fixdep >> ENVPinclude/generated/env.

Re: Unable to implement board fdt-fixup for imx8m CPU

2023-04-25 Thread Rasmus Villemoes
On 25/04/2023 04.17, Hugo Villeneuve wrote: > I need to detect at runtime the SOM configuration from an EEPROM, and based > on that information adjust the ethernet PHY property inside the device tree. > > I have already done that with success, it works great and as a temporary > workaround I si

Re: [PATCH] scripts/Makefile.lib: also consider $(CONFIG_SYS_BOARD)-u-boot.dtsi

2023-04-25 Thread Rasmus Villemoes
On 25/04/2023 21.31, Tom Rini wrote: > On Fri, Mar 17, 2023 at 11:26:39AM +0100, Rasmus Villemoes wrote: > >> Now, the only way to be really sure is to build the world >> with/without this patch and check if any .dtb file changes, but I >> don't have the means t

Re: [PATCH] scripts/Makefile.lib: also consider $(CONFIG_SYS_BOARD)-u-boot.dtsi

2023-04-26 Thread Rasmus Villemoes
On 25/04/2023 22.09, Tom Rini wrote: > On Tue, Apr 25, 2023 at 10:02:01PM +0200, Rasmus Villemoes wrote: >> On 25/04/2023 21.31, Tom Rini wrote: >>> On Fri, Mar 17, 2023 at 11:26:39AM +0100, Rasmus Villemoes wrote: >>> >> >>>> Now, the only way to b

Re: [PATCH] dm: core: introduce uclass_get_device_by_of_path()

2023-04-29 Thread Rasmus Villemoes
On 28/04/2023 21.21, Simon Glass wrote: >> Looks fine but please add a test to ofnode.c > > Did you send a patch with a test? If so I missed it. No, sorry, haven't found the time yet. > Also please check my tweak to this (OF_REAL) Looks correct. Rasmus

Re: [PATCH] scripts/Makefile.lib: also consider $(CONFIG_SYS_BOARD)-u-boot.dtsi

2023-05-01 Thread Rasmus Villemoes
On 27/04/2023 19.31, Tom Rini wrote: >> >> Well, I'm not sure there's a use case for building all of the extra >> device trees. I think what I'll do right now is fire off a CI run (or a >> few, in the event of problems) where we just use the logic of >> 3609e1dc5f4d and see what falls down. > > So

Re: [PATCH] scripts/Makefile.lib: also consider $(CONFIG_SYS_BOARD)-u-boot.dtsi

2023-05-03 Thread Rasmus Villemoes
On 01/05/2023 18.32, Simon Glass wrote: > Hi Rasmus, > > On Mon, 1 May 2023 at 02:49, Rasmus Villemoes > wrote: >> >> On 27/04/2023 19.31, Tom Rini wrote: >>>> >>>> Well, I'm not sure there's a use case for building all of the extra >&

[PATCH] scripts/Makefile.dts: tweak logic for deciding which dtbs to build

2023-05-04 Thread Rasmus Villemoes
board, and should in turn enable us to massively simplify arch/*/dts/Makefile. Signed-off-by: Rasmus Villemoes --- Per https://lore.kernel.org/u-boot/20230503145438.GB1134230@bill-the-cat/ I guess one could apply make's built-in sort function since the RHS is very likely to contain

[PATCH 1/2] kbuild: add dtc as dependency on .dtb files

2023-05-04 Thread Rasmus Villemoes
[Linux commit b8fc5b2157b1] If dtc is rebuilt, we should rebuild .dtb files with the new dtc. [Import notes: Back then there was no .dtbo rule in Linux's Makefile.lib, but the current .dtbo rules in Linux also have the $(DTC) dependency, so also add it to our .dtbo rule.] Signed-off-by: R

[PATCH 2/2] kbuild: Allow DTB overlays to built from .dtso named source files

2023-05-04 Thread Rasmus Villemoes
t .dts named overlays can be renamed with time. After all have been renamed we can remove the other rule. [Import notes: Adapt to U-Boot by using the cmd_dtco function instead of cmd_dtc just like the current .dts -> .dtbo rule.] Signed-off-by: Rasmus Villemoes --- scripts/Makefile.lib | 3 +++ 1

Re: [PATCH] scripts/Makefile.lib: also consider $(CONFIG_SYS_BOARD)-u-boot.dtsi

2023-05-04 Thread Rasmus Villemoes
On 03/05/2023 16.54, Tom Rini wrote: > On Wed, May 03, 2023 at 09:51:58AM -0400, Tom Rini wrote: >> On Mon, May 01, 2023 at 10:49:22AM +0200, Rasmus Villemoes wrote: >>> On 27/04/2023 19.31, Tom Rini wrote: >>>>> >>>>> Well, I'm not

[PATCH] scripts/Makefile.lib: change spelling of $(srctree)/arch/$(ARCH)/dts in dtc_cpp_flags

2023-05-16 Thread Rasmus Villemoes
...@gmail.com/ Signed-off-by: Rasmus Villemoes --- scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 7b27224b5d..b67da75ba1 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -186,7 +186,7

Re: [PATCH 3/3] arm: dts: imx8mp: Sync with Linux 6.3

2023-05-21 Thread Rasmus Villemoes
On 20/05/2023 00.26, Adam Ford wrote: > On Fri, May 19, 2023 at 5:19 PM Tim Harvey wrote: >> >> On Wed, May 3, 2023 at 9:11 AM Tim Harvey wrote: >>> >> Fabio, >> >> Apparently I didn't do a very good job of testing this. This patch is >> causing imx8mp-venice-* and imx8mp-evk boards to no longer

[PATCH] imx8m: soc.c: demote some printfs to debug

2023-05-22 Thread Rasmus Villemoes
stances in soc.c. Signed-off-by: Rasmus Villemoes --- arch/arm/mach-imx/imx8m/soc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 5a4f8358c9..f5c82dff35 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arc

[PATCH 2/2] imx: spl_imx_romapi.c: remove dead code

2023-05-23 Thread Rasmus Villemoes
These IS_ENABLED(CONFIG_SPL_LOAD_FIT) cases can no longer be reached, and thus get_fit_image_size() is also redundant. Signed-off-by: Rasmus Villemoes --- arch/arm/mach-imx/spl_imx_romapi.c | 25 ++--- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/arch/arm

[PATCH 1/2] imx: spl_imx_romapi: avoid tricky use of spl_load_simple_fit() to get full FIT size

2023-05-23 Thread Rasmus Villemoes
ould not be necessary with this, since we only ever memcpy() valid image data. This only affects the CONFIG_SPL_LOAD_FIT case - I don't have any hardware or experience with the CONFIG_SPL_LOAD_IMX_CONTAINER case, so I leave that alone for now. Signed-off-by: Rasmus Villemoes --- a

[PATCH] powerpc, wdt: disable ratelimiting when disabling interrupts

2021-04-09 Thread Rasmus Villemoes
just disable it when we know that time no longer passes and have watchdog_reset() (e.g. called from decompression loop) unconditionally reset the watchdog timer. Signed-off-by: Rasmus Villemoes --- I previously sent a patch to change the ratelimiting to be based on get_ticks() instead of get_timer()

Re: [PATCH] powerpc, wdt: disable ratelimiting when disabling interrupts

2021-04-12 Thread Rasmus Villemoes
On 09/04/2021 16.37, Christophe Leroy wrote: > > > Le 09/04/2021 à 16:12, Rasmus Villemoes a écrit : >> The ratelimiting isn't really strictly needed (prior to DM WDT, no >> such thing existed), so just disable it when we know that time no >> longer passes and ha

[PATCH] watchdog: use time_after_eq() in watchdog_reset()

2021-04-13 Thread Rasmus Villemoes
ce tree to effectively disable the ratelimiting and actually ping the watchdog every time watchdog_reset() is called. For that to work, the "has enough time passed" check just needs to be tweaked a little to allow the now==next_reset case as well. Suggested-by: Christophe Leroy S

[PATCH v2 0/2] powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD

2021-04-13 Thread Rasmus Villemoes
/2020-June/414852.html Rasmus Villemoes (2): powerpc: lib: remove leftover CONFIG_5xx powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD arch/powerpc/Kconfig | 1 + arch/powerpc/lib/Kconfig | 9 + arch/powerpc/lib/cache.c | 16 3 files changed, 22 insert

[PATCH v2 1/2] powerpc: lib: remove leftover CONFIG_5xx

2021-04-13 Thread Rasmus Villemoes
CONFIG_5xx hasn't existed since commit 502589777416 (powerpc, 5xx: remove support for 5xx). Remove this last mention of it. Signed-off-by: Rasmus Villemoes --- arch/powerpc/lib/cache.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/lib/cache.c b/arch/powerpc/lib/cache.c

[PATCH v2 2/2] powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD

2021-04-13 Thread Rasmus Villemoes
/project/uboot/patch/20200605111657.28773-1-rasmus.villem...@prevas.dk/ [2] https://lists.denx.de/pipermail/u-boot/2021-April/446906.html [3] https://lists.denx.de/pipermail/u-boot/2021-April/447280.html Signed-off-by: Rasmus Villemoes --- arch/powerpc/Kconfig | 1 + arch/powerpc/lib/Kconfig |

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

2021-04-13 Thread Rasmus Villemoes
Check that a variable defined in /config/environment is found in the run-time environment, and that clearing fdt_env_path from within that node works. Signed-off-by: Rasmus Villemoes --- arch/sandbox/dts/test.dts | 7 +++ configs/sandbox64_defconfig | 1 + configs/sandbox_defconfig

[PATCH 0/2] allow environment to be updated from dtb

2021-04-13 Thread Rasmus Villemoes
perty. Patch 2 simply adds a small test case to the sandbox. Rasmus Villemoes (2): env: allow environment to be amended from control dtb sandbox: add test of CONFIG_ENV_IMPORT_FDT arch/sandbox/dts/test.dts | 7 +++ common/board_r.c| 2 ++ configs/sandbox64_defconfig

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

2021-04-13 Thread Rasmus Villemoes
including a fdt_env_path = ""; property in the DTB node. Signed-off-by: Rasmus Villemoes --- common/board_r.c | 2 ++ env/Kconfig | 18 ++ env/common.c | 23 +++ include/env.h | 15 +++ include/env_defa

[PATCH v4 0/2] allow opting out of WATCHDOG_RESET() from timer interrupt

2021-04-14 Thread Rasmus Villemoes
This is a resend of v3 from a year ago. Please consider applying. v4: rebase to current master. v3: add fixup patch for mpc83xx_timer, add documentation hunk to README, also update m68k instead of only ppc. v2: add documentation comment Rasmus Villemoes (2): timer: mpc83xx_timer: fix build

[PATCH v4 2/2] allow opting out of WATCHDOG_RESET() from timer interrupt

2021-04-14 Thread Rasmus Villemoes
CONFIG_SYS_WATCHDOG_FREQ. Signed-off-by: Rasmus Villemoes --- README| 9 + arch/m68k/lib/time.c | 2 +- arch/powerpc/lib/interrupts.c | 2 +- drivers/timer/mpc83xx_timer.c | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README b/README index

[PATCH v4 1/2] timer: mpc83xx_timer: fix build with CONFIG_{HW_, }WATCHDOG

2021-04-14 Thread Rasmus Villemoes
The code, which is likely copied from arch/powerpc/lib/interrupts.c, lacks a fallback definition of CONFIG_SYS_WATCHDOG_FREQ and refers to a non-existing timestamp variable - obviously priv->timestamp is meant. Signed-off-by: Rasmus Villemoes --- drivers/timer/mpc83xx_timer.c | 6 +- 1 f

[PATCH resend 1/2] env/sf.c: use a variable to hold the sector size

2021-04-14 Thread Rasmus Villemoes
As preparation for the next patch, use a local variable to represent the sector size. No functional change. Signed-off-by: Rasmus Villemoes --- env/sf.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/env/sf.c b/env/sf.c index 88ec1108b6..d9ed08a78e

[PATCH resend 0/2] add CONFIG_ENV_SECT_SIZE_AUTO

2021-04-14 Thread Rasmus Villemoes
course default n), there's no functional change, and the compiler even seems to generate identical binary code. The motivation is to cut about half a second off boottime on our newer revisions, while still having the same U-Boot binary work on both. Rasmus Villemoes (2): env/sf.c: use a var

[PATCH resend 2/2] env: add CONFIG_ENV_SECT_SIZE_AUTO

2021-04-14 Thread Rasmus Villemoes
aster boot time since our logic always causes the environment to be written during boot. Signed-off-by: Rasmus Villemoes --- env/Kconfig | 14 ++ env/sf.c| 10 -- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/env/Kconfig b/env/Kconfig index b473d7cfe1..844

Re: [PATCH v2 2/2] powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD

2021-04-14 Thread Rasmus Villemoes
On 15/04/2021 07.34, Stefan Roese wrote: > On 13.04.21 21:38, Rasmus Villemoes wrote: >> >> I have checked with objdump that the generated code doesn't change >> when this option is left at its default value of 0: gcc is smart >> enough to see that wd_limit is cons

Re: [PATCH] watchdog: use time_after_eq() in watchdog_reset()

2021-04-14 Thread Rasmus Villemoes
On 15/04/2021 07.38, Stefan Roese wrote: > On 13.04.21 16:43, Rasmus Villemoes wrote: >> Some boards don't work with the rate-limiting done in the generic >> watchdog_reset() provided by wdt-uclass. >> >> For example, on powerpc, get_timer() ceases working duri

Re: [PATCH] watchdog: use time_after_eq() in watchdog_reset()

2021-04-15 Thread Rasmus Villemoes
On 15/04/2021 09.13, Christophe Leroy wrote: > > > Le 15/04/2021 à 08:54, Rasmus Villemoes a écrit : >> On 15/04/2021 07.38, Stefan Roese wrote: >>> On 13.04.21 16:43, Rasmus Villemoes wrote: >>>> Some boards don't work with the rate-limiting done in the

Re: [PATCH v2] Makefile: fix generating environment file

2021-04-20 Thread Rasmus Villemoes
On 20/04/2021 16.43, Oleksandr Suvorov wrote: > If the CONFIG_USE_DEFAULT_ENV_FILE=y and CONFIG_DEFAULT_ENV_FILE > points to the empty environment file, the auto-generated file has > the wrong syntax so it leads to the compilation failure: > Glad someone is using CONFIG_USE_DEFAULT_ENV_FILE :) And

Re: [PATCH v2] Makefile: fix generating environment file

2021-04-20 Thread Rasmus Villemoes
On 20/04/2021 23.10, Oleksandr Suvorov wrote: > Hi Rasmus, > > Thanks for your feedback! > Yes, I noted that there were no possible situations with the trailing > code != 0x00, but simply removing the additional trailing 0x00 > gives us an empty array default_environment[] for the empty defaultenv

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

2021-04-21 Thread Rasmus Villemoes
On 21/04/2021 09.14, Simon Glass wrote: > Hi Rasmus, > > On Wed, 14 Apr 2021 at 10:43, Rasmus Villemoes > wrote: >> >> It can be useful to use the same U-Boot binary for multiple purposes, >> say the normal one, one for developers that allow breaking into the &g

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

2021-04-21 Thread Rasmus Villemoes
On 21/04/2021 10.02, Rasmus Villemoes wrote: > On 21/04/2021 09.14, Simon Glass wrote: >> Hi Rasmus, >> >> On Wed, 14 Apr 2021 at 10:43, Rasmus Villemoes >> wrote: >>> >>> It can be useful to use the same U-Boot binary for multiple purposes, >>

[PATCH v2 0/2] allow environment to be updated from dtb

2021-04-21 Thread Rasmus Villemoes
perty. Patch 2 simply adds a small test case to the sandbox. v2: Add Simon's R-b tags, use livetree/ofnode API. Rasmus Villemoes (2): env: allow environment to be amended from control dtb sandbox: add test of CONFIG_ENV_IMPORT_FDT arch/sandbox/dts/test.dts | 7 +++ common/board

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

2021-04-21 Thread Rasmus Villemoes
including a fdt_env_path = ""; property in the DTB node. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- common/board_r.c | 2 ++ env/Kconfig | 18 ++ env/common.c | 30 ++ include/env.h

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

2021-04-21 Thread Rasmus Villemoes
Check that a variable defined in /config/environment is found in the run-time environment, and that clearing fdt_env_path from within that node works. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- arch/sandbox/dts/test.dts | 7 +++ configs/sandbox64_defconfig | 1

[PATCH v3 0/2] powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD

2021-04-21 Thread Rasmus Villemoes
020-June/414852.html Rasmus Villemoes (2): powerpc: lib: remove leftover CONFIG_5xx powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD arch/powerpc/Kconfig | 1 + arch/powerpc/lib/Kconfig | 9 + arch/powerpc/lib/cache.c | 17 + 3 files changed, 23 insertions(

[PATCH v3 1/2] powerpc: lib: remove leftover CONFIG_5xx

2021-04-21 Thread Rasmus Villemoes
CONFIG_5xx hasn't existed since commit 502589777416 (powerpc, 5xx: remove support for 5xx). Remove this last mention of it. Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- arch/powerpc/lib/cache.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/lib/cach

[PATCH v3 2/2] powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD

2021-04-21 Thread Rasmus Villemoes
1657.28773-1-rasmus.villem...@prevas.dk/ [2] https://lists.denx.de/pipermail/u-boot/2021-April/446906.html [3] https://lists.denx.de/pipermail/u-boot/2021-April/447280.html Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- arch/powerpc/Kconfig | 1 + arch/powerpc/lib/Kconfig |

Re: [PATCH v2] Makefile: fix generating environment file

2021-04-21 Thread Rasmus Villemoes
On 21/04/2021 17.21, Oleksandr Suvorov wrote: > Hi Rasmus, > > On Wed, Apr 21, 2021 at 12:34 AM Rasmus Villemoes > wrote: >> >> On 20/04/2021 23.10, Oleksandr Suvorov wrote: >>> Hi Rasmus, >>> >>> Thanks for your feedback! >>> Yes, I no

[PATCH] Makefile: fix generation of defaultenv.h from empty initial file

2021-04-22 Thread Rasmus Villemoes
a series of key=val nul terminated strings, terminated by an empty string. Reported-by: Oleksandr Suvorov Signed-off-by: Rasmus Villemoes --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3fc9777b0b..b7af2b936d 100644 --- a/Makefile

Re: [PATCH v4 0/2] allow opting out of WATCHDOG_RESET() from timer interrupt

2021-04-26 Thread Rasmus Villemoes
On 14/04/2021 09.18, Rasmus Villemoes wrote: > This is a resend of v3 from a year ago. Please consider applying. > > v4: rebase to current master. > > v3: add fixup patch for mpc83xx_timer, add documentation hunk to > README, also update m68k instead of only ppc. > &g

Re: [PATCH 01/49] Add support for an owned buffer

2021-05-04 Thread Rasmus Villemoes
On 04/05/2021 01.10, Simon Glass wrote: > When passing a data buffer back from a function, it is not always clear > who owns the buffer, i.e. who is responsible for freeing the memory used. > An example of this is where multiple files are decompressed from the > firmware image, using a temporary bu

Re: [PATCH 02/49] compiler: Add a comment to host_build()

2021-05-04 Thread Rasmus Villemoes
On 04/05/2021 01.10, Simon Glass wrote: > This function should have a comment explaining what it does. Add one. > > Signed-off-by: Simon Glass > --- > > (no changes since v1) > > include/compiler.h | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/include/compiler.h b/include/comp

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

2021-05-04 Thread Rasmus Villemoes
On 04/05/2021 01.10, Simon Glass wrote: > Rather than adding an #ifdef and open-coding this calculation, add a > helper function to handle it. Use this in the image code. > > Signed-off-by: Simon Glass > --- > > (no changes since v1) > > common/image.c | 33 +++-

Re: [PATCH 16/49] kconfig: Add host support to CONFIG_IS_ENABLED()

2021-05-04 Thread Rasmus Villemoes
; It would be more convenient if we could use, for example, > CONFIG_IS_ENABLED(FIT) and get CONFIG_HOST_FIT, when building for the > host. Add support for this. > Suggested-by: Rasmus Villemoes # b4f73886 > Signed-off-by: Simon Glass > --- > > (no changes since

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

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

[PATCH 2/2] sandbox: add test of wdt_gpio driver

2021-05-10 Thread Rasmus Villemoes
class+index. Signed-off-by: Rasmus Villemoes --- arch/sandbox/dts/test.dts | 5 + configs/sandbox64_defconfig | 1 + configs/sandbox_defconfig | 1 + test/dm/wdt.c | 32 +++- 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/arch/sa

[PATCH 1/2] watchdog: add gpio watchdog driver

2021-05-10 Thread Rasmus Villemoes
Hkg4qry+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. Signed-off-by: Rasmus Villem

Re: [PATCH 1/2] Revert "lib: string: Fix strlcpy return value", fix callers

2023-08-07 Thread Rasmus Villemoes
On 14/07/2023 13.24, Matthias Schiffer wrote: > Both the Linux kernel and libbsd agree that strlcpy() should always > return strlen(src) and not include the NUL termination. The incorrect > U-Boot implementation makes it impossible to check the return value for > truncation, and breaks code written

[PATCH] cmd/mem.c: use memmove in do_mem_cp()

2023-12-19 Thread Rasmus Villemoes
riate direction to do the copy), which is of course completely in the noise with all the string processing that a shell command does. Signed-off-by: Rasmus Villemoes --- cmd/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/mem.c b/cmd/mem.c index 66c2d36a148..c696

Re: [PATCH v2 1/1] Makefile: pass -ansi option to cmd_gen_envp

2023-12-20 Thread Rasmus Villemoes
On 20/12/2023 09.59, Sébastien Szymanski wrote: > Without the '-ansi' option, the 'linux' string in env. files is replaced > with the string '1 '. For example, in the > board/armadeus/opos6uldev/opos6uldev.env file, > > kernelimg=opos6ul-linux.bin > > becomes > > kernelimg=opos6ul-1 .bin > > in

Re: Shutting down of the git-daemon (git protocol, https and ssh still remain)

2024-06-12 Thread Rasmus Villemoes
On 12/06/2024 12.20, Claudius Heine wrote: > Hi everyone, > > in the past we used cgit, which provided cloning the u-boot repo via > http, https, ssh and the git protocol. > > When we migrated to gitlab, which doesn't support the git protocol, we > implemented some additional service files to con

Re: Shutting down of the git-daemon (git protocol, https and ssh still remain)

2024-06-13 Thread Rasmus Villemoes
On 13/06/2024 09.32, Claudius Heine wrote: >> I'm just wondering if it's possible to have the server send some message >> to the client when the git protocol is used, for some deprecation period >> (6 months?), so a developer doing "git remote update" will get notified. >> He would then also have

Re: [PATCH 12/20] cyclic: Rise default CYCLIC_MAX_CPU_TIME_US to 5000

2024-06-19 Thread Rasmus Villemoes
On 18/06/2024 23.03, Tim Harvey wrote: > On Tue, Jun 18, 2024 at 7:32 AM Tom Rini wrote: >> > Stefan and Tom, > > I'm seeing CI issues here even with 5000us [1]: > host bind 0 /tmp/sandbox/persistent-cyclic function wdt-gpio-level > took too long: 5368us vs 5000us max Yes, 5ms is way too little

Re: [PATCH 1/2] led: Implement software led blinking

2024-07-03 Thread Rasmus Villemoes
Mikhail Kshevetskiy writes: > + > +static int led_sw_set_period(struct udevice *dev, int period_ms) > +{ > + struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev); > + struct cyclic_info *cyclic = uc_plat->cyclic; > + struct led_ops *ops = led_get_ops(dev); > + char cyclic_name[6

[PATCH 2/5] kbuild: Allow DTB overlays to built into .dtbo.S files

2024-07-06 Thread Rasmus Villemoes
extensions. We change the start and end delimiting tag prefix to make it clear that this data came from overlay files. Signed-off-by: Rasmus Villemoes --- scripts/Makefile.lib | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts

[PATCH 1/5] arm64: dts: imx8mp: rename DHCOM SoM overlays to .dtso

2024-07-06 Thread Rasmus Villemoes
.dtso, and the .dts->.dtbo rule is gone since v6.5 (commit 81d362732bac). So this is also a step towards staying closer to linux with respect to both Kbuild and device tree sources. Cc: Marek Vasut Signed-off-by: Rasmus Villemoes --- ...rlay-eth2xfast.dts => imx8mp-dhcom-pdk-o

[PATCH 0/5] finish using .dtso for overlay source files

2024-07-06 Thread Rasmus Villemoes
know how to handle at the time. This should finish the job, bring us in sync with linux (at least in this respect), and drop the .dts -> .dtbo build rule. Patch 3 depends on 2, and patch 5 depends on the rest. Rasmus Villemoes (5): arm64: dts: imx8mp: rename DHCOM SoM overlays to .dtso kbu

<    1   2   3   4   5   6   7   8   9   10   >