Re: [PATCH] gpio: pca953x_gpio: support optional reset-gpios property

2024-04-10 Thread Rasmus Villemoes
On 10/04/2024 14.24, Quentin Schulz wrote: > Hi Rasmus, > >> @@ -321,6 +322,13 @@ static int pca953x_probe(struct udevice *dev) >>     driver_data = dev_get_driver_data(dev); >>   +    /* If a reset-gpios property is present, take the device out of >> reset. */ >> +    ret =

[PATCH] gpio: pca953x_gpio: support optional reset-gpios property

2024-04-10 Thread Rasmus Villemoes
The DT bindings for the pca953x family has an optional reset-gpios property. If present, ensure that the device is taken out of reset before attempting to read from it. Signed-off-by: Rasmus Villemoes --- drivers/gpio/pca953x_gpio.c | 8 1 file changed, 8 insertions(+) diff --git

Re: [PATCH v9 2/2] arm64: boot: Support Flat Image Tree

2024-01-09 Thread Rasmus Villemoes
On 14/12/2023 08.33, Masahiro Yamada wrote: > On Thu, Dec 14, 2023 at 3:12 PM Masahiro Yamada wrote: >> > One more question to confirm if I can use this > for my practical use-cases. > > Is U-Boot able to handle FIT (includes kernel + DTs) > and a separate initrd? > > # bootm : > > >

[PATCH v2 8/8] doc: drop references to non-existing CONFIG_MEM_SUPPORT_64BIT_DATA

2024-01-03 Thread Rasmus Villemoes
Such a config option does not exist. Rephrase, and avoid mentioning MEM_SUPPORT_64BIT_DATA, which is an implementation detail. Signed-off-by: Rasmus Villemoes --- doc/usage/cmd/cmp.rst | 2 +- doc/usage/cmd/cp.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/usage

[PATCH v2 6/8] cmd/mem.c: fix wrong use of ifdef, drop pointless SUPPORT_64BIT_DATA macro

2024-01-03 Thread Rasmus Villemoes
the proper "#if" instead. There's really no point defining another similarly-named macro with exactly the same value, so just use MEM_SUPPORT_64BIT_DATA throughout. Signed-off-by: Rasmus Villemoes --- cmd/mem.c | 38 ++ 1 file changed, 18 insertions(+), 2

[PATCH v2 7/8] README: drop mention of MEM_SUPPORT_64BIT_DATA

2024-01-03 Thread Rasmus Villemoes
s expected. It would probably be possible to make all such code explicitly use u64 and thus make it work on 32 bit targets, but until that is done, do not pretend that it's ok to override the automatic value of MEM_SUPPORT_64BIT_DATA. Signed-off-by: Rasmus Villemoes --- README | 3 --- 1 file

[PATCH v2 5/8] test: add test of "cp" shell command

2024-01-03 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- test/cmd/Makefile | 1 + test/cmd/mem_copy.c | 169 2 files changed, 170 insertions(+) create mode 100644 test/cmd/mem_copy.c diff --git a/test/cmd/Makefile b/test/cmd/Makefile index e296ba1192b..b26b5b1ea85

[PATCH v2 3/8] cmd/command.c: constify "arg" argument of cmd_get_data_size()

2024-01-03 Thread Rasmus Villemoes
This function obviously does not and must not modify "arg". Change the prototype to allow passing an argument of type "const char*" without requiring a cast. Signed-off-by: Rasmus Villemoes --- common/command.c | 2 +- include/command.h | 2 +- 2 files changed, 2 insert

[PATCH v2 2/8] doc/usage/cmd/cp.rst: document that overlapping regions are supported

2024-01-03 Thread Rasmus Villemoes
Now that the cp command is changed to use memmove() internally, update the documentation to explicitly state that overlapping regions are allowed. Signed-off-by: Rasmus Villemoes --- doc/usage/cmd/cp.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/usage/cmd/cp.rst

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

2024-01-03 Thread Rasmus Villemoes
), which is of course completely in the noise with all the string processing that a shell command does. Reviewed-by: Simon Glass 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..c696b92a274

