[PATCH v1 4/6] watchdog: Get rid of ASSEMBLY hacks

2022-09-02 Thread Stefan Roese
Only one occurance of WATCHDOG_RESET is left in one assembler file. This patch changes this occurance to a direct call to watchdog_reset and then removes all the ASSEMBLY ifdef'ery in watchdog.h, as it's not needed any more to clean this mess a bit up. Signed-off-by: Stefan Roese --

[PATCH v1 5/6] watchdog: Remove WATCHDOG_RESET macro

2022-09-02 Thread Stefan Roese
Now that we've globally replaced all WATCHDOG_RESET occurances, let's remove the ugly macro itself in the header. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v1: - Add Simon's SoB tag include/watchdog.h | 36 1 file change

[PATCH v1 2/6] cyclic: Introduce schedule() function

2022-09-02 Thread Stefan Roese
This patch introduces a schedule() function, which shall be used instead of the old WATCHDOG_RESET. Follow-up patches will make sure, that this new function is used. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v1: - Add Simon's SoB tag - Add more comments in the header to

[PATCH v1 0/6] Migrate watchdog reset to cyclic infrastructure

2022-09-02 Thread Stefan Roese
nks, Stefan Stefan Roese (6): watchdog: Integrate watchdog triggering into the cyclic framework cyclic: Introduce schedule() function cyclic: Use schedule() instead of WATCHDOG_RESET() watchdog: Get rid of ASSEMBLY hacks watchdog: Remove WATCHDOG_RESET macro watchdog: Further cleanup ar

[PATCH v1 1/6] watchdog: Integrate watchdog triggering into the cyclic framework

2022-09-02 Thread Stefan Roese
igned-off-by: Stefan Roese --- v1: - Reword WDT logging at startup as suggested by Rasmus - Fail upon !priv->cyclic initr_watchdog() - Remove some superflous checks in wdt_cyclic() drivers/watchdog/Kconfig | 2 + drivers/watchdog/wdt-uclass.c | 73 ---

[PATCH v6 8/8] cyclic: Add a simple test

2022-09-02 Thread Stefan Roese
Add a test for cyclic function registration and activation. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v6: - No change v5: - Set 'cyclic_active' to false before registering the test - Use WATCHDOG_RESET() instead of mdelay() - Use COMMON_TEST() - Added Simon's RB

[PATCH v6 7/8] cyclic: Add documentation

2022-09-02 Thread Stefan Roese
Add documentation for the cyclic function infrastructure, including the cyclic command. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v6: - No change v5: - No change v4: - Minor spelling fix - Added Simon's RB tag v3: - New patch doc/develop/cyclic.rst

[PATCH v6 2/8] cyclic: Add basic support for cyclic function execution infrastruture

2022-09-02 Thread Stefan Roese
o get scheduled and executed at their configured periods. This cyclic infrastructure will be used by a board specific function on the NIC23 MIPS Octeon board, which needs to check periodically, if a PCIe FLR has occurred. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v6: - Move stati

[PATCH v6 5/8] cyclic: Add 'cyclic list' and 'cyclic demo' commands

2022-09-02 Thread Stefan Roese
The only thing this function does is delaying by 'delay_us' microseconds. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v6: - Use cyclic_get_list() - Use div64 macros for division and remainder v5: - Add 'cyclic demo' command v4: - Add 'default y' in Kc

[PATCH v6 3/8] cyclic: Integrate cyclic infrastructure into WATCHDOG_RESET

2022-09-02 Thread Stefan Roese
periods. If CONFIG_WATCHDOG is not enabled, only cyclic_run() without calling watchdog_reset(). This guarantees that the cyclic functionality does not rely on CONFIG_WATCHDOG being enabled. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v6: - No change v5: - No change v4: - Added

[PATCH v6 4/8] cyclic: Integrate cyclic functionality at bootup in board_r/f

2022-09-02 Thread Stefan Roese
This patch adds a call to cyclic_init() to board_f/r.c, enabling the common cyclic infrastructure. After this it's possible to add cyclic functions via cyclic_register(). Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v6: - Move cyclic_init() in board_r.c after initr_malloc, as w

[PATCH v6 6/8] mips: octeon_nic23: Add PCIe FLR fixup via cyclic infrastructure

2022-09-02 Thread Stefan Roese
function gets called every 100us, which is needed to detect this FLR issue. Signed-off-by: Aaron Williams Signed-off-by: Stefan Roese --- v6: - No change v5: - No change v4: - Rename cyclic_struct to cyclic_info v3: - No change v2: - No change board/Marvell/octeon_nic23/board.c | 197

[PATCH v6 0/8] Add support for cyclic function execution infrastruture

2022-09-02 Thread Stefan Roese
nds (for testing etc). Here the Azure build, without any issues: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=256&view=results Aaron Williams (1): mips: octeon_nic23: Add PCIe FLR fixup via cyclic infrastructure Stefan Roese (7): time: Import time_after64() and friends from L

[PATCH v6 1/8] time: Import time_after64() and friends from Linux

2022-09-02 Thread Stefan Roese
. These macros were copied from include/linux/jiffies.h of Linux 5.18. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v6: - No change v5: - No change v4: - Added Simon's RB tag v3: - No change v2: - No change include/time.h | 19 +++ 1 file changed, 19 inser

