Re: [EXT] [REGRESSION]: v2022.07: SHA256 hash is broken on imx8m series with CAAM enabled

2022-10-14 Thread Rasmus Villemoes
On 14/10/2022 03.00, Peng Fan wrote: > >>> Right now I am not sure what could cause the issue. >>> As per our previous discussions, JR0 can not be used in uboot, so you >>> need to >>> mark it as disabled until kernel device tree is not sync. >> >> Actually, I've given this a try by setting `statu

Re: commit 787f04bb6a - imx: add USB2_BOOT type

2022-10-14 Thread Rasmus Villemoes
On 14/10/2022 02.55, Peng Fan wrote: > Hi Rasmus > > On 10/7/2022 4:08 PM, Rasmus Villemoes wrote: >> Hi Peng >> >> It seems that commit 787f04bb6a (imx: add USB2_BOOT type) broke our >> board logic which relies on whether get_boot_device() returns

Re: [PATCH 5/6] net: tftp: use IS_ENABLED(CONFIG_NET_TFTP_VARS) instead of #if

2022-10-16 Thread Rasmus Villemoes
On 16/10/2022 20.28, Ramon Fried wrote: > On Fri, Oct 14, 2022 at 8:44 PM Rasmus Villemoes > wrote: >> >> Nothing inside this block depends on NET_TFTP_VARS to be set to parse >> correctly. Switch to C if() in preparation for adding code before >> this (to avoid

[PATCH 7/6] net: deal with fragment-overlapping-two-holes case

2022-10-17 Thread Rasmus Villemoes
ets of one another. So instead opt for this simple protection: Simply don't allow the eventual memcpy() to write beyond the last_byte of the current hole. Signed-off-by: Rasmus Villemoes --- I've been mulling over this over the weekend, and concluded that this should be enough for no

Re: [PATCH 3/6] net: (actually/better) deal with CVE-2022-{30790, 30552}

2022-10-25 Thread Rasmus Villemoes
On 20/10/2022 17.32, Artur Łącki wrote: > I tested these patches with my exploit. At the moment it looks like the > vulnerability has been fixed. Thanks for testing. Can I/we add a "Tested-by: Artur Łącki "? Rasmus

Re: [PATCH] lib: fix buggy strcmp and strncmp

2022-10-25 Thread Rasmus Villemoes
On 05/10/2022 11.09, Rasmus Villemoes wrote: > There are two problems with both strcmp and strncmp: > Hi Tom Could you consider applying this now to give it ample time to soak before release? I'm pretty confident it's correct. Rasmus

Re: commit 787f04bb6a - imx: add USB2_BOOT type

2022-10-25 Thread Rasmus Villemoes
On 18/10/2022 02.43, Peng Fan wrote: > + Stefano & Fabio > Is there any chance you could make some information on that ROM API public so it's possible for outsiders to understand what's going on? > > What could only help is to ask the ROM team to see whether they have > plan to pu

Re: imx8 regression: cyclic_register for watchdog@30280000 failed

2022-10-26 Thread Rasmus Villemoes
On 25/10/2022 18.32, Tim Harvey wrote: > Greetings, > > I've noticed a regression since the merge of the cyclic framework use > for watchdog on my imx8m boards: > > cyclic_register for watchdog@3028 failed > WDT: Failed to start watchdog@3028 > > A bisect lead me to the following 3 seq

Re: imx8 regression: cyclic_register for watchdog@30280000 failed

2022-10-27 Thread Rasmus Villemoes
On 27/10/2022 08.32, Stefan Roese wrote: >> In this case the watchdog gets >> started but never reset via cyclic. This is due to cyclic_init never >> being called in the SPL - where is that supposed to occur? > > I did not have many targets with WDT in SPL to test with. Seems that > I missed to c

[PATCH 0/5] cyclic: get rid of (the need for) cyclic_init()

2022-10-28 Thread Rasmus Villemoes
t know if we ever do anything in SPL that would require a call to cyclic_unregister_all(). Rasmus Villemoes (5): cyclic: use a flag in gd->flags for recursion protection cyclic: drop redundant cyclic_ready flag list.h: synchronize hlist_for_each_entry* iterators with linux cyclic: switch to

[PATCH 1/5] cyclic: use a flag in gd->flags for recursion protection

2022-10-28 Thread Rasmus Villemoes
As a preparation for future patches, use a flag in gd->flags rather than a separate member in (the singleton) struct cyclic_drv to keep track of whether we're already inside cyclic_run(). Signed-off-by: Rasmus Villemoes --- common/cyclic.c | 6 +++--- include/asm

[PATCH 3/5] list.h: synchronize hlist_for_each_entry* iterators with linux

2022-10-28 Thread Rasmus Villemoes
x v6.1-rc1, including the hlist_entry_safe() helper used by the new versions. Signed-off-by: Rasmus Villemoes --- include/linux/list.h | 53 +--- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/include/linux/list.h b/include/linux/list.h index 3eac

[PATCH 2/5] cyclic: drop redundant cyclic_ready flag

2022-10-28 Thread Rasmus Villemoes
testing gd->cyclic itself. The only wrinkle is that cyclic_uninit() actually did set ->cyclic_ready to false. However, since it doesn't free gd->cyclic, the cyclic infrastructure is actually still ready (i.e., the list_head is properly initialized as an empty list). Signed-off-

[PATCH 4/5] cyclic: switch to using hlist instead of list

2022-10-28 Thread Rasmus Villemoes
hlist_del(). - struct members and function return values updated. Signed-off-by: Rasmus Villemoes --- cmd/cyclic.c | 5 +++-- common/cyclic.c | 18 ++ include/cyclic.h | 6 +++--- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/cmd/cyclic.c b/cmd/cyclic.c

[PATCH 5/5] cyclic: get rid of cyclic_init()

2022-10-28 Thread Rasmus Villemoes
e register used for gd contains 0 until it gets explicitly initialized, but that must be the case, otherwise testing gd for being NULL would not make much sense. Signed-off-by: Rasmus Villemoes --- common/board_f.c | 2 +- common/board_r.c

Re: imx8 regression: cyclic_register for watchdog@30280000 failed

2022-10-28 Thread Rasmus Villemoes
On 26/10/2022 21.06, Tim Harvey wrote: > 29caf9305b6f cyclic: Use schedule() instead of WATCHDOG_RESET() > ^^^ build issue resolved, boot issue on imx8mm-venice resolved, but > this is where we now encounter watchdog failures in both the SPL and > U-Boot: > > SPL: > cyclic_register for watchdog@3

Re: [PATCH 5/5] cyclic: get rid of cyclic_init()

2022-10-28 Thread Rasmus Villemoes
On 28/10/2022 16.10, Stefan Roese wrote: > On 28.10.22 13:50, Rasmus Villemoes wrote: >> As for cyclic_uninit(), it was never really the opposite of >> cyclic_init() since it didn't free the struct cyclic_drv nor set >> gd->cyclic to NULL. Rename it to cyclic_unregi

Re: [PATCH] env: Allow string CONFIG options in the text environment

2022-11-07 Thread Rasmus Villemoes
On 04/11/2022 20.08, Simon Glass wrote: > Hi Holger, > > On Fri, 4 Nov 2022 at 08:20, Holger Brunck > wrote: >> >> Hi Simon, >> I got no time to try it yet but I have a general comment. >> >>> >>> Sometimes it is useful to include a CONFIG option that contains a string. >>> This is hard to do in

[PATCH] imx8m: fix reading of DDR4 MR registers

2022-04-25 Thread Rasmus Villemoes
where e.g. get_trained_CDD() is already declared. This has only been compile-tested for the imx8mm-cl-iot-gate board (since I don't have the hardware), but since I've merely moved its definition of lpddr4_mr_read(), I'd be surprised if it changed anything for that board. Signed-off-by: Rasmus

Re: [PATCH] misc: i2c_eeprom: fix at24c32 offset_len

2022-04-28 Thread Rasmus Villemoes
On 28/04/2022 13.11, Eugen Hristev wrote: > According to at24c32 datasheet: > > RANDOM READ: A random read requires a “dummy” byte write sequence to load in > the dataword address. Once the device address word and data word address are > clocked in and acknowledged by the EEPROM, the microcontroll

please modify output of i.MX8MSCALE DDR Tool

2022-04-28 Thread Rasmus Villemoes
Hi NXP folks Is it possible for you to modify the i.MX8MSCALE DDR Tool so that the lpddr4_timing.c files it emits use "static" in front of ddr_ddrc_cfg[] and all the other arrays it defines; the only symbol that file defines which should have external linkage is the final "struct dram_timing_info

[PATCH 2/2] pmic: pca9450: drop pointless .data entries

2022-05-03 Thread Rasmus Villemoes
These are the i2c addresses of the chips, but that comes from device tree. Having that information duplicated here just adds confusion. Signed-off-by: Rasmus Villemoes --- drivers/power/pmic/pca9450.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/power/pmic

[PATCH 1/2] pmic: pca9450: add DM_I2C dependencies in Kconfig

2022-05-03 Thread Rasmus Villemoes
the one for the non-SPL_ variant. Signed-off-by: Rasmus Villemoes --- drivers/power/pmic/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig index 953c92e212..6c534aead7 100644 --- a/drivers/power/pmic/Kconfig +++

[PATCH] common/console.c: use CONFIG_VAL() with PRE_CON_BUF_* variables

2022-05-03 Thread Rasmus Villemoes
constrained). So a prerequisite for adding SPL_PRE_CONSOLE_BUFFER is to make the code use SPL_-specific values. No functional change. Signed-off-by: Rasmus Villemoes --- common/console.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/console.c b/common

[PATCH] common/console.c: prevent pre-console buffer contents from being added to itself

2022-05-03 Thread Rasmus Villemoes
ctually come out on some device). So disable all use of the pre-console buffer while print_pre_console_buffer() is emitting it. Signed-off-by: Rasmus Villemoes --- common/console.c | 10 +- include/asm-generic/global_data.h | 12 2 files changed, 17 insertion