[PATCH v2 4/8] cmd/command.c: relax length check in cmd_get_data_size()

2024-01-03 Thread Rasmus Villemoes
Just check that the length is at least 2. This allows passing strings like ".b", which can be convenient when constructing tests (i.e. parametrizing the suffix used). Signed-off-by: Rasmus Villemoes --- common/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH v2 0/8] cmd/mem.c fixups

2024-01-03 Thread Rasmus Villemoes
into patch 1. 3 and 4 are preparations for the test cases added in patch 5. 6 is an actual fix; 32 bit targets wrongly list .q in their help texts. 7 and 8 fix stale documentation. Rasmus Villemoes (8): cmd/mem.c: use memmove in do_mem_cp() doc/usage/cmd/cp.rst: document that overlapping

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 > >

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

2023-12-19 Thread Rasmus Villemoes
), 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..c696b92a274 100644 --- a/cmd/mem.c

Re: [PATCH v2 6/6] led: add TI LP5562 LED driver

2023-11-29 Thread Rasmus Villemoes
On 29/11/2023 16.23, Tom Rini wrote: > On Fri, Nov 17, 2023 at 12:38:11PM +0100, Rasmus Villemoes wrote: > >> --- >> doc/device-tree-bindings/leds/leds-lp5562.txt | 63 ++ >> drivers/led/Kconfig | 8 + >> drivers/led/Makefile