Re: [PATCH v2 1/8] timer: orion-timer: Use timer_conv_64() to fix timer wrap around

2022-09-02 Thread Stefan Roese
On 02.09.22 09:44, Michael Walle wrote: Am 2022-09-02 08:25, schrieb Stefan Roese: While testing on some Kirkwood platforms it was noticed that the timer did not function correctly all the time. The driver did not correctly handle 32bit timer value wrap arounds. Using the timer_conv_64

Re: [RFC PATCH 8/8] WIP: .azure-pipelines.yml: Remove evb-ast2600

2022-09-02 Thread Stefan Roese
Hi Joel, On 02.09.22 08:14, Stefan Roese wrote: Hi Joel, On 02.09.22 08:00, Joel Stanley wrote: On Fri, 2 Sept 2022 at 04:09, Joel Stanley wrote: On Mon, 29 Aug 2022 at 06:23, Stefan Roese wrote: The evb-ast2600 target always runs into an timeout error when run via Azure CI. For test

[PATCH v2 8/8] kirkwood: lsxl: Sync defconfigs

2022-09-01 Thread Stefan Roese
With the recent changes in the Orion timer driver Kconfig setup, the board specific enabling is not needed any more. This patch sync's these 2 boards with their current defconfig version. Signed-off-by: Stefan Roese Cc: Michael Walle --- v2: - New patch configs/lschlv2_defconfi

[PATCH v2 7/8] arm: mvebu: dts: mvebu-u-boot.dtsi: Add "u-boot, dm-pre-reloc" to timer DT node

2022-09-01 Thread Stefan Roese
Adding the "u-boot,dm-pre-reloc" DT property to the timer node is necesssary to support the timer in the early boot phases (e.g. SPL & pre-reloc). Signed-off-by: Stefan Roese --- v2: - No change arch/arm/dts/mvebu-u-boot.dtsi | 11 +++ 1 file changed, 11 insertions(+)

[PATCH v2 6/8] arm: mvebu: dts: armada-375.dtsi: Add timer0 & timer1

2022-09-01 Thread Stefan Roese
Add the DT bindings / descriptions for timer0 & timer1, exactly as done in mainline Linux. Signed-off-by: Stefan Roese --- v2: - No change arch/arm/dts/armada-375.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/armada-375.dtsi b/arch/arm/dts/armada

[PATCH v2 3/8] timer: orion-timer: Add timer_get_boot_us() for BOOTSTAGE support

2022-09-01 Thread Stefan Roese
Add timer_get_boot_us() to support boards, that have CONFIG_BOOTSTAGE enabled, like pogo_v4. Signed-off-by: Stefan Roese --- v2: - Change timer_get_boot_us() to use the timer_early functions - Remove #if CONFIG_IS_ENABLED(BOOTSTAGE) Simon, I'm currently looking into this timer_get_boot_us

[PATCH v2 2/8] timer: orion-timer: Add support for other Armada SoC's

2022-09-01 Thread Stefan Roese
This patch adds support for other Marvell Armada SoC's, supporting the 25MHz fixed clock operation, like the Armada XP etc. Signed-off-by: Stefan Roese --- v2: - Use timer_conv_64() in timer_early_get_count() drivers/timer/Kconfig | 5 - drivers/timer/orion-timer.c

[PATCH v2 4/8] arm: mvebu: Use CONFIG_TIMER on all MVEBU & KIRKWOOD platforms

2022-09-01 Thread Stefan Roese
Now that the new timer support is available for these platforms, let's select this IF for all these platforms. This way it's not necessary that each board changes it's config header. Signed-off-by: Stefan Roese --- v2: - No change arch/arm/Kconfig | 4

[PATCH v2 5/8] arm: mvebu: dts: Makefile: Compile Armada 375 dtb in a separate step

2022-09-01 Thread Stefan Roese
This patch changes the compilation, so that the Armada 375 board(s) are compiled in a separate step. This is necessary for the timer dts conversion, as A375 has a different / timer description in the dts. Signed-off-by: Stefan Roese --- v2: - No change arch/arm/dts/Makefile | 6 +- 1 file

[PATCH v2 1/8] timer: orion-timer: Use timer_conv_64() to fix timer wrap around

2022-09-01 Thread Stefan Roese
: Stefan Roese --- v2: - New patch drivers/timer/orion-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/timer/orion-timer.c b/drivers/timer/orion-timer.c index fd30e1bf036c..d7d1a1b24462 100644 --- a/drivers/timer/orion-timer.c +++ b/drivers/timer/orion-timer.c

[PATCH v2 0/8] Enable CONFIG_TIMER for all Kirkwood / MVEBU boards

2022-09-01 Thread Stefan Roese
s hacking, so that the timer DT node is available in early U-Boot stages. I've successfully tested this patchset on an Armada XP board. Additional test on other boards and platforms are very welcome and necessary. Thanks, Stefan Stefan Roese (8): timer: orion-timer: Use timer_conv_64() to

Re: [RFC PATCH 8/8] WIP: .azure-pipelines.yml: Remove evb-ast2600

2022-09-01 Thread Stefan Roese
Hi Joel, On 02.09.22 08:00, Joel Stanley wrote: On Fri, 2 Sept 2022 at 04:09, Joel Stanley wrote: On Mon, 29 Aug 2022 at 06:23, Stefan Roese wrote: The evb-ast2600 target always runs into an timeout error when run via Azure CI. For test purpose only, this patch removes this CI build