Re: [PATCH 1/1] efi_loader: stop watchdogs in ExitBootServices()

2023-02-01 Thread Rasmus Villemoes
On 31/01/2023 16.07, Tom Rini wrote: > On Tue, Jan 31, 2023 at 02:03:10PM +0200, Ilias Apalodimas wrote: >> Hi all, >> >> On Mon, Jan 30, 2023 at 01:30:49PM -0500, Tom Rini wrote: >>> On Mon, Jan 30, 2023 at 01:13:55PM -0500, Tom Rini wrote: On Sat, Jan 28, 2023 at 09:57:45AM +0100, Heinrich S

Re: [PATCH v2 09/87] Rename ARCH_NPCM7xx

2023-02-01 Thread Rasmus Villemoes
On 31/01/2023 15.16, Simon Glass wrote: > Hi Rasmus, > > On Mon, 30 Jan 2023 at 14:12, Rasmus Villemoes > wrote: >> >> On 30/01/2023 16.54, Tom Rini wrote: >>> On Sun, Jan 29, 2023 at 10:57:28PM +0100, Rasmus Villemoes wrote: >>>> On 29/01/2023 01.57,

Re: [PATCH] RFC: nvedit: support doing one (extra) expansion of the value in "env set"

2023-02-02 Thread Rasmus Villemoes
On 14/02/2020 12.54, Rasmus Villemoes wrote: > > Assume BOOT_ORDER contains some permutation of "A B C", and for each > letter x, there's a BOOT_x_LEFT counter telling how many boot attempts > that slot has left. Now I want to find the first x in $BOOT_ORDER for >

