[PATCH 3/5] test: overlay: rename overlay source files to .dtso

2024-07-06 Thread Rasmus Villemoes
o this is also a step towards staying closer to linux with respect to both Kbuild and device tree sources. Cc: Maxime Ripard Cc: Simon Glass Signed-off-by: Rasmus Villemoes --- test/overlay/Makefile | 4 ++-- test/overlay/cmd_ut_

[PATCH 5/5] kbuild: Disallow DTB overlays to built from .dts named source files

2024-07-06 Thread Rasmus Villemoes
-off-by: Rasmus Villemoes --- scripts/Makefile.lib | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 549c3619472..d6fbf9a7659 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -416,9 +416,6 @@ cmd_dtco = mkdir -p $(dir ${dtc-tmp

[PATCH 4/5] test/py: efi_capsule: rename device tree overlay source to .dtso

2024-07-06 Thread Rasmus Villemoes
rds staying closer to linux with respect to both Kbuild and device tree sources, and eventually eliminating all .dts -> .dtbo instances. This also matches the documentation update done in commit 4fb7e570d6b. Cc: Masahisa Kojima Signed-off-by: Rasmus Villemoes --- test/py/tests/test_efi_c

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

2024-07-06 Thread Rasmus Villemoes
Marek Vasut writes: >> ...om-overlay-rev100.dts => imx8mp-dhcom-som-overlay-rev100.dtso} | 0 >> 4 files changed, 0 insertions(+), 0 deletions(-) >> rename arch/arm/dts/{imx8mp-dhcom-pdk-overlay-eth2xfast.dts => >> imx8mp-dhcom-pdk-overlay-eth2xfast.dtso} (100%) >> rename arch/arm/dts/{im

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

2024-07-10 Thread Rasmus Villemoes
to pass except for the known cyclic false positive: https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8897&view=logs&jobId=a1270dec-081b-5c65-5cd5-5e915a842596 Rasmus Villemoes (5): arm64: dts: imx8mp: rename DHCOM SoM overlays to .dtso kbuild: Allow DTB overlays to built int

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

2024-07-10 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 --- ...ay-eth2xfast.dts => imx8mp-dhcom-pdk-o

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

2024-07-10 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 v2 3/5] test: overlay: rename overlay source files to .dtso

2024-07-10 Thread Rasmus Villemoes
o this is also a step towards staying closer to linux with respect to both Kbuild and device tree sources. Cc: Maxime Ripard Cc: Simon Glass Signed-off-by: Rasmus Villemoes --- test/overlay/Makefile | 4 ++-- test/overlay/cmd_ut_

[PATCH v2 5/5] kbuild: Disallow DTB overlays to built from .dts named source files

2024-07-10 Thread Rasmus Villemoes
-off-by: Rasmus Villemoes --- scripts/Makefile.lib | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 549c3619472..d6fbf9a7659 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -416,9 +416,6 @@ cmd_dtco = mkdir -p $(dir ${dtc-tmp

[PATCH v2 4/5] test/py: efi_capsule: rename device tree overlay source to .dtso

2024-07-10 Thread Rasmus Villemoes
rds staying closer to linux with respect to both Kbuild and device tree sources, and eventually eliminating all .dts -> .dtbo instances. This also matches the documentation update done in commit 4fb7e570d6b. Cc: Masahisa Kojima Signed-off-by: Rasmus Villemoes --- test/py/tests/test_efi_c

[PATCH 1/2] arm: bcm283x: remove pointless empty hw_watchdog_disable

2024-07-10 Thread Rasmus Villemoes
hough it does get inlined into the caller here, and the out-of-line definition does get gc'ed by the linker). Signed-off-by: Rasmus Villemoes --- arch/arm/mach-bcm283x/reset.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-bcm283x/reset.c b/arc

[PATCH 2/2] board: rpi: remove leftover CONFIG_HW_WATCHDOG block

2024-07-10 Thread Rasmus Villemoes
this block was left behind. Another rpi watchdog driver has since been added, but that does not select HW_WATCHDOG, so this remains dead and unused. Remove it. Signed-off-by: Rasmus Villemoes --- board/raspberrypi/rpi/rpi.c | 4 1 file changed, 4 deletions(-) diff --git a/board/raspberrypi/r

Re: env: CONFIG_DEFAULT_ENV_FILE and CFG_EXTRA_ENV_SETTINGS

2024-07-12 Thread Rasmus Villemoes
Tony Dinh writes: > Hi Tom, > > I'm trying to move some envs from a board header file to the default > env file. I recall that the envs in CONFIG_DEFAULT_ENV_FILE are > appended to the envs in CFG_EXTRA_ENV_SETTINGS. As you mentioned here > before: > > https://lore.kernel.org/all/20220810170439.G

[PATCH v2 0/2] a little RPi watchdog cleanup

2024-07-12 Thread Rasmus Villemoes
are the false positive 'cyclic ...' ones. Rasmus Villemoes (2): arm: bcm283x: remove unused empty hw_watchdog_disable board: rpi: remove leftover CONFIG_HW_WATCHDOG block arch/arm/mach-bcm283x/reset.c | 7 ++- board/raspberrypi/rpi/rpi.c | 4 2 files changed, 2 in

[PATCH v2 2/2] board: rpi: remove leftover CONFIG_HW_WATCHDOG block

2024-07-12 Thread Rasmus Villemoes
this block was left behind. Another rpi watchdog driver has since been added, but that does not select HW_WATCHDOG, so this remains dead and unused. Remove it. Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- board/raspberrypi/rpi/rpi.c | 4 1 file changed, 4 deletions(-) di

[PATCH v2 1/2] arm: bcm283x: remove unused empty hw_watchdog_disable

2024-07-12 Thread Rasmus Villemoes
), but this now unused stub was left behind. The later (re-)added rpi watchdog driver does not define a hw_watchdog_disable() function, as that is properly integrated in the watchdog framework. Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- arch/arm/mach-bcm283x/reset.c | 7

Re: [PATCH v2 0/2] a little RPi watchdog cleanup

2024-07-15 Thread Rasmus Villemoes
Stefan Roese writes: > @Tom, > > I can't find these patches (and v1) in patchworks. Do you have an > idea, why this is the case? > Perhaps because they (v2) have already been merged to master via a PR from Peter? commit 1ca216522d4. So one has to change 'state' from 'action required' to see th

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

2024-01-03 Thread Rasmus Villemoes
olded 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 overla

[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 1/8] cmd/mem.c: use memmove in do_mem_cp()

2024-01-03 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. 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

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

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

2024-01-03 Thread Rasmus Villemoes
Use 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 i

[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

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

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

[PATCH v2 0/6] some LED patches

2023-11-17 Thread Rasmus Villemoes
in patch 2. Doug 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()

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

[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 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 2/6] led-uclass: do not create fallback label for top-level node

2023-11-17 Thread Rasmus Villemoes
been bound 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 --- dri

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

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

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 th

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

[PATCH 2/3] wdt-uclass: prevent multiple cyclic_register calls

2024-05-08 Thread Rasmus Villemoes
, we cannot just skip the registration, as the (new) timeout value may mean that we have to ask the cyclic framework to call us more often. So if we're already running, first unregister the old cyclic instance. Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 9 ++

[PATCH 1/3] cyclic: stop strdup'ing name in cyclic_register()

2024-05-08 Thread Rasmus Villemoes
ake that a requirement. Signed-off-by: Rasmus Villemoes --- common/cyclic.c | 2 +- include/cyclic.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cyclic.c b/common/cyclic.c index a49bfc88f5c..c62e7fa7d19 100644 --- a/common/cyclic.c +++ b/common/cyclic.c @@ -4

[PATCH 0/3] cyclic/watchdog patches

2024-05-08 Thread Rasmus Villemoes
f we adopt this model. While actually doing those mostly mechanical changes, I stumbled on two separate issues that probably want fixing regardless of the fate of 3/3. For now only compile-tested. Rasmus Villemoes (3): cyclic: stop strdup'ing name in cyclic_register() wdt-uclass: p

[PATCH 3/3] cyclic: make clients embed a struct cyclic_info in their own data structure

2024-05-08 Thread Rasmus Villemoes
o not emit a warning for a maybe-unused function and (2) see that it can actually never be reached, so not emit any code for it. Signed-off-by: Rasmus Villemoes --- board/Marvell/octeon_nic23/board.c | 9 +--- cmd/cyclic.c | 12 +-- common/cyclic.c

Re: [PATCH] kconfig: default to zero if int/hex symbol lacks default property

2024-05-13 Thread Rasmus Villemoes
On 07/05/2024 19.23, Tom Rini wrote: > On Tue, May 07, 2024 at 09:17:46AM +0200, Yoann Congal wrote: >> Le 06/05/2024 à 19:43, Tom Rini a écrit : >>> On Sun, May 05, 2024 at 03:53:53PM +0200, Yoann Congal wrote: >>> From: Masahiro Yamada This is a cherry-pick from the kernel commit:

Re: [PATCH] kconfig: default to zero if int/hex symbol lacks default property

2024-05-13 Thread Rasmus Villemoes
On 13/05/2024 10.28, Rasmus Villemoes wrote: > On 07/05/2024 19.23, Tom Rini wrote: >> On Tue, May 07, 2024 at 09:17:46AM +0200, Yoann Congal wrote: >>> Le 06/05/2024 à 19:43, Tom Rini a écrit : >>>> On Sun, May 05, 2024 at 03:53:53PM +0200, Yoann Congal wrote: &g

Re: [PATCH] kconfig: default to zero if int/hex symbol lacks default property

2024-05-13 Thread Rasmus Villemoes
On 13/05/2024 11.03, Yoann Congal wrote: > > > Le 13/05/2024 à 10:28, Rasmus Villemoes a écrit : >> On 07/05/2024 19.23, Tom Rini wrote: >>> On Tue, May 07, 2024 at 09:17:46AM +0200, Yoann Congal wrote: >>>> But, my more general use case is the Yocto dev t

Re: [PATCH 2/3] wdt-uclass: prevent multiple cyclic_register calls

2024-05-13 Thread Rasmus Villemoes
On 13/05/2024 12.40, Stefan Roese wrote: > On 5/9/24 02:47, Rasmus Villemoes wrote: >> Currently, the cyclic_register() done in wdt_start() is not undone in >> wdt_stop(). Moreover, calling wdt_start multiple times (which is >> perfectly allowed on an already started devic

[PATCH 1/2] Makefile: refactor ubootrelease target

2024-05-15 Thread Rasmus Villemoes
Instead of duplicating the contents of the filechk_uboot.release variable, use it directly. This is preparation for the next patch which will modify filechk_uboot.release, and reflects what the linux kernel does nowadays: kernelrelease: @$(filechk_kernel.release) Signed-off-by: Rasmus

[PATCH 0/2] scripts/setlocalversion sync with linux 6.9

2024-05-15 Thread Rasmus Villemoes
The first commit is trivial cleanup. The second syncs scripts/setlocalversion with linux 6.9, with just a one-line change on top to account for a Kbuild change that U-Boot has not yet adopted. Rasmus Villemoes (2): Makefile: refactor ubootrelease target scripts/setlocalversion: sync with

[PATCH 2/2] scripts/setlocalversion: sync with linux v6.9

2024-05-15 Thread Rasmus Villemoes
ce of unrelated tags (possibly from some tracked fork). Signed-off-by: Rasmus Villemoes --- Makefile| 5 +- scripts/setlocalversion | 226 2 files changed, 116 insertions(+), 115 deletions(-) diff --git a/Makefile b/Makefile index efaf24e5

[PATCH v2 1/3] cyclic: stop strdup'ing name in cyclic_register()

2024-05-16 Thread Rasmus Villemoes
ake that a requirement. Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- common/cyclic.c | 2 +- include/cyclic.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cyclic.c b/common/cyclic.c index a49bfc88f5c..c62e7fa7d19 100644 --- a/common/cyclic.c ++

[PATCH v2 0/3] cyclic/watchdog patches

2024-05-16 Thread Rasmus Villemoes
7), fixing trivial conflict with 301bac6047c8. Rasmus Villemoes (3): cyclic: stop strdup'ing name in cyclic_register() wdt-uclass: prevent multiple cyclic_register calls cyclic: make clients embed a struct cyclic_info in their own data structure board/Marvell/octeon_nic23/board.c |

[PATCH v2 2/3] wdt-uclass: prevent multiple cyclic_register calls

2024-05-16 Thread Rasmus Villemoes
, we cannot just skip the registration, as the (new) timeout value may mean that we have to ask the cyclic framework to call us more often. So if we're already running, first unregister the old cyclic instance. Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers

[PATCH v2 3/3] cyclic: make clients embed a struct cyclic_info in their own data structure

2024-05-16 Thread Rasmus Villemoes
o not emit a warning for a maybe-unused function and (2) see that it can actually never be reached, so not emit any code for it. Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- board/Marvell/octeon_nic23/board.c | 9 +--- cmd/cyclic.c

Re: [PATCH] imx: hab: add documentation about the required keys/certs

2024-05-16 Thread Rasmus Villemoes
On 16/05/2024 10.25, Claudius Heine wrote: > Hi Tim and Marek, > > On 2024-05-16 12:46 am, Tim Harvey wrote: >> On Tue, May 14, 2024 at 11:50 AM Tim Harvey >> wrote: >>> On Sun, May 12, 2024 at 10:08 PM Marek Vasut wrote: On 5/8/24 9:23 AM, Claudius Heine wrote: > On 2024-05-07 3:28 pm,

Re: [PATCH v2 3/3] cyclic: make clients embed a struct cyclic_info in their own data structure

2024-05-19 Thread Rasmus Villemoes
On 18/05/2024 09.34, Stefan Roese wrote: > This introduces some problems when compiling e.g. sandbox: > > In file included from test/common/cyclic.c:10: > test/common/cyclic.c: In function ‘dm_test_cyclic_running’: > test/common/cyclic.c:25:42: warning: passing argument 1 of > ‘cyclic_register’ f

[PATCH v3 1/3] cyclic: stop strdup'ing name in cyclic_register()

2024-05-19 Thread Rasmus Villemoes
ake that a requirement. Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- common/cyclic.c | 2 +- include/cyclic.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cyclic.c b/common/cyclic.c index a49bfc88f5c..c62e7fa7d19 100644 --- a/common/cyclic.c ++

[PATCH v3 2/3] wdt-uclass: prevent multiple cyclic_register calls

2024-05-19 Thread Rasmus Villemoes
, we cannot just skip the registration, as the (new) timeout value may mean that we have to ask the cyclic framework to call us more often. So if we're already running, first unregister the old cyclic instance. Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers

[PATCH v3 0/3] cyclic/watchdog patches

2024-05-19 Thread Rasmus Villemoes
cording to the new API. v2: Add R-bs from Stefan. Fixup whitespace in the doc/ part. Rebase to current master (676903c1b97), fixing trivial conflict with 301bac6047c8. Rasmus Villemoes (3): cyclic: stop strdup'ing name in cyclic_register() wdt-uclass: prevent multiple cyclic_register calls

[PATCH v3 3/3] cyclic: make clients embed a struct cyclic_info in their own data structure

2024-05-19 Thread Rasmus Villemoes
o not emit a warning for a maybe-unused function and (2) see that it can actually never be reached, so not emit any code for it. Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- board/Marvell/octeon_nic23/board.c | 9 +--- cmd/cyclic.c

Re: [PATCH v2 3/3] cyclic: make clients embed a struct cyclic_info in their own data structure

2024-05-21 Thread Rasmus Villemoes
On 21/05/2024 08.57, Stefan Roese wrote: > On 5/19/24 21:44, Rasmus Villemoes wrote: >> On 18/05/2024 09.34, Stefan Roese wrote: >> >>> This introduces some problems when compiling e.g. sandbox: >>> >>> In file included from test/common/cyclic.c

[PATCH v4 0/3] cyclic/watchdog patches

2024-05-21 Thread Rasmus Villemoes
p whitespace in the doc/ part. Rebase to current master (676903c1b97), fixing trivial conflict with 301bac6047c8. Rasmus Villemoes (3): cyclic: stop strdup'ing name in cyclic_register() wdt-uclass: prevent multiple cyclic_register calls cyclic: make clients embed a struct cyclic_in

[PATCH v4 1/3] cyclic: stop strdup'ing name in cyclic_register()

2024-05-21 Thread Rasmus Villemoes
ake that a requirement. Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- common/cyclic.c | 2 +- include/cyclic.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cyclic.c b/common/cyclic.c index a49bfc88f5c..c62e7fa7d19 100644 --- a/common/cyclic.c ++

[PATCH v4 2/3] wdt-uclass: prevent multiple cyclic_register calls

2024-05-21 Thread Rasmus Villemoes
, we cannot just skip the registration, as the (new) timeout value may mean that we have to ask the cyclic framework to call us more often. So if we're already running, first unregister the old cyclic instance. Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers

[PATCH v4 3/3] cyclic: make clients embed a struct cyclic_info in their own data structure

2024-05-21 Thread Rasmus Villemoes
o not emit a warning for a maybe-unused function and (2) see that it can actually never be reached, so not emit any code for it. Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- board/Marvell/octeon_nic23/board.c | 9 +--- cmd/cyclic.c | 12 +- comm

Re: [PATCH v4 0/3] cyclic/watchdog patches

2024-05-21 Thread Rasmus Villemoes
On 21/05/2024 10.46, Rasmus Villemoes wrote: > A bit of a mixed bag. I've been wanting to submit something like 3/3 > for a while. So when I stumbled on Marek's patch > https://lore.kernel.org/u-boot/20240316201416.211480-1-marek.vasut+rene...@mailbox.org/ > , I got remind

Re: [PATCH v4 0/3] cyclic/watchdog patches

2024-05-21 Thread Rasmus Villemoes
On 21/05/2024 13.54, Stefan Roese wrote: > On 5/21/24 11:47, Rasmus Villemoes wrote: >> On 21/05/2024 10.46, Rasmus Villemoes wrote: >>> A bit of a mixed bag. I've been wanting to submit something like 3/3 >>> for a while. So when I stumbled on Marek's pat

[RFC PATCH] test/cyclic: try to avoid spurious test failures due to cyclic callbacks

2024-05-24 Thread Rasmus Villemoes
quote Douglas Adams, mostly harmless. I made it "hidden" so as not to mess up any existing "print the whole evnironment test", and also to sort-of emphasize that this isn't really meant to be an official interface. Signed-off-by: Rasmus Villemoes --- Not really tested e

[PATCH] global_data.h: drop write-only field dm_root_f

2024-05-27 Thread Rasmus Villemoes
The dm_root_f field seems to be entirely write-only and hence redundant, unless 'git grep' fails to find some access generated via preprocessor token concatenation or similar. Signed-off-by: Rasmus Villemoes --- common/board_r.c | 3 +-- include/asm-generic/global_

[PATCH 6/7] powerpc: mpc83xx: remove unused watchdog_reset() function

2024-05-28 Thread Rasmus Villemoes
There is no longer any code in tree that calls a watchdog_reset() function. The macro WATCHDOG_RESET, which used to emit a call to watchdog_reset(), got removed two years ago. Cc: Christophe Leroy Signed-off-by: Rasmus Villemoes --- arch/powerpc/cpu/mpc83xx/cpu.c | 15 --- 1 file

[PATCH 3/7] serial: ns16550: fix comment to mention schedule instead of watchdog_reset

2024-05-28 Thread Rasmus Villemoes
watchdog_reset() is no more. Make the comments match the code and today's reality. Signed-off-by: Rasmus Villemoes --- drivers/serial/ns16550.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 6deb1d

[PATCH 7/7] powerpc: mpc85xx: remove dead watchdog-related code

2024-05-28 Thread Rasmus Villemoes
from anywhere, so that can go away as well, which nicely also removes a bit of arch-specific code from the generic watchdog.h header. Cc: Christophe Leroy Signed-off-by: Rasmus Villemoes --- arch/powerpc/cpu/mpc85xx/cpu.c | 31 --- include/watchdog.h | 3

[PATCH 2/7] wdt-uclass: watchdog_reset cleanup

2024-05-28 Thread Rasmus Villemoes
watchdog_reset() is no longer called from anywhere, so we do not need to define a dummy no-op function. Remove that definition, and update references to say schedule() instead. Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 19 ++- 1 file changed, 2

[PATCH 4/7] sh4: move reset_cpu() from watchdog.c to cpu.c

2024-05-28 Thread Rasmus Villemoes
The next patch will remove all the other code from watchdog.c, which would leave just this function in there. It seems just as natural for this function to be defined in cpu.c, allowing us to delete watchdog.c completely. Cc: Nobuhiro Iwamatsu Signed-off-by: Rasmus Villemoes --- arch/sh/cpu

[PATCH 0/7] watchdog_reset cleanup

2024-05-28 Thread Rasmus Villemoes
e are independent of each other and can be applied individually. Cc: Angelo Dureghello Cc: Christophe Leroy Cc: Huan Wang Cc: Nobuhiro Iwamatsu Rasmus Villemoes (7): m68k: remove dead code wdt-uclass: watchdog_reset cleanup serial: ns16550: fix comment to mention schedule inste

[PATCH 1/7] m68k: remove dead code

2024-05-28 Thread Rasmus Villemoes
omap2/, so those can obviously not refer to these instances. Hence these functions are not actually used at all and can be removed. As a bonus, this also removes two leftover references to WATCHDOG_RESET. Cc: Huan Wang Cc: Angelo Dureghello Signed-off-by: Rasmus Villemoes --- arch/m68k/cpu

[PATCH 5/7] sh4: remove watchdog.c file

2024-05-28 Thread Rasmus Villemoes
The external functions defined here are not called from anywhere. So they, and consequently the whole file, can be dropped. Cc: Nobuhiro Iwamatsu Signed-off-by: Rasmus Villemoes --- arch/sh/cpu/sh4/Makefile | 2 +- arch/sh/cpu/sh4/watchdog.c | 52 -- 2

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

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

[PATCH U-Boot] scripts/setlocalversion: Improve -dirty check with git-status --no-optional-locks

2020-08-25 Thread Rasmus Villemoes
p and use a regex that's good enough for both the git-status and git-diff-index version. Cc: Christian Kujau Cc: Guenter Roeck Suggested-by: Alexander Kapshuk Signed-off-by: Brian Norris Tested-by: Genki Sky Signed-off-by: Masahiro Yamada Signed-off-by: Rasmus Villemoes --- This fixes

Re: [PATCH U-Boot] scripts/setlocalversion: Improve -dirty check with git-status --no-optional-locks

2020-08-25 Thread Rasmus Villemoes
On 25/08/2020 14.56, Tom Rini wrote: > On Tue, Aug 25, 2020 at 01:29:50PM +0200, Rasmus Villemoes wrote: > >> From: Brian Norris >> >> [linux commit ff64dd4857303dd5550faed9fd598ac90f0f2238] >> >> scripts/setlocalversion | 12 ++-- >> 1 f

[PATCH v2] scripts/setlocalversion: sync with linux 5.8

2020-08-25 Thread Rasmus Villemoes
ntain the $(ARCH) string but instead the actual value of ARCH. So for now, use the linux version as-is; it should be fairly obvious if 81630a3b38c2 or something like it does need to be applied on top. Signed-off-by: Rasmus Villemoes --- scripts/setlocalversion | 45 +

Re: [RFC PATCH 0/1] Anti rollback protection for FIT Images

2020-09-02 Thread Rasmus Villemoes
On 01/09/2020 22.48, Thirupathaiah Annapureddy wrote: > Anti rollback protection is required when there is a need to retire > previous versions of FIT images due to security flaws in them. > Currently U-Boot Verified boot does not have rollback protection to > protect against known security flaws.

Re: [RFC PATCH 0/1] Anti rollback protection for FIT Images

2020-09-07 Thread Rasmus Villemoes
On 02/09/2020 09.58, Rasmus Villemoes wrote: > On 01/09/2020 22.48, Thirupathaiah Annapureddy wrote: >> Anti rollback protection is required when there is a need to retire >> previous versions of FIT images due to security flaws in them. >> Currently U-Boot Verified boot d

Re: [PATCH] scripts/get_default_envs.sh: preserve order of multiple entries for same variable

2020-04-29 Thread Rasmus Villemoes
get the same default environment as one >>> currently has, we need to preserve the order. So only sort by the >>> variable name, and disable the last-resort comparison. >>> >>> We could pipe the result through uniq to remove duplicate lines, but I

reset on mpc83xx

2020-04-30 Thread Rasmus Villemoes
Hi, I'm wondering why the sysreset_mpc83xx driver (as well as the similar code in arch/powerpc/cpu/mpc83xx/cpu.c) removes the MSR_IR and MSR_DR bits from MSR. On my mpc8309, that seems to simply make the board hang right after writing the new MSR value - i.e., it never gets to write the magic val

Re: reset on mpc83xx

2020-04-30 Thread Rasmus Villemoes
On 30/04/2020 17.03, Christophe Leroy wrote: > > > Le 30/04/2020 à 16:44, Rasmus Villemoes a écrit : >> Hi, >> >> I'm wondering why the sysreset_mpc83xx driver (as well as the similar >> code in arch/powerpc/cpu/mpc83xx/cpu.c) removes the MSR_IR and MSR_DR

[PATCH] rtc: pcf2127: don't add/subtract 1 to tm_mon

2020-05-01 Thread Rasmus Villemoes
As noted in rtc_def.h, the tm_mon field in struct rtc_time is 1-12, unlike in struct tm where it is 0-11. Currently, running "date" prints the wrong Date: 2020-04-01 (Friday)Time: 13:05:30 and setting the RTC via the date command is also broken. Signed-off-by: Rasmus Villemoes --

getting battery status from RTC driver

2020-05-01 Thread Rasmus Villemoes
Hi, I have an application where I need to retrieve the battery status from a pcf2129 (the pcf2127 driver works fine for that chip as well). Currently, the various drivers seem to handle low battery quite inconsistently: pcf2127 just prints a warning, still populates tm, and returns 0. pcf8563 is

[PATCH 0/5] some sysreset patches (mostly for mpc83xx)

2020-05-01 Thread Rasmus Villemoes
reset cause; in U-Boot proper, gd->arch.reset_status is always clear. Rasmus Villemoes (5): sysreset: mpc83xx: use scnprintf instead of snprintf sysreset: mpc83xx: shuffle newline logic in mpc83xx_sysreset_get_status sysreset: mpc83xx: fix CONFIG_IS_ENABLED logic sysreset: mpc83xx:

[PATCH 2/5] sysreset: mpc83xx: shuffle newline logic in mpc83xx_sysreset_get_status

2020-05-01 Thread Rasmus Villemoes
set, we'd miss a newline before the print_83xx_arb_event() output. That latter always includes a newline in its output, so just pull up the scnprintf("\n") a bit. Signed-off-by: Rasmus Villemoes --- drivers/sysreset/sysreset_mpc83xx.c | 8 +--- 1 file changed, 5 insertions

[PATCH 1/5] sysreset: mpc83xx: use scnprintf instead of snprintf

2020-05-01 Thread Rasmus Villemoes
become negative (since scnprintf(), when given a non-zero size, has the property that the return value is strictly less than the given size). Signed-off-by: Rasmus Villemoes --- drivers/sysreset/sysreset_mpc83xx.c | 54 ++--- 1 file changed, 19 insertions(+), 35 deletions

[PATCH 5/5] sysreset: move print_resetinfo() to sysreset-uclass.c

2020-05-01 Thread Rasmus Villemoes
Moving this out of board_f.c allows board-specific SPL code to call this rather than duplicating its implementation. Signed-off-by: Rasmus Villemoes --- common/board_f.c | 24 drivers/sysreset/sysreset-uclass.c | 22 ++ include

[PATCH 4/5] sysreset: mpc83xx: add output in case of cold boot

2020-05-01 Thread Rasmus Villemoes
For a powercycle/cold boot, none of the RSR_* bits in the reset status register are set, so one gets an empty Reset Status: line. Print an indication that this was likely a cold boot. Signed-off-by: Rasmus Villemoes --- drivers/sysreset/sysreset_mpc83xx.c | 26 +- 1

[PATCH 3/5] sysreset: mpc83xx: fix CONFIG_IS_ENABLED logic

2020-05-01 Thread Rasmus Villemoes
Unlike IS_ENABLED, one should not include the CONFIG_ part in the argument to CONFIG_IS_ENABLED - currently, the first of these tests for whether CONFIG_CONFIG_AER_FULL or CONFIG_SPL_CONFIG_AER_FULL are defined (depending on SPL or not), similarly for the other one. Signed-off-by: Rasmus

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

2020-05-04 Thread Rasmus Villemoes
refers to >> a non-existing timestamp variable - obviously priv->timestamp is >> meant. >> >> Signed-off-by: Rasmus Villemoes >> --- >> drivers/timer/mpc83xx_timer.c | 6 +- >> 1 file changed, 5 insertions(+), 1 deletion(-) > > Could you

[PATCH 0/6] rtc: add rtc_{read,write}8_array and rtc command

2020-05-04 Thread Rasmus Villemoes
rather obvious subsommands to add at some point. Also, rtc_{read,write}{16,32} can be simplified a bit, along the lines of __le16 v; int ret = rtc_read8_array(dev, reg, &v, 2); if (ret) return ret; *valuep = __le16_to_cpu(v); return 0; Rasmus Villemoes (6): rtc: add rtc_read8_array he

[PATCH 2/6] rtc: add rtc_write8_array() helper

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

[PATCH 3/6] rtc: fall back to ->{read, write}8_array if ->{read, write}8 are not provided

2020-05-04 Thread Rasmus Villemoes
his, a driver that provides rtc_read8_array() would most likely just duplicate the logic here for implementing a ->read8() method in term of its ->read8_array() method. The same remarks of course apply to the write case. Signed-off-by: Rasmus Villemoes --- drivers/rtc/rtc-u

[PATCH 1/6] rtc: add rtc_read8_array helper and ->read8_array method

2020-05-04 Thread Rasmus Villemoes
Some users may want to read multiple consecutive 8-bit registers. Instead of each caller having to implement the loop, provide a rtc_read8_array() helper. Also, allow a driver to provide a read8_array method, which can be more efficient than reading one register at a time. Signed-off-by: Rasmus

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