Re: [PATCH 0/6] Enable CONFIG_TIMER for all Kirwood / MVEBU boards

2022-09-01 Thread Stefan Roese
Hi Stefan, On 01.09.22 13:52, Stefan Herbrechtsmeier wrote: Hi, Am 01.09.2022 um 11:27 schrieb Stefan Roese: Hi Tony, On 01.09.22 09:39, Tony Dinh wrote: Some ideas. The get_timer() function looks wrong assigning an uint64_t to ulong. lib/time.c   static uint64_t notrace

Re: [PATCH] arm: orion5: Completely remove Orion5 platform support

2022-09-01 Thread Stefan Roese
Hi Mauri, On 01.09.22 16:23, Mauri Sandberg wrote: Hi Stefan! On 1.9.2022 12.06, Stefan Roese wrote: Hi Mauri, On 01.09.22 11:03, Pali Rohár wrote: + Mauri I think that we could wait a bit as Mauri is interested in Orion support and in last weeks we have been debugging and adding Orion

Re: [PATCH 0/6] Enable CONFIG_TIMER for all Kirwood / MVEBU boards

2022-09-01 Thread Stefan Roese
Hi Tony, On 01.09.22 09:39, Tony Dinh wrote: Some ideas. The get_timer() function looks wrong assigning an uint64_t to ulong. lib/time.c static uint64_t notrace tick_to_time(uint64_t tick) uint64_t notrace get_ticks(void) uint64_t __weak notrace get_ticks(void) ulo

Re: [PATCH] arm: orion5: Completely remove Orion5 platform support

2022-09-01 Thread Stefan Roese
Roese wrote: As there is no Orion5 based target in mainline U-Boot any more, let's completely remove the support for this pretty old Marvell platform. Signed-off-by: Stefan Roese Cc: Tony Dinh Cc: Pali Rohár Cc: Michael Walle --- arch/arm/Kconfig | 9 -

Re: [PATCH] arm: orion5: Completely remove Orion5 platform support

2022-09-01 Thread Stefan Roese
On 01.09.22 11:00, Michael Walle wrote: Am 2022-09-01 10:53, schrieb Stefan Roese: As there is no Orion5 based target in mainline U-Boot any more, let's completely remove the support for this pretty old Marvell platform. Signed-off-by: Stefan Roese Cc: Tony Dinh Cc: Pali Rohár Cc: Mi

[PATCH] arm: orion5: Completely remove Orion5 platform support

2022-09-01 Thread Stefan Roese
As there is no Orion5 based target in mainline U-Boot any more, let's completely remove the support for this pretty old Marvell platform. Signed-off-by: Stefan Roese Cc: Tony Dinh Cc: Pali Rohár Cc: Michael Walle --- arch/arm/Kconfig | 9 - arch/arm/Mak

Re: [PATCH 2/6] timer: orion-timer: Add timer_get_boot_us() for BOOTSTAGE support

2022-08-31 Thread Stefan Roese
Hi Simon, On 31.08.22 19:44, Simon Glass wrote: It is needed because bootstage is called before driver model is ready. In fact it can be used to time driver model things. I see, makes sense. This brings up my next questions though, why isn't CONFIG_TIMER_EARLY enough in this case? AFAICT it

Re: [PATCH 0/6] Enable CONFIG_TIMER for all Kirwood / MVEBU boards

2022-08-31 Thread Stefan Roese
Hi Tony, On 31.08.22 08:30, Tony Dinh wrote: Hi Stefan, On Tue, Aug 30, 2022 at 10:08 PM Stefan Roese wrote: Hi Tony, On 31.08.22 07:02, Stefan Roese wrote: Hi Tony, On 31.08.22 00:15, Tony Dinh wrote: Hi Stefan, On Tue, Aug 30, 2022 at 4:53 AM Stefan Roese wrote: This patchset

Re: [PATCH 0/6] Enable CONFIG_TIMER for all Kirwood / MVEBU boards

2022-08-30 Thread Stefan Roese
Hi Tony, On 31.08.22 07:08, Stefan Roese wrote: Hi Tony, On 31.08.22 07:02, Stefan Roese wrote: Hi Tony, On 31.08.22 00:15, Tony Dinh wrote: Hi Stefan, On Tue, Aug 30, 2022 at 4:53 AM Stefan Roese wrote: This patchset enhaces the recently added Orion Timer driver to support all other

Re: [PATCH 2/6] timer: orion-timer: Add timer_get_boot_us() for BOOTSTAGE support

2022-08-30 Thread Stefan Roese
Hi Simon, On 30.08.22 17:56, Simon Glass wrote: Hi Stefan, On Tue, 30 Aug 2022 at 06:08, Stefan Roese wrote: Adding Simon to Cc... On 30.08.22 14:00, Michael Walle wrote: Am 2022-08-30 13:53, schrieb Stefan Roese: Add timer_get_boot_us() to support boards, that have CONFIG_BOOTSTAGE

Re: [PATCH 0/6] Enable CONFIG_TIMER for all Kirwood / MVEBU boards