Re: [PATCH 1/1] efi_loader: stop watchdogs in ExitBootServices()

2023-02-02 Thread Rasmus Villemoes
On 03/02/2023 03.15, Simon Glass wrote: > Hi Tom, > > On Thu, 2 Feb 2023 at 10:22, Tom Rini wrote: >> >> Honestly, not really? Some good number of SoCs will start the watchdog >> in ROM and these are also the ones that don't allow you to turn it off. > > I hope not, that sounds really risky. Ho

[PATCH 0/2] improve 'read' command, add 'write' command

2023-02-17 Thread Rasmus Villemoes
offers much that "read error" doesn't. Rasmus Villemoes (2): cmd: read: use part_get_info_by_dev_and_name_or_num() instead of open-coded dev_part parsing cmd: introduce 'write' command cmd/Kconfig | 5 + cmd/Makefile | 1 + cmd/read.c | 61

[PATCH 1/2] cmd: read: use part_get_info_by_dev_and_name_or_num() instead of open-coded dev_part parsing

2023-02-17 Thread Rasmus Villemoes
: Rasmus Villemoes --- cmd/read.c | 32 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/cmd/read.c b/cmd/read.c index fecfadaa1f..8645db49bb 100644 --- a/cmd/read.c +++ b/cmd/read.c @@ -15,50 +15,34 @@ int do_read(struct cmd_tbl *cmdtp, int flag

[PATCH 2/2] cmd: introduce 'write' command

2023-02-17 Thread Rasmus Villemoes
It's almost no extra code to hook up a buddy to the 'read' command. In fact, since the command is passed its own 'struct cmd_tbl', we can use the exact same callback, and let it figure out for itself whether it was invoked as "read" or "write". Sign

Re: [PATCH 0/6] broken CVE fix (b85d130ea0ca)

2022-11-14 Thread Rasmus Villemoes
On 14/10/2022 19.43, Rasmus Villemoes wrote: > tl;dr: b85d130ea0ca didn't fix the CVE(s), but did break tftp of > certain file sizes - which is somewhat lucky, since that's how I > noticed in the first place. > At this point it seems unlikely that any more comments or

Re: [PATCH 1/1] doc: fix documentation of enum gd_flags

2022-11-15 Thread Rasmus Villemoes
On 14/11/2022 10.25, Heinrich Schuchardt wrote: > Correct GD_FLG_CYCLIC_RUNNING documentation to match Sphinx style. > > Fixes: d7de5ef62935 ("cyclic: use a flag in gd->flags for recursion > protection") > Signed-off-by: Heinrich Schuchardt Ack, obviously. But now that I look in global_data.h

Re: [PATCH 0/6] broken CVE fix (b85d130ea0ca)

2022-11-28 Thread Rasmus Villemoes
On 17/11/2022 01.32, Fabio Estevam wrote: > On Mon, Nov 14, 2022 at 10:04 AM Tom Rini wrote: >> >> On Mon, Nov 14, 2022 at 10:35:51AM +0100, Rasmus Villemoes wrote: >>> On 14/10/2022 19.43, Rasmus Villemoes wrote: >>>> tl;dr: b85d130ea0ca didn't fix the C

Re: [PATCH] crypto/fsl: fsl_hash: Fix dcache issue in caam_hash_finish

2022-05-11 Thread Rasmus Villemoes
On 11/05/2022 10.53, Gaurav Jain wrote: > HW accelerated hash operations are giving incorrect hash output. > so add flush and invalidate for input/output hash buffers. > > Fixes: 94e3c8c4fd (crypto/fsl - Add progressive hashing support using > hardware acceleration.) AFAICT, it takes somewhat mo

[PATCH] net: dwc_eth_qos: fix double resource leak in eqos_remove()

2022-05-11 Thread Rasmus Villemoes
Not only does eqos_remove() fail to free the buffers that have been allocated by eqos_probe_resources_core(), it repeats those allocations and thus drops twice as much memory on the floor. Signed-off-by: Rasmus Villemoes --- drivers/net/dwc_eth_qos.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] net: dwc_eth_qos: lift parsing of max-speed DT property to common code

