Re: [PATCH v2 07/10] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()

2021-06-28 Thread Rasmus Villemoes
On 26/06/2021 20.32, Simon Glass wrote: > Hi Rasmus, > > On Tue, 22 Jun 2021 at 14:28, Rasmus Villemoes > wrote: >> >>> I don't think it is good to start it in the post-probe. Can you do it >>> separately, afterwards? >> >> Eh, yes, of cour

[PATCH] remove struct uclass_driver::ops

2021-05-19 Thread Rasmus Villemoes
nsibly be assigned; it would have to be some "struct uclass_ops *" providing a set of methods for the core to call on that particular uclass, but should the need for that ever arise, it would be better to have a member of that particular type instead of void*. Signed-off-by: Rasmus Villemo

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

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

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

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

2021-04-09 Thread Rasmus Villemoes
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 v2 2/2] powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD

2021-04-15 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 const

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 ge

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

2021-04-15 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 durin

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

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

2021-04-13 Thread Rasmus Villemoes
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 Signed-off-

[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 v2 0/2] powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD

2021-04-13 Thread Rasmus Villemoes
/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 insertions(+), 4

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

[PATCH v2 2/2] powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD

2021-04-13 Thread Rasmus Villemoes
boot/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 | 9 +++

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

2021-04-13 Thread Rasmus Villemoes
. 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 | 1

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

2021-04-13 Thread Rasmus Villemoes
by 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 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 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
(and it is of 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 variable

[PATCH resend 2/2] env: add CONFIG_ENV_SECT_SIZE_AUTO

2021-04-14 Thread Rasmus Villemoes
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..844c3128

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

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

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 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 v2 1/2] env: allow environment to be amended from control dtb

2021-04-21 Thread Rasmus Villemoes
by 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 0/2] allow environment to be updated from dtb

2021-04-21 Thread Rasmus Villemoes
. 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_r.c

[PATCH v3 0/2] powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD

2021-04-21 Thread Rasmus Villemoes
.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(+), 4 deletions

[PATCH v3 2/2] powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD

2021-04-21 Thread Rasmus Villemoes
-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 | 9 +++