2022-08-30 Thread Stefan Roese
Hi Tony, On 31.08.22 07:02, Stefan Roese wrote: Hi Tony, On 31.08.22 00:15, Tony Dinh wrote: Hi Stefan, On Tue, Aug 30, 2022 at 4:53 AM Stefan Roese wrote: This patchset enhaces the recently added Orion Timer driver to support all other Kirkwood & 32bit MVEBU Armada platf

Re: [PATCH 0/6] Enable CONFIG_TIMER for all Kirwood / MVEBU boards

2022-08-30 Thread Stefan Roese
Hi Tony, On 31.08.22 00:15, Tony Dinh wrote: Hi Stefan, On Tue, Aug 30, 2022 at 4:53 AM Stefan Roese wrote: This patchset enhaces the recently added Orion Timer driver to support all other Kirkwood & 32bit MVEBU Armada platforms. Additionally, this timer support is then enabled per def

Re: [PATCH] arm: mvebu: turris_mox: Add support for distroboot $fdt_addr

2022-08-30 Thread Stefan Roese
0 CPU does not allow mapping SPI NOR memory into physical address space like on other architectures and therefore set $fdt_addr variable to memory range in RAM and loads this DTB binary from SPI NOR in misc_init_r() function. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Than

Re: [PATCH] arm: mvebu: turris_{omnia, mox}: Reset bootdelay env for rescue

2022-08-30 Thread Stefan Roese
). Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Thanks, Stefan --- board/CZ.NIC/turris_mox/turris_mox.c | 5 +++-- board/CZ.NIC/turris_omnia/turris_omnia.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board

Re: [PATCH] board: turris: Initialize serial# env

2022-08-30 Thread Stefan Roese
is called at later stage and which ensures that serial number is correctly stored into env. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Thanks, Stefan --- board/CZ.NIC/turris_atsha_otp.c | 33 +--- board/CZ.NIC/turris_atsha_otp.h | 3

Re: [PATCH] arm: mvebu: Espressobin: When emmc is not present disable it also in OF_LIVE

2022-08-30 Thread Stefan Roese
On 27.08.22 14:00, Pali Rohár wrote: Signed-off-by: Pali Rohár As mentioned by Simon, please add a short sentence in the commit text as well. Other than that: Reviewed-by: Stefan Roese Thanks, Stefan --- board/Marvell/mvebu_armada-37xx/board.c | 2 ++ 1 file changed, 2 insertions

Re: [PATCH 3/6] arm: mvebu: Use CONFIG_TIMER on all MVEBU & KIRKWOOD platforms

2022-08-30 Thread Stefan Roese
On 30.08.22 14:04, Michael Walle wrote: Am 2022-08-30 13:53, schrieb Stefan Roese: Now that the new timer support is available for these platforms, let's select this IF for all these platforms. This way it's not necessary that each board changes it's config header. Signed-off-b

Re: [PATCH 2/6] timer: orion-timer: Add timer_get_boot_us() for BOOTSTAGE support

2022-08-30 Thread Stefan Roese
Adding Simon to Cc... On 30.08.22 14:00, Michael Walle wrote: Am 2022-08-30 13:53, schrieb Stefan Roese: Add timer_get_boot_us() to support boards, that have CONFIG_BOOTSTAGE enabled, like pogo_v4. Signed-off-by: Stefan Roese ---  drivers/timer/orion-timer.c | 22 ++  1

[PATCH 6/6] arm: mvebu: dts: mvebu-u-boot.dtsi: Add "u-boot, dm-pre-reloc" to timer DT node

2022-08-30 Thread Stefan Roese
Adding the "u-boot,dm-pre-reloc" DT property to the timer node is necesssary to support the timer in the early boot phases (e.g. SPL & pre-reloc). Signed-off-by: Stefan Roese --- arch/arm/dts/mvebu-u-boot.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/a

[PATCH 3/6] arm: mvebu: Use CONFIG_TIMER on all MVEBU & KIRKWOOD platforms

2022-08-30 Thread Stefan Roese
Now that the new timer support is available for these platforms, let's select this IF for all these platforms. This way it's not necessary that each board changes it's config header. Signed-off-by: Stefan Roese --- arch/arm/Kconfig | 4 arch/arm/mac

[PATCH 2/6] timer: orion-timer: Add timer_get_boot_us() for BOOTSTAGE support

2022-08-30 Thread Stefan Roese
Add timer_get_boot_us() to support boards, that have CONFIG_BOOTSTAGE enabled, like pogo_v4. Signed-off-by: Stefan Roese --- drivers/timer/orion-timer.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/timer/orion-timer.c b/drivers/timer/orion-timer.c index

[PATCH 5/6] arm: mvebu: dts: armada-375.dtsi: Add timer0 & timer1

2022-08-30 Thread Stefan Roese
Add the DT bindings / descriptions for timer0 & timer1, exactly as done in mainline Linux. Signed-off-by: Stefan Roese --- arch/arm/dts/armada-375.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/armada-375.dtsi b/arch/arm/dts/armada-375.dtsi i

[PATCH 4/6] arm: mvebu: dts: Makefile: Compile Armada 375 dtb in a separate step

2022-08-30 Thread Stefan Roese
This patch changes the compilation, so that the Armada 375 board(s) are compiled in a separate step. This is necessary for the timer dts conversion, as A375 has a different / timer description in the dts. Signed-off-by: Stefan Roese --- arch/arm/dts/Makefile | 6 +- 1 file changed, 5