2022-05-11 Thread Rasmus Villemoes
of a phy_set_supported() call in eqos_start(), but the max-speed DT property is currently only parsed in eqos_probe_resources_stm32(). Lift that parsing to eqos_probe(). Signed-off-by: Rasmus Villemoes --- drivers/net/dwc_eth_qos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 0/3] dwc_eth_qos PHY dt node fixups

2022-05-12 Thread Rasmus Villemoes
any extra code since it just returns an extra piece of inforamtion that eth_phy_get_node() already found). And the third hooks it up in the dwc_eth_qos driver. Rasmus Villemoes (3): net: dwc_eth_qos: remove use of DWC_NET_PHYADDR phy: introduce eth_phy_get_node_and_addr() net: dwc_eth_qos

[PATCH 1/3] net: dwc_eth_qos: remove use of DWC_NET_PHYADDR

2022-05-12 Thread Rasmus Villemoes
d does have a phy sitting at address 4 (and it also has a corresponding legacy #define CONFIG_FEC_MXC_PHYADDR 4). So I believe it should be completely safe to remove it from there as well. Signed-off-by: Rasmus Villemoes --- drivers/net/dwc_eth_qos.c| 3 --- include/configs/imx8mp_evk.h

[PATCH 2/3] phy: introduce eth_phy_get_node_and_addr()

2022-05-12 Thread Rasmus Villemoes
., add the fixed-link support). Signed-off-by: Rasmus Villemoes --- drivers/net/eth-phy-uclass.c | 9 - include/eth_phy.h| 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/eth-phy-uclass.c b/drivers/net/eth-phy-uclass.c index 27b77444a0..05e1de8