Re: [PATCH 1/2] global: Clean up arch/*/dts/Makefile

2023-11-19 Thread Rasmus Villemoes
On 19/11/2023 20.09, Simon Glass wrote: > On Fri, 17 Nov 2023 at 15:52, Tom Rini wrote: >> >> With commit 3609e1dc ("dts: automatically build necessary .dtb files") >> we now have logic that will ensure that all device trees needed in the >> binary are built automatically. Any device tree that

[PATCH v2 5/6] led: led_pwm: use led_bind_generic() helper

2023-11-17 Thread Rasmus Villemoes
Use the helper led_bind_generic() to reduce code duplication. Signed-off-by: Rasmus Villemoes --- drivers/led/led_pwm.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/led/led_pwm.c b/drivers/led/led_pwm.c index 7c8eae9337b..ae6de3087ab 100644

[PATCH v2 6/6] led: add TI LP5562 LED driver

2023-11-17 Thread Rasmus Villemoes
. As our boards only have the R,G,B outputs connected, I have not actually tested how the white channel behaves, but the R,G,B work exactly as expected. [1] https://lore.kernel.org/u-boot/1547150757-1561-1-git-send-email-douglas.zo...@climate.com/ Cc: Doug Zobel Signed-off-by: Rasmus Villemoes

[PATCH v2 2/6] led-uclass: do not create fallback label for top-level node

2023-11-17 Thread Rasmus Villemoes
to the LED driver explicitly via device_bind_driver_to_node(). This is similar to what e3aa76644c2a did for gpio_led, but that fix was then supplanted by 01074697801b. Fixes: 83c63f0d1185 ("led: Move OF "label" property parsing to core") Signed-off-by: Rasmus Villemoes --- drivers/led/l

[PATCH v2 4/6] led: led_gpio: use led_bind_generic() helper

2023-11-17 Thread Rasmus Villemoes
Use the helper led_bind_generic() to reduce code duplication. Signed-off-by: Rasmus Villemoes --- drivers/led/led_gpio.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c index fbed151b5d9..71421de628c 100644

[PATCH v2 3/6] led: introduce led_bind_generic()

2023-11-17 Thread Rasmus Villemoes
All existing drivers in drivers/led/ contain a .bind method that does exactly the same thing, with just the actual driver name differing. Create a helper so all those individual methods can be changed to one-liners. Reviewed-by: Marek Vasut Signed-off-by: Rasmus Villemoes --- drivers/led/led

[PATCH v2 1/6] led-uclass: honour ->label field populated by driver's own .bind

2023-11-17 Thread Rasmus Villemoes
If the driver's own .bind method has populated uc_plat->label, don't override that. This is necessary for an upcoming driver for ti,lp5562, where the DT binding unfortunately says to use "chan-name" and not "label". Reviewed-by: Christian Gmeiner Reviewed-by: Marek Vasut

[PATCH v2 0/6] some LED patches

2023-11-17 Thread Rasmus Villemoes
oug Zobel (1): led: add TI LP5562 LED driver Rasmus Villemoes (5): led-uclass: honour ->label field populated by driver's own .bind led-uclass: do not create fallback label for top-level node led: introduce led_bind_generic() led: led_gpio: use led_bind_generic() helper led: led_pw

Re: [PATCH 0/4] bootm: Handle compressed arm64 images with bootm

2023-11-07 Thread Rasmus Villemoes
On 05/11/2023 21.03, Simon Glass wrote: > This little series corrects a problem I noticed with arm64 images, > where the kernel is not recognised: The $subject is misleading, bootm works just fine with compressed arm64 images, with the type set to "kernel". > Type: Kernel Image

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

2023-11-06 Thread Rasmus Villemoes
On 07/11/2023 08.30, Rasmus Villemoes wrote: > I'll send a revert to Tom for the prematurely applied fixup. Oh, I see that's already done. Good. Rasmus

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

2023-11-06 Thread Rasmus Villemoes
On 07/11/2023 01.46, Sean Anderson wrote: > On 10/13/23 14:30, Rasmus Villemoes wrote: >> On 12/10/2023 04.17, Sean Anderson wrote: >> >>> I was hoping you would respond to my most-recent email regarding this >>> series. >>> In particular: >>> >

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

2023-11-06 Thread Rasmus Villemoes
On 04/11/2023 20.43, Simon Glass wrote: > Hi Rasmus, > Are you planning a new version of this series? No. AFAICT there's nothing to be done on my end. Rasmus

Re: [PATCH v1 2/2] imx: spl_imx_romapi: fix emmc fast boot mode case

2023-10-26 Thread Rasmus Villemoes
pagesize. Fix this by recording the actual bytes downloaded. > > Fixes: 4b4472438f5a ("imx: spl_imx_romapi: avoid tricky use of > spl_load_simple_fit() to get full FIT size") > Signed-off-by: Marcel Ziswiler > Thanks for reporting and fixing this, and sorry for the trouble. Acked-by: Rasmus Villemoes

Re: [REGRESSION] imx: spl_imx_romapi: boot loops

2023-10-25 Thread Rasmus Villemoes
On 25/10/2023 18.01, Marcel Ziswiler wrote: > Hi Rasmus > > On Tue, 2023-10-24 at 16:32 +0200, Rasmus Villemoes wrote: >> What am I missing? > > Good question. Some more debugging revealed that we are missing 464 bytes at > the beginning of the buffer. Why > woul

Re: [PATCH v3] cli: Consume invalid escape sequences early

2023-10-25 Thread Rasmus Villemoes
de-effect of swallowing the first following char. But I never found the time to dig into why or if it was even fixable. Tom has already applied this, but nevertheless Tested-by: Rasmus Villemoes Rasmus

Re: [REGRESSION] imx: spl_imx_romapi: boot loops

2023-10-24 Thread Rasmus Villemoes
"(pagesize > 1 ? 1024 : 1)" or something like that. I don't think it will work, but OTOH my analysis below doesn't find any other (fundamental) difference between the old and new code. > > On Tue, 2023-10-24 at 13:17 +0200, Rasmus Villemoes wrote: > >> >> and this

Re: [REGRESSION] imx: spl_imx_romapi: boot loops

2023-10-24 Thread Rasmus Villemoes
On 24/10/2023 12.03, Marcel Ziswiler wrote: > Hi Rasmus > > Thanks for your help. > > On Tue, 2023-10-24 at 11:18 +0200, Rasmus Villemoes wrote: > > > [snip] > >> Hm. Can you show the result of 'fdtdump u-boot.itb | head' > > ⬢[zim@toolbox

Re: [REGRESSION] imx: spl_imx_romapi: boot loops

2023-10-24 Thread Rasmus Villemoes
On 24/10/2023 09.39, Marcel Ziswiler wrote: > Hi > > On our weekly master upstream CI build we noticed Verdin iMX8M Plus boot > looping. > > Bisecting pointed to the following commit: > > commit 4b4472438f5a ("imx: spl_imx_romapi: avoid tricky use of > spl_load_simple_fit() to get full FIT

Re: [PATCH 6/6] led: add TI LP5562 LED driver

2023-10-23 Thread Rasmus Villemoes
On 23/10/2023 11.39, Marek Vasut wrote: > On 10/23/23 11:11, Rasmus Villemoes wrote: >> On 19/10/2023 15.58, Marek Vasut wrote: >>> On 10/19/23 11:58, Rasmus Villemoes wrote: >>>> From: Doug Zobel >>>> >>>> Driver for the TI LP5562 4 ch

Re: [PATCH 6/6] led: add TI LP5562 LED driver

2023-10-23 Thread Rasmus Villemoes
On 19/10/2023 15.58, Marek Vasut wrote: > On 10/19/23 11:58, Rasmus Villemoes wrote: >> From: Doug Zobel >> >> Driver for the TI LP5562 4 channel LED controller. Supports >> independent on/off control of all 4 channels. Supports LED_BLINK on 3 >> independent ch

Re: [PATCH 2/6] led-uclass: honour ->label field populated by driver's own .bind

2023-10-23 Thread Rasmus Villemoes
On 19/10/2023 15.54, Marek Vasut wrote: > On 10/19/23 11:58, Rasmus Villemoes wrote: >> If the driver's own .bind method has populated uc_plat->label, don't >> override that. This is necessary for an upcoming driver for ti,lp5562, >> where the DT binding unfortunatel

Re: [PATCH 1/6] led-uclass: do not create fallback label for top-level node

2023-10-23 Thread Rasmus Villemoes
On 19/10/2023 15.51, Marek Vasut wrote: > On 10/19/23 11:58, Rasmus Villemoes wrote: >> Many existing drivers, and led-uclass itself, rely on uc_plat->label >> being NULL for the device representing the top node, as opposed to the >> child nodes representing ind

Re: [PATCH v2] make: check if DTC variable is an absolute path

2023-10-20 Thread Rasmus Villemoes
On 19/10/2023 15.04, Richard Marko wrote: > If we try to build using external dtc using > >> make DTC=dtc > > we get a confusing error like > >> make[2]: *** No rule to make target 'arch/x86/dts/bayleybay.dtb', >> needed by 'dtbs'. Stop. > > Workaround is to use > >> make DTC=$( which dtc )

[PATCH 6/6] led: add TI LP5562 LED driver

2023-10-19 Thread Rasmus Villemoes
. As our boards only have the R,G,B outputs connected, I have not actually tested how the white channel behaves, but the R,G,B work exactly as expected. [1] https://lore.kernel.org/u-boot/1547150757-1561-1-git-send-email-douglas.zo...@climate.com/ Cc: Doug Zobel Signed-off-by: Rasmus Villemoes

[PATCH 5/6] led: led_pwm: use led_bind_generic() helper

2023-10-19 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/led/led_pwm.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/led/led_pwm.c b/drivers/led/led_pwm.c index 7c8eae9337..ae6de3087a 100644 --- a/drivers/led/led_pwm.c +++ b/drivers/led/led_pwm.c @@ -9,7 +9,6

[PATCH 4/6] led: led_gpio: use led_bind_generic() helper

2023-10-19 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/led/led_gpio.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c index fbed151b5d..71421de628 100644 --- a/drivers/led/led_gpio.c +++ b/drivers/led/led_gpio.c @@ -11,7

[PATCH 3/6] led: introduce led_bind_generic()

2023-10-19 Thread Rasmus Villemoes
All existing drivers in drivers/led/ contain a .bind method that does exactly the same thing, with just the actual driver name differing. Create a helper so all those individual methods can be changed to one-liners. Signed-off-by: Rasmus Villemoes --- drivers/led/led-uclass.c | 18

[PATCH 2/6] led-uclass: honour ->label field populated by driver's own .bind

2023-10-19 Thread Rasmus Villemoes
If the driver's own .bind method has populated uc_plat->label, don't override that. This is necessary for an upcoming driver for ti,lp5562, where the DT binding unfortunately says to use "chan-name" and not "label". Signed-off-by: Rasmus Villemoes --- drivers/led/led-uc

[PATCH 1/6] led-uclass: do not create fallback label for top-level node

2023-10-19 Thread Rasmus Villemoes
to what e3aa76644c2a did, but that then vanished with the next commit.] Fixes: 83c63f0d1185 ("led: Move OF "label" property parsing to core") Signed-off-by: Rasmus Villemoes --- drivers/led/led-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driv

[PATCH 0/6] some LED patches

2023-10-19 Thread Rasmus Villemoes
ith the linux driver), most of the logic is unchanged from Doug's original patch, so he is still listed as author. Doug Zobel (1): led: add TI LP5562 LED driver Rasmus Villemoes (5): led-uclass: do not create fallback label for top-level node led-uclass: honour ->label field populated by dr

Re: commit 83c63f0d118 (led: Move OF "label" property parsing to core)

2023-10-18 Thread Rasmus Villemoes
On 18/10/2023 09.43, Rasmus Villemoes wrote: > On 17/10/2023 17.33, Marek Vasut wrote: >> Which string ? The "bcm6753-led" is driver name , so that would have to >> be parametrized. > > Exactly. The only difference between the two examples (apart from the > sco

Re: commit 83c63f0d118 (led: Move OF "label" property parsing to core)

2023-10-18 Thread Rasmus Villemoes
On 17/10/2023 17.33, Marek Vasut wrote: > On 10/17/23 15:29, Rasmus Villemoes wrote: >> static int led_gpio_bind(struct udevice *parent) >> { ... >>     ret = device_bind_driver_to_node(parent, "gpio_led", >> ofnode_get_name(no

commit 83c63f0d118 (led: Move OF "label" property parsing to core)

2023-10-17 Thread Rasmus Villemoes
Hi, I'm trying to resurrect an old submission of a driver for ti,lp5562, so had occasion to dig into drivers/led/. And I think commit 83c63f0d118 is buggy or at least incomplete. Many of the drivers that were subsequently modified to not do that "label" parsing rely, in their .probe method, on

Re: [PATCH] kbuild: use which $(DTC) as a dependency

2023-10-17 Thread Rasmus Villemoes
On 17/10/2023 12.44, Richard Marko wrote: > If we try to build using external dtc using > >> make DTC=dtc > > we get a confusing error like > >> make[2]: *** No rule to make target 'arch/x86/dts/bayleybay.dtb', >> needed by 'dtbs'. Stop. > > Workaround is to use > >> make DTC=$( which dtc )

[PATCH v2 2/2] serial: introduce CONFIG_CONSOLE_FLUSH_ON_NEWLINE

2023-10-16 Thread Rasmus Villemoes
of cpp ifdef, we can remove the ifdef around the _serial_flush() definition - if neither CONSOLE_FLUSH_SUPPORT or CONSOLE_FLUSH_ON_NEWLINE are enabled, the compiler elides _serial_flush(), but it won't warn about it being unused. Signed-off-by: Rasmus Villemoes --- common/Kconfig | 10

[PATCH v2 0/2] serial: introduce CONFIG_CONSOLE_FLUSH_ON_NEWLINE

2023-10-16 Thread Rasmus Villemoes
has time to actually emit all the characters. That can be very confusing, because one doesn't then know exactly where the hang happens. Rasmus Villemoes (2): serial: serial-uclass.c: move definition of _serial_flush up a bit serial: introduce CONFIG_CONSOLE_FLUSH_ON_NEWLINE common/Kconfig

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

2023-10-16 Thread Rasmus Villemoes
Preparation for next patch. Reviewed-by: Simon Glass 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

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

2023-10-13 Thread Rasmus Villemoes
On 12/10/2023 04.17, Sean Anderson wrote: > I was hoping you would respond to my most-recent email regarding this > series. > In particular: > > | Why does mkimage have to do this? Can't you just use truncate or, in a > | binman context, align-size? In both cases, that just affects the size of

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

2023-10-11 Thread Rasmus Villemoes
On 11/10/2023 20.37, Tom Rini wrote: > On Thu, Sep 28, 2023 at 10:02:57AM +0200, Rasmus Villemoes wrote: > >> The man page correctly said that -B was ignored without -E, while the >> `mkimage -h` output suggested otherwise. Now that -B can actually be >> used by its

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.in &g

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

2023-10-03 Thread Rasmus Villemoes
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_genenv = \

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 &&

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

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 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: >

[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 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

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

2023-09-26 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

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 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 > have t

[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 Villemoes

[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

[PATCH 0/2] serial: introduce CONFIG_CONSOLE_FLUSH_ON_NEWLINE

2023-09-25 Thread Rasmus Villemoes
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 insertions

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 >> expect

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] 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. >> >

[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

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

2023-09-25 Thread Rasmus Villemoes
to .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 3/5] arm64: zynqmp: rename overlay sources to .dtso

2023-09-25 Thread Rasmus Villemoes
to .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 1/5] arm: dts: imx8mm-cl-iot-gate: rename overlay sources to .dtso

2023-09-25 Thread Rasmus Villemoes
to .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 2/5] iot2050: rename overlay sources to .dtso

2023-09-25 Thread Rasmus Villemoes
to .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 0/5] use .dtso for device tree overlay sources

2023-09-25 Thread Rasmus Villemoes
urn. 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): arm: dts:

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

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

2023-09-20 Thread Rasmus Villemoes
(). 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(+) diff --git a/doc

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 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

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

2023-09-19 Thread Rasmus Villemoes
sb loading 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 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
ternal 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. Signed-off-b

[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 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 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 1/4] mkimage: also honour -B even without external data

2023-09-19 Thread Rasmus Villemoes
pected 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 +++ b/tool

[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. Rasmus

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

2023-09-19 Thread Rasmus Villemoes
(). 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/mx8m/csf.sh b/doc

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

2023-09-19 Thread Rasmus Villemoes
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/dts/imx8mp-u

[PATCH 2/2] malloc_simple: add mem_malloc_init_simple()

2023-09-15 Thread Rasmus Villemoes
of mem_malloc_init() which will actually update the bookkeeping variables relevant to the actual and active malloc() implementation. Signed-off-by: Rasmus Villemoes --- common/dlmalloc.c | 2 +- common/malloc_simple.c | 7 +++ include/malloc.h | 7 +-- 3 files changed, 13

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

2023-09-15 Thread Rasmus Villemoes
a risk of some boards breaking. The solution for those boards will probably be to just drop CONFIG_SYS_SPL_MALLOC, since that hasn't actually done anything. Rasmus Villemoes (2): spl: make SYS_SPL_MALLOC depend on !(SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE) malloc_sim

[PATCH 1/2] spl: make SYS_SPL_MALLOC depend on !(SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE)

2023-09-15 Thread Rasmus Villemoes
x_evm_a53_defconfig am64x_evm_r5_defconfig am65x_evm_a53_defconfig am65x_hs_evm_a53_defconfig iot2050_defconfig j7200_evm_a72_defconfig j721e_evm_a72_defconfig j721s2_evm_a72_defconfig j721s2_evm_r5_defconfig verdin-am62_r5_defconfig Signed-off-by: Rasmus Villemoes --- common/spl/Kconfig

Re: USB: error messages on DWC3 gadget endpoint dequeue

2023-09-15 Thread Rasmus Villemoes
On 15/09/2023 15.05, João Paulo Silva Gonçalves wrote: > Hi Marek, > > I was testing fastboot image download over usb for imx8mp (from usb > recovery patch of verdin-imx8mp) and i am having error messages on > endpoint request dequeue function of DWC3 gadget controller. However, > download is

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

[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
should 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 --- arch/arm/ma

[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] imx8m: soc.c: demote some printfs to debug

2023-05-22 Thread Rasmus Villemoes
instances 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

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

2023-05-22 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] 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

  1   2   3   4   5   6   7   8   9   >