[PATCH 1/6] timer: orion-timer: Add support for other Armada SoC's

2022-08-30 Thread Stefan Roese
This patch adds support for other Marvell Armada SoC's, supporting the 25MHz fixed clock operation, like the Armada XP etc. Signed-off-by: Stefan Roese --- drivers/timer/Kconfig | 5 - drivers/timer/orion-timer.c | 44 ++--- 2 files change

[PATCH 0/6] Enable CONFIG_TIMER for all Kirwood / MVEBU boards

2022-08-30 Thread Stefan Roese
s hacking, so that the timer DT node is available in early U-Boot stages. I've successfully tested this patchset on an Armada XP board. Additional test on other boards and platforms are very welcome and necessary. Thanks, Stefan Stefan Roese (6): timer: orion-timer: Add support for othe

Re: [PATCH v2] pci: Do not enable PCIe GEN3 link retrain workaround by default

2022-08-30 Thread Stefan Roese
On 30.08.22 11:19, Pali Rohár wrote: On Tuesday 30 August 2022 10:04:51 Maciej W. Rozycki wrote: On Sat, 27 Aug 2022, Pali Rohár wrote: Moreover this workaround is enabled for all existing hardware and also all future PCIe hardware, which opens a hole that other PCIe vendors may introduce same

Re: mvebu - switch to orion-timer

2022-08-29 Thread Stefan Roese
Hi Michael, Pali, Tony & all, On 24.08.22 09:35, Michael Walle wrote: Hi, On 24.08.22 00:33, Pali Rohár wrote: Hello Stefan! Now when U-Boot contains new orion-timer.c driver, which Michael wrote, I think that it mvebu platform should switch to use it. Because build process for armada boards

Re: [RFC PATCH 5/8] watchdog: Get rid of ASSEMBLY hacks

2022-08-29 Thread Stefan Roese
On 29.08.22 09:50, Rasmus Villemoes wrote: On 29/08/2022 08.23, Stefan Roese wrote: Only one occurance of WATCHDOG_RESET is left in one assembler file. This patch changes this occurance to a direct call to watchdog_reset Well... and then removes all the ASSEMBLY ifdef'ery in watchdog.

Re: [RFC PATCH 2/8] watchdog: Integrate watchdog triggering into the cyclic framework

2022-08-29 Thread Stefan Roese
On 29.08.22 09:38, Rasmus Villemoes wrote: On 29/08/2022 08.23, Stefan Roese wrote: This patch integrates the watchdog triggering into the recently added cyclic infrastructure. Each watchdog device that shall be triggered registers it's own cyclic function. This way, multiple watchdog de

[RFC PATCH 4/8] cyclic: Use schedule() instead of WATCHDOG_RESET()

2022-08-28 Thread Stefan Roese
Globally replace all occurances of WATCHDOG_RESET() with schedule(), which handles the HW_WATCHDOG functionality and the cyclic infrastructure. Signed-off-by: Stefan Roese --- arch/arm/mach-at91/phy.c | 2 +- arch/arm/mach-imx/i2c-mxv7.c | 2 +- arch/arm

[RFC PATCH 7/8] watchdog: Further cleanup

2022-08-28 Thread Stefan Roese
Remove some now unused macros and #ifdef's. Signed-off-by: Stefan Roese --- include/watchdog.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/watchdog.h b/include/watchdog.h index 91506d3327a8..ac5f11e376fa 100644 --- a/include/watchdog.h +++ b/in

[RFC PATCH 8/8] WIP: .azure-pipelines.yml: Remove evb-ast2600

2022-08-28 Thread Stefan Roese
build target here? Signed-off-by: Stefan Roese Cc: Joel Stanley Cc: Chia-Wei Wang --- .azure-pipelines.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 0fa92479b4c4..e48f1667f8de 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipeline

[RFC PATCH 5/8] watchdog: Get rid of ASSEMBLY hacks

2022-08-28 Thread Stefan Roese
Only one occurance of WATCHDOG_RESET is left in one assembler file. This patch changes this occurance to a direct call to watchdog_reset and then removes all the ASSEMBLY ifdef'ery in watchdog.h, as it's not needed any more to clean this mess a bit up. Signed-off-by: Stefan Roese

[RFC PATCH 6/8] watchdog: Remove WATCHDOG_RESET macro

2022-08-28 Thread Stefan Roese
Now that we've globally replaced all WATCHDOG_RESET occurances, let's remove the ugly macro itself in the header. Signed-off-by: Stefan Roese --- include/watchdog.h | 36 1 file changed, 36 deletions(-) diff --git a/include/watchdog.h b/include/

[RFC PATCH 3/8] cyclic: Introduce schedule() function

2022-08-28 Thread Stefan Roese
This patch introduces a schedule() function, which shall be used instead of the old WATCHDOG_RESET. Follow-up patches will make sure, that this new function is used. Signed-off-by: Stefan Roese --- common/cyclic.c | 11 +++ include/cyclic.h | 5 + 2 files changed, 16 insertions

[RFC PATCH 2/8] watchdog: Integrate watchdog triggering into the cyclic framework