[PATCH 3/3] net: dwc_eth_qos: set proper DT node for phy device

2022-05-12 Thread Rasmus Villemoes
ti,dp83867 phy sitting in front of the eqos interface. Signed-off-by: Rasmus Villemoes --- drivers/net/dwc_eth_qos.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 27b3f98e0e..af35960b42 100644 --- a/drivers/net

[PATCH] phy: dp83867: add dp83867_{read,write}_mmd helpers

2022-05-17 Thread Rasmus Villemoes
the advantage of avoiding passing the DP83867_DEVADDR argument at all call sites, which allows lines to be unwrapped (and probably also gives a little .text reduction by itself). Signed-off-by: Rasmus Villemoes --- drivers/net/phy/dp83867.c | 52 +++ 1 file

[PATCH] fdtdec: drop needlessly convoluted CONFIG_PHANDLE_CHECK_SEQ

2022-05-19 Thread Rasmus Villemoes
dle() returns 0 for both. Since the proper check is so simple, there's no reason to hide that behind a config option (and if one really wanted that, it should be called something else because there's no need to involve phandle in the check). Signed-off-by: Rasmus Villemoes --- config

Re: [PATCH] fdtdec: drop needlessly convoluted CONFIG_PHANDLE_CHECK_SEQ

2022-05-19 Thread Rasmus Villemoes
On 19/05/2022 12.41, Aswath Govindraju wrote: > Hi Rasmus, > > On 19/05/22 14:40, Rasmus Villemoes wrote: >> Asking if the alias we found actually points at the device tree node >> we passed in (in the guise of its offset from blob) can be done simply >> by asking if t

Re: [PATCH] fdtdec: drop needlessly convoluted CONFIG_PHANDLE_CHECK_SEQ

2022-05-19 Thread Rasmus Villemoes
On 19/05/2022 13.50, Aswath Govindraju wrote: > Understood, thanks for the explanation. I am good with this patch. > > Acked-by: Aswath Govindraju > Thanks. For completeness, to expand on this: >> it's somewhat fragile to rely on (at least one of) the >> nodes in question to even have a phan

[PATCH] common/board_r.c: drop legacy and unused bi_enetaddr

2022-05-20 Thread Rasmus Villemoes
if the board doesn't, this code runs before initr_net() -> eth_initialize(), and thus before the code in eth-uclass which fetches MAC addresses from eeprom, fuses or whatnot and populates the (run-time) environment with those values. Signed-off-by: Rasmus Villemoes --- common/b

dwc_eth_qos driver for tegra

2022-05-23 Thread Rasmus Villemoes
Hi I'm looking at switching the dwc_eth_qos driver over to use dm_eth_phy_connect(). However, I'm a little puzzled by the code for the tegra variant. The comment at the top of the file, as well as tegra186.dtsi, says phy-mode = "rgmii"; But eqos_get_interface_tegra186() returns a hard-coded PH

Re: dwc_eth_qos driver for tegra