[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/cache.c b

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

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

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

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

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

Re: [PATCH v4 3/3] arm64: Kconfig: Enable usage of optimized memset/memcpy/memmove

2021-08-13 Thread Rasmus Villemoes
On 12/08/2021 16.47, Stefan Roese wrote: > This patch enables the use of the optimized memset(), memmove() & > memcpy() versions recently added on ARM64. > > Signed-off-by: Stefan Roese > > > +config USE_ARCH_MEMMOVE > + bool "Use an assembly optimized implementation of memmove" > +

Re: [PATCH v5 09/12] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()

2021-08-13 Thread Rasmus Villemoes
On 12/08/2021 08.50, Wolfgang Denk wrote: > Dear Rasmus, > > In message <20210811124800.2593226-10-rasmus.villem...@prevas.dk> you wrote: >> >> +ret = uclass_get(UCLASS_WDT, ); >> +if (ret) { >> +log_debug("Error getting UCLASS_WDT: %d\n", ret); >> +return 0; >> +

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

2021-08-31 Thread Rasmus Villemoes
On 31/08/2021 10.17, Stefan Roese wrote: > Hi Rasmus, > > I've pulled this patchset now into next [1] and have run it through > CI via Azure. Here an error occurs: > >

[PATCH v6 09/12] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()

2021-08-19 Thread Rasmus Villemoes
lean property, so that one can do CONFIG_WATCHDOG_AUTOSTART per-device. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 56 --- include/asm-generic/global_data.h | 6 2 files changed, 36 insertion

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

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

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

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

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

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

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

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

[PATCH v6 06/12] sandbox: disable CONFIG_WATCHDOG_AUTOSTART

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

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

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

[PATCH v6 05/12] watchdog: wdt-uclass.c: keep track of each device's running state

2021-08-19 Thread Rasmus Villemoes
og_dev - incidentally, that is how it was used prior to commit 9c44ff1c5f3c. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/wdt-uc

[PATCH v6 04/12] watchdog: wdt-uclass.c: refactor initr_watchdog()

2021-08-19 Thread Rasmus Villemoes
In preparation for handling all DM watchdogs in watchdog_reset(), pull out the code which handles starting (or not) the gd->watchdog_dev device. Include the device name in various printfs. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watch

[PATCH v6 02/12] watchdog: wdt-uclass.c: introduce struct wdt_priv

2021-08-19 Thread Rasmus Villemoes
intended. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 74 +-- 1 file changed, 54 insertions(+), 20 deletions(-) diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c

[PATCH v6 03/12] watchdog: wdt-uclass.c: neaten UCLASS_DRIVER definition

2021-08-19 Thread Rasmus Villemoes
The addition of .pre_probe and .per_device_auto made this look bad. Fix it. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/wdt

[PATCH v6 01/12] watchdog: wdt-uclass.c: use wdt_start() in wdt_expire_now()

2021-08-19 Thread Rasmus Villemoes
d is supposed to reset very soon. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c index 17334dbda

[PATCH v6 00/12] handling all DM watchdogs in watchdog_reset()

2021-08-19 Thread Rasmus Villemoes
://lore.kernel.org/u-boot/20210811124800.2593226-1-rasmus.villem...@prevas.dk/ Changes in v6: Make wdt_stop_all() return the first error encountered (if any), yet still visit all watchdog devices. Rasmus Villemoes (12): watchdog: wdt-uclass.c: use wdt_start() in wdt_expire_now() watchdog: wdt-uclass.c

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

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

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

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

Re: U-boot

2021-08-02 Thread Rasmus Villemoes
On 02/08/2021 11.55, Roman Kopytin wrote: > Yes, I don't see this tool in master branch. > May be I will take code and build this tool. > > Do you have a plan for sharing it in repo? Well, the repo for "sharing" this would/should be upstream U-Boot, and if there's sufficient interest I'll rebase

[PATCH v4 07/10] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()

2021-08-02 Thread Rasmus Villemoes
lean property, so that one can do CONFIG_WATCHDOG_AUTOSTART per-device. Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 56 --- include/asm-generic/global_data.h | 6 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/drivers/watchdog/wd

[PATCH v4 04/10] watchdog: wdt-uclass.c: refactor initr_watchdog()

2021-08-02 Thread Rasmus Villemoes
In preparation for handling all DM watchdogs in watchdog_reset(), pull out the code which handles starting (or not) the gd->watchdog_dev device. Include the device name in various printfs. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watch

[PATCH v4 06/10] sandbox: disable CONFIG_WATCHDOG_AUTOSTART

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

[PATCH v4 05/10] watchdog: wdt-uclass.c: keep track of each device's running state

2021-08-02 Thread Rasmus Villemoes
og_dev - incidentally, that is how it was used prior to commit 9c44ff1c5f3c. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/wdt-uc

[PATCH v4 02/10] watchdog: wdt-uclass.c: introduce struct wdt_priv

2021-08-02 Thread Rasmus Villemoes
intended. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 74 +-- 1 file changed, 54 insertions(+), 20 deletions(-) diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c index df8164da2a..b29d214724

[PATCH v4 00/10] handling all DM watchdogs in watchdog_reset()

2021-08-02 Thread Rasmus Villemoes
the probing loop in initr_watchdog(). Rasmus Villemoes (10): watchdog: wdt-uclass.c: use wdt_start() in wdt_expire_now() watchdog: wdt-uclass.c: introduce struct wdt_priv watchdog: wdt-uclass.c: neaten UCLASS_DRIVER definition watchdog: wdt-uclass.c: refactor initr_watchdog() watchdog: wdt

[PATCH v4 01/10] watchdog: wdt-uclass.c: use wdt_start() in wdt_expire_now()

2021-08-02 Thread Rasmus Villemoes
d is supposed to reset very soon. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c index 17334dbda

[PATCH v4 03/10] watchdog: wdt-uclass.c: neaten UCLASS_DRIVER definition

2021-08-02 Thread Rasmus Villemoes
The addition of .pre_probe and .per_device_auto made this look bad. Fix it. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/wdt

[PATCH v4 08/10] watchdog: add gpio watchdog driver

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

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

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

[PATCH v4 09/10] sandbox: add test of wdt_gpio driver

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

Re: [PATCH v3 07/10] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()

2021-08-03 Thread Rasmus Villemoes
On 02/08/2021 21.20, Simon Glass wrote: > Hi Rasmus, > >> But let me one last time repeat why I think the post_probe approach is >> the cleanest and a natural fit for DM: post_probe is (AIUI) a place >> where a uclass can do some action it wants done for every device >> belonging to that uclass.

Re: [PATCH v1 2/5] board_init: Use memset_simple() in board_init_f_init_reserve()

2021-08-09 Thread Rasmus Villemoes
On 06/08/2021 15.38, Stefan Roese wrote: > board_init_f_init_reserve() is called very early in the boot process, > before the caches are enabled. Because of this, the optimized memset() > version can't be used here on ARM64. With this patch, the simple memset > version memset_simple() is used here

Re: [PATCH v2 2/3] arm64: memset-arm64: Use simple memset when cache is disabled

2021-08-10 Thread Rasmus Villemoes
On 10/08/2021 09.13, Stefan Roese wrote: > The optimized memset uses the dc opcode, which causes problems when the > cache is disabled. This patch adds a check if the cache is disabled and > uses a very simple memset implementation in this case. Otherwise the > optimized version is used. > >

Re: [PATCH v2 1/3] arm64: arch/arm/lib: Add optimized memset/memcpy functions

2021-08-10 Thread Rasmus Villemoes
On 10/08/2021 09.13, Stefan Roese wrote: > +/* This implementation handles overlaps and supports both memcpy and memmove > + from a single entry point. It uses unaligned accesses and branchless Any reason not to take advantage of that, i.e. provide memmove as an alias for memcpy and thus get

Re: [PATCH] tools: add fdt_add_pubkey

2021-08-06 Thread Rasmus Villemoes
On 05/08/2021 09.59, Roman Kopytin wrote: > Thanks a lot. > Can I create 1 patch with tool + test? Preferably not. Each patch should be its own logical entity, doing one thing. Yes, sometimes the lines are a bit blurred, but adding a new tool and adding one or more tests of that tool are clearly

Re: [PATCH v4 00/10] handling all DM watchdogs in watchdog_reset()

2021-08-11 Thread Rasmus Villemoes
Ping. Stefan, any chance you could pick up this series? Simon has nodded to the v4 version of patch 7, so now they all have at least one R-b tag. Rasmus

Re: [PATCH v4 00/10] handling all DM watchdogs in watchdog_reset()

2021-08-11 Thread Rasmus Villemoes
On 11/08/2021 08.10, Stefan Roese wrote: > Hi Rasmus, > > On 11.08.21 08:05, Rasmus Villemoes wrote: >> Ping. Stefan, any chance you could pick up this series? Simon has nodded >> to the v4 version of patch 7, so now they all have at least one R-b tag. > > Actually

[PATCH v5 09/12] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()

2021-08-11 Thread Rasmus Villemoes
lean property, so that one can do CONFIG_WATCHDOG_AUTOSTART per-device. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 56 --- include/asm-generic/global_data.h | 6 2 files changed, 36 insertion

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

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

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

2021-08-11 Thread Rasmus Villemoes
ned-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 25 + include/wdt.h | 5 + 2 files changed, 30 insertions(+) diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c index 358fc68e27..75ff4c2a6c 100644 --- a/driv

[PATCH v5 06/12] sandbox: disable CONFIG_WATCHDOG_AUTOSTART

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

[PATCH v5 05/12] watchdog: wdt-uclass.c: keep track of each device's running state

2021-08-11 Thread Rasmus Villemoes
og_dev - incidentally, that is how it was used prior to commit 9c44ff1c5f3c. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/wdt-uc

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

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

Re: [PATCH v4 07/10] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()

2021-08-11 Thread Rasmus Villemoes
On 03/08/2021 10.28, Stefan Roese wrote: > Hi Rasmus, > >>   #endif >> diff --git a/include/asm-generic/global_data.h >> b/include/asm-generic/global_data.h >> index e55070303f..28d749538c 100644 >> --- a/include/asm-generic/global_data.h >> +++ b/include/asm-generic/global_data.h >> @@ -447,12

Re: U-boot

2021-08-02 Thread Rasmus Villemoes
On 31/07/2021 18.59, Simon Glass wrote: > Hi Roman, > > On Sat, 31 Jul 2021 at 02:26, Roman Kopytin > wrote: >> >> Thank, but my question was about adding of the public key to dtb file >> without private key. We won't have private key in our side. > > (please try not to top-post on the

Re: [PATCH v3 07/10] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()

2021-08-02 Thread Rasmus Villemoes
On 31/07/2021 12.06, Stefan Roese wrote: > Hi Rasmus, > > On 15.07.21 10:15, Stefan Roese wrote: >> Hi Rasmus, >> >> On 05.07.21 17:30, Simon Glass wrote: >>> Hi Rasmus, >>> >>> On Fri, 2 Jul 2021 at 06:45, Rasmus Villemoes >>>

Re: U-boot

2021-08-02 Thread Rasmus Villemoes
On 02/08/2021 11.25, Roman Kopytin wrote: > Thanks a lot! > Yes, looks like using of the 'fdtput' is not very safety for me. > As I understood I need to use "fdt_add_pubkey" tool with CMD (example): > ./ fdt_add_pubkey -a rsa2048 -k -n -r > my_file.dtb > > -r is the same as for mkimage? As

Re: [PATCH] tools: add fdt_add_pubkey

2021-08-05 Thread Rasmus Villemoes
On 03/08/2021 13.00, Roman Kopytin wrote: Hi Roman Thanks for picking this up. A few notes on the process: - Don't attach the patch, it must be inline in the email. But do not copy-paste it in to your mail client, that will most likely make it whitespace-damaged. git send-email is your friend.

[PATCH v5 03/12] watchdog: wdt-uclass.c: neaten UCLASS_DRIVER definition

2021-08-11 Thread Rasmus Villemoes
The addition of .pre_probe and .per_device_auto made this look bad. Fix it. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/wdt

[PATCH v5 02/12] watchdog: wdt-uclass.c: introduce struct wdt_priv

2021-08-11 Thread Rasmus Villemoes
intended. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 74 +-- 1 file changed, 54 insertions(+), 20 deletions(-) diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c

[PATCH v5 00/12] handling all DM watchdogs in watchdog_reset()

2021-08-11 Thread Rasmus Villemoes
in v5: - Handle leftover use of gd->watchdog_dev (new patches 7 and 8). Rasmus Villemoes (12): watchdog: wdt-uclass.c: use wdt_start() in wdt_expire_now() watchdog: wdt-uclass.c: introduce struct wdt_priv watchdog: wdt-uclass.c: neaten UCLASS_DRIVER definition watchdog: wdt-uclas

[PATCH v5 04/12] watchdog: wdt-uclass.c: refactor initr_watchdog()

2021-08-11 Thread Rasmus Villemoes
In preparation for handling all DM watchdogs in watchdog_reset(), pull out the code which handles starting (or not) the gd->watchdog_dev device. Include the device name in various printfs. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watch

[PATCH v5 01/12] watchdog: wdt-uclass.c: use wdt_start() in wdt_expire_now()

2021-08-11 Thread Rasmus Villemoes
d is supposed to reset very soon. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- drivers/watchdog/wdt-uclass.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c index 17334dbda

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

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

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

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

Re: [PATCH v4 07/10] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()

2021-08-11 Thread Rasmus Villemoes
On 11/08/2021 13.49, Stefan Roese wrote: > Hi Rasmus, > > On 11.08.21 13:32, Rasmus Villemoes wrote: >> On 03/08/2021 10.28, Stefan Roese wrote: >>> Hi Rasmus, >>> >>>>    #endif >>>> diff --git a/include/asm-generic/global_data.h >&

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

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

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

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

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

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

[PATCH 0/2] imx8m rom api fixups

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

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

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

<    1   2   3   4   5   6   7   8   9   >