2022-08-28 Thread Stefan Roese
igned-off-by: Stefan Roese --- drivers/watchdog/Kconfig | 2 + drivers/watchdog/wdt-uclass.c | 80 +-- 2 files changed, 50 insertions(+), 32 deletions(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 50e6a1efba51..e55deaf906b5 100644

[RFC PATCH 0/8] Migrate watchdog reset to cyclic infrastructure

2022-08-28 Thread Stefan Roese
uggestions are welcome. Thanks, Stefan Stefan Roese (8): cmd/cyclic: Use div64 macros for division and remainder watchdog: Integrate watchdog triggering into the cyclic framework cyclic: Introduce schedule() function cyclic: Use schedule() instead of WATCHDOG_RESET() watchdog: Get rid of AS

[RFC PATCH 1/8] cmd/cyclic: Use div64 macros for division and remainder

2022-08-28 Thread Stefan Roese
Use the do_div etc for divisions to fix the compile breakage seen on edison: cmd/cyclic.c:70: undefined reference to `__udivmoddi4' and for e.g. MIPS netgear_cg3100d_ram: cmd/cyclic.c:(.text.do_cyclic_list+0x180): undefined reference to `__umoddi3' Signed-off-by: Stefan Roese

Re: mvebu - switch to orion-timer

2022-08-23 Thread Stefan Roese
Hi Pali, On 24.08.22 00:33, Pali Rohár wrote: Hello Stefan! Now when U-Boot contains new orion-timer.c driver, which Michael wrote, I think that it mvebu platform should switch to use it. Because build process for armada boards prints deprecation warning that new timer is not being used. Could y

Please pull u-boot-marvell/master

2022-08-23 Thread Stefan Roese
Hi Tom, please pull this next batch of mostly Marvell related patches: - kirkwood: pogo_v4 & nsa310s: Add distro boot (Tony) - kirkwood: add DM timer support and use it on lsxl boards (Michael) - kirkwood: convert the Buffalo Links

Re: [PATCH 00/22] board: lsxl: major update and DM conversion

2022-08-23 Thread Stefan Roese
On 17.08.22 21:37, Michael Walle wrote: Convert the Buffalo Linkstation LS-CHLv2 and XHL boards to DM_GPIO, DM_ETH, DM_SERIAL and CONFIG_TIMER. Patches 01-02 fix TCLK handling on the kirkwood SoC if the clock is 166MHz. Patches 03-04 add CONFIG_TIMER support for kirkwood/mvebu. Patches 05-21 wil

Re: [RESEND PATCH] arm: kirkwood: nsa310s: Add Distro boot capability

2022-08-23 Thread Stefan Roese
"kernel=/boot/zImage\0" \ "fdt=/boot/nsa310s.dtb\0" \ - "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0" + "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0" \ + LOAD_ADDRESS_ENV_SETTINGS \ +

Re: [PATCH] arm: mvebu: mbus: Fix mbus driver to work also after U-Boot relocation

2022-08-23 Thread Stefan Roese
_sdram; - struct dentry *debugfs_devs; - const struct mvebu_mbus_soc_data *soc; - int hw_io_coherency; -}; - /* Flags for PCI/PCIe address decoding regions */ #define MVEBU_MBUS_PCI_IO 0x1 #define MVEBU_MBUS_PCI_MEM 0x2 @@ -67,7 +57,6 @@ int mvebu_mbus_add_window_remap_by_id(unsigned int

Re: [PATCH] arm: mvebu: turris_mox: Set "sfp" label in eth1 DT node when only Mox SFP is detected

2022-08-23 Thread Stefan Roese
return res; } res = fdt_status_okay_by_compatible(blob, "cznic,moxtet-gpio"); Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Ge

Re: [PATCH] arm: mvebu: turris_omnia: Show MCU version

2022-08-23 Thread Stefan Roese
", omnia_get_mcu_type()); + printf(" MCU version: %s\n", omnia_get_mcu_version()); printf(" RAM size: %i MiB\n", omnia_get_ram_size_gb() * 1024); if (err) printf(" Serial Number: unknown\n"); Viele Grüße, Stefan Roese -- DENX Softw

Re: [PATCH] arm: kirkwood: pogo_v4: Add Distro boot capability

2022-08-23 Thread Stefan Roese
"load usb 0:1 0x0110 /boot/uInitrd; " \ - "load usb 0:1 0x2c0 $dtb_file\0" + LOAD_ADDRESS_ENV_SETTINGS \ + "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ + "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ + "

Re: [PATCH] arm: mvebu: Define env_sf_get_env_addr() for all Armada boards in SPL