2022-05-23 Thread Rasmus Villemoes
On 23/05/2022 12.57, Marek Vasut wrote: > On 5/23/22 11:17, Rasmus Villemoes wrote: >> Hi > > Hi, > >> I'm looking at switching the dwc_eth_qos driver over to use >> dm_eth_phy_connect(). However, I'm a little puzzled by the code for the >> tegra v

Re: [PATCH] phy: dp83867: add dp83867_{read,write}_mmd helpers

2022-05-24 Thread Rasmus Villemoes
On 19/05/2022 16.38, Vladimir Oltean wrote: > Hi Rasmus, > > On Tue, May 17, 2022 at 04:27:06PM +0200, Rasmus Villemoes wrote: >> Since the phy_{read,write}_mmd functions are static inlines using >> other static inline functions, they cause code using them to explode.

Re: [PATCH 2/2] pmic: pca9450: drop pointless .data entries

2022-06-02 Thread Rasmus Villemoes
On 02/06/2022 02.30, Jaehoon Chung wrote: > Dear Rasums, > > On 5/17/22 08:44, Jaehoon Chung wrote: >> On 5/3/22 17:58, Rasmus Villemoes wrote: >>> These are the i2c addresses of the chips, but that comes from device >>> tree. Having that information du

Re: [PATCH] crypto: fsl_hash: Remove unnecessary alignment check in caam_hash()

2022-06-06 Thread Rasmus Villemoes
On 29/04/2022 15.34, Stefan Roese wrote: > While working on an LX2160 based board and updating to latest mainline > I noticed problems using the HW accelerated hash functions on this > platform, when trying to boot a FIT Kernel image. Here the resulting > error message: > >Using 'conf-freescal

Re: [PATCH] fdtdec: drop needlessly convoluted CONFIG_PHANDLE_CHECK_SEQ

2022-06-11 Thread Rasmus Villemoes
On 08/06/2022 16.18, eugen.hris...@microchip.com wrote: > On 5/19/22 3:16 PM, Rasmus Villemoes wrote: >> On 19/05/2022 13.50, Aswath Govindraju wrote: >> >>> Understood, thanks for the explanation. I am good with this patch. >>> >>> Acked-by: Aswa

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 mailing

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 I

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 01/10] watchdog: wdt-uclass.c: use wdt_start() in wdt_expire_now()

2021-08-02 Thread Rasmus Villemoes
ard 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 1733

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

2021-08-02 Thread Rasmus Villemoes
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 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 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 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 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 07/10] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()

2021-08-02 Thread Rasmus Villemoes
" boolean 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/w

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

2021-08-02 Thread Rasmus Villemoes
bnHkg4qry+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: S

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

2021-08-02 Thread Rasmus Villemoes
class+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 change

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

2021-08-02 Thread Rasmus Villemoes
: 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

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

2021-08-02 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. W

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.

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 s

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

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 a

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

2021-08-10 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-10 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

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

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

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

2021-08-11 Thread Rasmus Villemoes
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 01/12] watchdog: wdt-uclass.c: use wdt_start() in wdt_expire_now()

2021-08-11 Thread Rasmus Villemoes
ard 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 1733

[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 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 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 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 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 07/12] watchdog: wdt-uclass.c: add wdt_stop_all() helper

2021-08-11 Thread Rasmus Villemoes
ered. Signed-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

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

2021-08-11 Thread Rasmus Villemoes
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 v5 09/12] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()

2021-08-11 Thread Rasmus Villemoes
" boolean 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 i

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

2021-08-11 Thread Rasmus Villemoes
class+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 change

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

2021-08-11 Thread Rasmus Villemoes
bnHkg4qry+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: S

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

2021-08-11 Thread Rasmus Villemoes
: 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

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" > + de

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, &uc); >> +if (ret) { >> +log_debug("Error getting UCLASS_WDT: %d\n", ret); >> +return 0; >>

[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 01/12] watchdog: wdt-uclass.c: use wdt_start() in wdt_expire_now()

2021-08-19 Thread Rasmus Villemoes
ard 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 1733

[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 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 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 09/12] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()

2021-08-19 Thread Rasmus Villemoes
" boolean 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 i

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