2022-08-23 Thread Stefan Roese
serdes_map_array, u8 *count) { #ifdef CONFIG_SPL_ENV_SUPPORT Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: s...@denx.de

Re: [PATCH v2 2/2] cmd: mvebu/bubt: Check for A38x/A37xx OTP secure bits and secure boot

2022-08-23 Thread Stefan Roese
On 23.08.22 14:44, Pali Rohár wrote: On Tuesday 23 August 2022 07:05:33 Stefan Roese wrote: Hi Pali, On 09.08.22 21:42, Pali Rohár wrote: For obvious reasons BootROMS rejects unsigned images when secure boot is enabled in OTP secure bits. So check for OPT secure bits and do not allow flashing

Re: [PATCH v2 1/2] cmd: mvebu/bubt: Check for A38x image data checksum

2022-08-23 Thread Stefan Roese
x image data checksum. 0x%08x != 0x%08x\n", + checksum32, exp_checksum32); + return -ENOEXEC; + } + printf("Image checksum...OK!\n"); return 0; } Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: s...@denx.de

Re: [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register

2022-08-23 Thread Stefan Roese
On 23.08.22 10:47, Pali Rohár wrote: On Tuesday 23 August 2022 10:24:10 mich...@walle.cc wrote: Am 2022-08-23 10:17, schrieb mich...@walle.cc: Am 2022-08-23 07:02, schrieb Stefan Roese: Hi Michael, On 17.08.22 21:37, Michael Walle wrote: From: Pali Rohár Bit 21 in SAR register specifies

Re: [PATCH v2 7/7] CI: Add Aspeed AST2600

2022-08-22 Thread Stefan Roese
Hi Joel, On 29.06.22 09:05, Joel Stanley wrote: The AST2600 has a Qemu model that allows testing. Create a SPI NOR image containing the combined SPL and u-boot FIT image. Reviewed-by: Chia-Wei Wang Reviewed-by: Cédric Le Goater Signed-off-by: Joel Stanley --- .azure-pipelines.yml | 3 +++

Re: [PATCH v2 2/2] cmd: mvebu/bubt: Check for A38x/A37xx OTP secure bits and secure boot

2022-08-22 Thread Stefan Roese
{ + if (boot_modes[secure_mode].id == otp_boot_device) + break; + } + printf("Error: boot source is set to \"%s\" in OTP but image is for \"%s\"!\n", +

Re: [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register

2022-08-22 Thread Stefan Roese
WIN_DISABLE KWCPU_WIN_DISABLE +#define CONFIG_SAR_REG (KW_MPP_BASE + 0x0030) + #if defined (CONFIG_KW88F6281) #include #elif defined (CONFIG_KW88F6192) Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Ki

Re: [PATCH] arm: kirkwood: Add CONFIG_SUPPORT_PASSING_ATAGS

2022-08-22 Thread Stefan Roese
On 17.08.22 23:59, Tony Dinh wrote: Add CONFIG_SUPPORT_PASSING_ATAGS and friends to support legacy image method of booting. Debian and OpenWrt installer use uImage with appended DTB for these Kirkwood boards. Signed-off-by: Tony Dinh Reviewed-by: Stefan Roese Thanks, Stefan

Re: [PATCH 00/22] board: lsxl: major update and DM conversion

2022-08-22 Thread Stefan Roese
arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi create mode 100644 arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi create mode 100644 drivers/timer/orion-timer.c Nice updates and conversion, thanks: Reviewed-by: Stefan Roese Thanks, Stefan

Re: [RESEND PATCH] arm: kirkwood: nsa310s: Add Distro boot capability

2022-08-22 Thread Stefan Roese
. OpenWrt) with appended DTB. - Add CONFIG_UBIFS_SILENCE_MSG to reduce binary size. Note that this patch is depended on the following patch: https://patchwork.ozlabs.org/project/uboot/patch/20220807192709.21717-1-p...@kernel.org/ Signed-off-by: Tony Dinh Reviewed-by: Stefan Roese Thanks

Re: [PATCH] arm: kirkwood: pogo_v4: Add Distro boot capability

2022-08-22 Thread Stefan Roese
CONFIG_UBIFS_SILENCE_MSG, and disable some unused configs to reduce binary size. Note that this patch is depended on the following patch: https://patchwork.ozlabs.org/project/uboot/patch/20220807192709.21717-1-p...@kernel.org/ Signed-off-by: Tony Dinh Reviewed-by: Stefan Roese Thanks, Stefan

[PATCH] tools: kwboot: Change KWBOOT_MSG_RSP_TIMEO_AXP to 10ms

2022-08-19 Thread Stefan Roese
Testing on the theadorable Armada XP platform has shown, thaz using the current value of 1000ms as response timeout does not result in reliable booting via kwboot. Using 10ms seems to be much better. So let's change this value to this 10ms instead. Signed-off-by: Stefan Roese --- tools/kwb

Re: Fix KWBOOT_MSG_RSP_TIMEO_AXP in kwboot for Armada XP

2022-08-19 Thread Stefan Roese
Hi Pali, On 16.08.22 20:41, Pali Rohár wrote: On Wednesday 01 June 2022 12:54:28 Pali Rohár wrote: On Wednesday 01 June 2022 12:44:01 Stefan Roese wrote: Hi Pali, On 01.06.22 12:27, Pali Rohár wrote: On Friday 06 May 2022 14:44:48 Pali Rohár wrote: On Friday 06 May 2022 14:35:55 Stefan

Re: [PATCH] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register

2022-08-17 Thread Stefan Roese
Hi Pali, On 17.08.22 10:36, Pali Rohár wrote: On Wednesday 17 August 2022 01:23:34 Michael Walle wrote: Am 2022-08-17 00:39, schrieb Pali Rohár: On Wednesday 17 August 2022 00:14:20 Pali Rohár wrote: On Tuesday 16 August 2022 23:34:13 Michael Walle wrote: Am 2022-08-16 22:00, schrieb Pali Ro

Re: [PATCH RFC] Makefile: Rename u-boot-spl.kwb to u-boot-with-spl.kwb

2022-08-17 Thread Stefan Roese
sense to me. It might break some out-of-tree building scripts, but I think we should go forward this way: Reviewed-by: Stefan Roese Thanks, Stefan --- Kconfig | 2 +- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Kconfig b/Kconfig index 991b260182e8

[PATCH v5 8/8] cyclic: Add a simple test

2022-08-17 Thread Stefan Roese
Add a test for cyclic function registration and activation. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v5: - Set 'cyclic_active' to false before registering the test - Use WATCHDOG_RESET() instead of mdelay() - Use COMMON_TEST() - Added Simon's RB tag v4: - N

[PATCH v5 7/8] cyclic: Add documentation

2022-08-17 Thread Stefan Roese
Add documentation for the cyclic function infrastructure, including the cyclic command. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v5: - No change v4: - Minor spelling fix - Added Simon's RB tag v3: - New patch doc/develop/cyclic.rst

[PATCH v5 6/8] mips: octeon_nic23: Add PCIe FLR fixup via cyclic infrastructure

2022-08-17 Thread Stefan Roese
function gets called every 100us, which is needed to detect this FLR issue. Signed-off-by: Aaron Williams Signed-off-by: Stefan Roese --- v5: - No change v4: - Rename cyclic_struct to cyclic_info v3: - No change v2: - No change board/Marvell/octeon_nic23/board.c | 197

[PATCH v5 2/8] cyclic: Add basic support for cyclic function execution infrastruture

2022-08-17 Thread Stefan Roese
o get scheduled and executed at their configured periods. This cyclic infrastructure will be used by a board specific function on the NIC23 MIPS Octeon board, which needs to check periodically, if a PCIe FLR has occurred. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v5: - No chang

[PATCH v5 3/8] cyclic: Integrate cyclic infrastructure into WATCHDOG_RESET

2022-08-17 Thread Stefan Roese
periods. If CONFIG_WATCHDOG is not enabled, only cyclic_run() without calling watchdog_reset(). This guarantees that the cyclic functionality does not rely on CONFIG_WATCHDOG being enabled. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v5: - No change v4: - Added Simon's RB ta

[PATCH v5 5/8] cyclic: Add 'cyclic list' and 'cyclic demo' commands

2022-08-17 Thread Stefan Roese
The only thing this function does is delaying by 'delay_us' microseconds. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v5: - Add 'cyclic demo' command v4: - Add 'default y' in Kconfig and extend help text - Minor spelling fix - Added Simon&#x

[PATCH v5 4/8] cyclic: Integrate cyclic functionality at bootup in board_r/f

2022-08-17 Thread Stefan Roese
This patch adds a call to cyclic_init() to board_f/r.c, enabling the common cyclic infrastructure. After this it's possible to add cyclic functions via cyclic_register(). Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v5: - No change v4: - Added Simon's RB tag v3: - No

[PATCH v5 0/8] Add support for cyclic function execution infrastruture

2022-08-17 Thread Stefan Roese
nds (for testing etc). Here the Azure build, without any issues: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=229&view=results Aaron Williams (1): mips: octeon_nic23: Add PCIe FLR fixup via cyclic infrastructure Stefan Roese (7): time: Import time_after64() and friends from L

[PATCH v5 1/8] time: Import time_after64() and friends from Linux

2022-08-17 Thread Stefan Roese
. These macros were copied from include/linux/jiffies.h of Linux 5.18. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v5: - No change v4: - Added Simon's RB tag v3: - No change v2: - No change include/time.h | 19 +++ 1 file changed, 19 insertions(+) diff --

Re: [PATCH] board/km: remove kirkwood boards

2022-08-16 Thread Stefan Roese
On 15.08.22 08:35, Holger Brunck wrote: These boards are out of maintenance and can be removed. Signed-off-by: Holger Brunck Reviewed-by: Stefan Roese Thanks, Stefan --- arch/arm/dts/Makefile | 1 - arch/arm/dts/kirkwood-km_common.dtsi | 48 --- arch/arm

Re: [PATCH] arm: mvebu: mbus: Fix mbus driver to work also after U-Boot relocation

2022-08-16 Thread Stefan Roese
Reviewed-by: Stefan Roese Thanks, Stefan --- arch/arm/mach-kirkwood/include/mach/cpu.h | 3 - arch/arm/mach-mvebu/include/mach/cpu.h| 3 - arch/arm/mach-mvebu/mbus.c| 167 +- board/alliedtelesis/x530/x530.c | 2 +- board/maxbcm/maxbcm.c

Re: [PATCH] arm: mvebu: turris_mox: Set "sfp" label in eth1 DT node when only Mox SFP is detected

2022-08-16 Thread Stefan Roese
, which is without any label. So add "sfp" label into eth1 DT node in this case. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Thanks, Stefan --- board/CZ.NIC/turris_mox/turris_mox.c | 5 + 1 file changed, 5 insertions(+) diff --git a/board/CZ.NIC/turris_mox/turris_m

Re: [PATCH] arm: mvebu: turris_omnia: Show MCU version

2022-08-16 Thread Stefan Roese
is open source and available at website: https://gitlab.nic.cz/turris/hw/omnia_hw_ctrl It can be updated from running system via i2c bus with this tool: https://gitlab.nic.cz/turris/omnia-mcutool Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Thanks, Stefan --- board/CZ.NIC

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