All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] a little RPi watchdog cleanup
@ 2024-07-12  9:07 Rasmus Villemoes
  2024-07-12  9:07 ` [PATCH v2 1/2] arm: bcm283x: remove unused empty hw_watchdog_disable Rasmus Villemoes
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Rasmus Villemoes @ 2024-07-12  9:07 UTC (permalink / raw)
  To: u-boot
  Cc: Matthias Brugger, Peter Robinson, Tom Rini, Stefan Roese,
	Rasmus Villemoes

Two related leftovers I found while looking at remaining
hw_watchdog/CONFIG_HW_WATCHDOG items.

v2: Add Stefan's R-bs. Trim commit log in patch 1. No code changes.

CI: https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8910&view=results

I'm pretty sure the only failures are the false positive 'cyclic ...' ones.

Rasmus Villemoes (2):
  arm: bcm283x: remove unused empty hw_watchdog_disable
  board: rpi: remove leftover CONFIG_HW_WATCHDOG block

 arch/arm/mach-bcm283x/reset.c | 7 ++-----
 board/raspberrypi/rpi/rpi.c   | 4 ----
 2 files changed, 2 insertions(+), 9 deletions(-)

-- 
2.45.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/2] arm: bcm283x: remove unused empty hw_watchdog_disable
  2024-07-12  9:07 [PATCH v2 0/2] a little RPi watchdog cleanup Rasmus Villemoes
@ 2024-07-12  9:07 ` Rasmus Villemoes
  2024-07-12 10:21   ` Peter Robinson
  2024-07-12  9:07 ` [PATCH v2 2/2] board: rpi: remove leftover CONFIG_HW_WATCHDOG block Rasmus Villemoes
  2024-07-15  6:57 ` [PATCH v2 0/2] a little RPi watchdog cleanup Stefan Roese
  2 siblings, 1 reply; 10+ messages in thread
From: Rasmus Villemoes @ 2024-07-12  9:07 UTC (permalink / raw)
  To: u-boot
  Cc: Matthias Brugger, Peter Robinson, Tom Rini, Stefan Roese,
	Rasmus Villemoes

This empty stub was originally added as one branch of an #ifdef in
commit 45a6d231b2f (bcm2835_wdt: support for the BCM2835/2836
watchdog). That incarnation of the rpi watchdog driver was later
removed in c7adc0b5f98 (watchdog: bcm2835_wdt: Remove unused BCM283x
watchdog driver and its references), but this now unused stub was left
behind. The later (re-)added rpi watchdog driver does not define a
hw_watchdog_disable() function, as that is properly integrated in the
watchdog framework.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 arch/arm/mach-bcm283x/reset.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-bcm283x/reset.c b/arch/arm/mach-bcm283x/reset.c
index 9199234917f..1dc7ce50d1d 100644
--- a/arch/arm/mach-bcm283x/reset.c
+++ b/arch/arm/mach-bcm283x/reset.c
@@ -25,8 +25,6 @@
 /* max ticks timeout */
 #define BCM2835_WDOG_MAX_TIMEOUT	0x000fffff
 
-void hw_watchdog_disable(void) {}
-
 __efi_runtime_data struct bcm2835_wdog_regs *wdog_regs;
 
 static void __efi_runtime
@@ -34,10 +32,9 @@ __reset_cpu(struct bcm2835_wdog_regs *wdog_regs, ulong ticks)
 {
 	uint32_t rstc, timeout;
 
-	if (ticks == 0) {
-		hw_watchdog_disable();
+	if (ticks == 0)
 		timeout = RESET_TIMEOUT;
-	} else
+	else
 		timeout = ticks & BCM2835_WDOG_MAX_TIMEOUT;
 
 	rstc = readl(&wdog_regs->rstc);
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/2] board: rpi: remove leftover CONFIG_HW_WATCHDOG block
  2024-07-12  9:07 [PATCH v2 0/2] a little RPi watchdog cleanup Rasmus Villemoes
  2024-07-12  9:07 ` [PATCH v2 1/2] arm: bcm283x: remove unused empty hw_watchdog_disable Rasmus Villemoes
@ 2024-07-12  9:07 ` Rasmus Villemoes
  2024-07-12 10:21   ` Peter Robinson
  2024-07-15  6:57 ` [PATCH v2 0/2] a little RPi watchdog cleanup Stefan Roese
  2 siblings, 1 reply; 10+ messages in thread
From: Rasmus Villemoes @ 2024-07-12  9:07 UTC (permalink / raw)
  To: u-boot
  Cc: Matthias Brugger, Peter Robinson, Tom Rini, Stefan Roese,
	Rasmus Villemoes

This was added in commit 45a6d231b2f (bcm2835_wdt: support for the
BCM2835/2836 watchdog), which did do 'select HW_WATCHDOG'. That
incarnation of the watchdog driver later got removed in
c7adc0b5f98 (watchdog: bcm2835_wdt: Remove unused BCM283x watchdog
driver and its references), but this block was left behind.

Another rpi watchdog driver has since been added, but that does not
select HW_WATCHDOG, so this remains dead and unused. Remove it.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 board/raspberrypi/rpi/rpi.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index d996eb0cf69..9a83cf2d6a7 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -493,10 +493,6 @@ static void get_board_revision(void)
 
 int board_init(void)
 {
-#ifdef CONFIG_HW_WATCHDOG
-	hw_watchdog_init();
-#endif
-
 	get_board_revision();
 
 	gd->bd->bi_boot_params = 0x100;
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 1/2] arm: bcm283x: remove unused empty hw_watchdog_disable
  2024-07-12  9:07 ` [PATCH v2 1/2] arm: bcm283x: remove unused empty hw_watchdog_disable Rasmus Villemoes
@ 2024-07-12 10:21   ` Peter Robinson
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Robinson @ 2024-07-12 10:21 UTC (permalink / raw)
  To: Rasmus Villemoes; +Cc: u-boot, Matthias Brugger, Tom Rini, Stefan Roese

On Fri, 12 Jul 2024 at 10:07, Rasmus Villemoes
<rasmus.villemoes@prevas.dk> wrote:
>
> This empty stub was originally added as one branch of an #ifdef in
> commit 45a6d231b2f (bcm2835_wdt: support for the BCM2835/2836
> watchdog). That incarnation of the rpi watchdog driver was later
> removed in c7adc0b5f98 (watchdog: bcm2835_wdt: Remove unused BCM283x
> watchdog driver and its references), but this now unused stub was left
> behind. The later (re-)added rpi watchdog driver does not define a
> hw_watchdog_disable() function, as that is properly integrated in the
> watchdog framework.
>
> Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

Thanks!

> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> ---
>  arch/arm/mach-bcm283x/reset.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-bcm283x/reset.c b/arch/arm/mach-bcm283x/reset.c
> index 9199234917f..1dc7ce50d1d 100644
> --- a/arch/arm/mach-bcm283x/reset.c
> +++ b/arch/arm/mach-bcm283x/reset.c
> @@ -25,8 +25,6 @@
>  /* max ticks timeout */
>  #define BCM2835_WDOG_MAX_TIMEOUT       0x000fffff
>
> -void hw_watchdog_disable(void) {}
> -
>  __efi_runtime_data struct bcm2835_wdog_regs *wdog_regs;
>
>  static void __efi_runtime
> @@ -34,10 +32,9 @@ __reset_cpu(struct bcm2835_wdog_regs *wdog_regs, ulong ticks)
>  {
>         uint32_t rstc, timeout;
>
> -       if (ticks == 0) {
> -               hw_watchdog_disable();
> +       if (ticks == 0)
>                 timeout = RESET_TIMEOUT;
> -       } else
> +       else
>                 timeout = ticks & BCM2835_WDOG_MAX_TIMEOUT;
>
>         rstc = readl(&wdog_regs->rstc);
> --
> 2.45.2
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 2/2] board: rpi: remove leftover CONFIG_HW_WATCHDOG block
  2024-07-12  9:07 ` [PATCH v2 2/2] board: rpi: remove leftover CONFIG_HW_WATCHDOG block Rasmus Villemoes
@ 2024-07-12 10:21   ` Peter Robinson
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Robinson @ 2024-07-12 10:21 UTC (permalink / raw)
  To: Rasmus Villemoes; +Cc: u-boot, Matthias Brugger, Tom Rini, Stefan Roese

On Fri, 12 Jul 2024 at 10:07, Rasmus Villemoes
<rasmus.villemoes@prevas.dk> wrote:
>
> This was added in commit 45a6d231b2f (bcm2835_wdt: support for the
> BCM2835/2836 watchdog), which did do 'select HW_WATCHDOG'. That
> incarnation of the watchdog driver later got removed in
> c7adc0b5f98 (watchdog: bcm2835_wdt: Remove unused BCM283x watchdog
> driver and its references), but this block was left behind.
>
> Another rpi watchdog driver has since been added, but that does not
> select HW_WATCHDOG, so this remains dead and unused. Remove it.
>
> Reviewed-by: Stefan Roese <sr@denx.de>

Thanks for the cleanup and updated commit.

Reviewed-by: Peter Robinson <pbrobinson@gmail.com>

> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> ---
>  board/raspberrypi/rpi/rpi.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
> index d996eb0cf69..9a83cf2d6a7 100644
> --- a/board/raspberrypi/rpi/rpi.c
> +++ b/board/raspberrypi/rpi/rpi.c
> @@ -493,10 +493,6 @@ static void get_board_revision(void)
>
>  int board_init(void)
>  {
> -#ifdef CONFIG_HW_WATCHDOG
> -       hw_watchdog_init();
> -#endif
> -
>         get_board_revision();
>
>         gd->bd->bi_boot_params = 0x100;
> --
> 2.45.2
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/2] a little RPi watchdog cleanup
  2024-07-12  9:07 [PATCH v2 0/2] a little RPi watchdog cleanup Rasmus Villemoes
  2024-07-12  9:07 ` [PATCH v2 1/2] arm: bcm283x: remove unused empty hw_watchdog_disable Rasmus Villemoes
  2024-07-12  9:07 ` [PATCH v2 2/2] board: rpi: remove leftover CONFIG_HW_WATCHDOG block Rasmus Villemoes
@ 2024-07-15  6:57 ` Stefan Roese
  2024-07-15 13:03   ` Rasmus Villemoes
  2 siblings, 1 reply; 10+ messages in thread
From: Stefan Roese @ 2024-07-15  6:57 UTC (permalink / raw)
  To: Rasmus Villemoes, u-boot, Tom Rini; +Cc: Matthias Brugger, Peter Robinson

@Tom,

I can't find these patches (and v1) in patchworks. Do you have an
idea, why this is the case?

Thanks,
Stefan

On 7/12/24 11:07, Rasmus Villemoes wrote:
> Two related leftovers I found while looking at remaining
> hw_watchdog/CONFIG_HW_WATCHDOG items.
> 
> v2: Add Stefan's R-bs. Trim commit log in patch 1. No code changes.
> 
> CI: https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8910&view=results
> 
> I'm pretty sure the only failures are the false positive 'cyclic ...' ones.
> 
> Rasmus Villemoes (2):
>    arm: bcm283x: remove unused empty hw_watchdog_disable
>    board: rpi: remove leftover CONFIG_HW_WATCHDOG block
> 
>   arch/arm/mach-bcm283x/reset.c | 7 ++-----
>   board/raspberrypi/rpi/rpi.c   | 4 ----
>   2 files changed, 2 insertions(+), 9 deletions(-)
> 

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/2] a little RPi watchdog cleanup
  2024-07-15  6:57 ` [PATCH v2 0/2] a little RPi watchdog cleanup Stefan Roese
@ 2024-07-15 13:03   ` Rasmus Villemoes
  2024-07-15 13:19     ` Stefan Roese
  2024-07-15 13:24     ` Peter Robinson
  0 siblings, 2 replies; 10+ messages in thread
From: Rasmus Villemoes @ 2024-07-15 13:03 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Tom Rini, Matthias Brugger, Peter Robinson

Stefan Roese <sr@denx.de> writes:

> @Tom,
>
> I can't find these patches (and v1) in patchworks. Do you have an
> idea, why this is the case?
>

Perhaps because they (v2) have already been merged to master via a PR from
Peter?  commit 1ca216522d4.

So one has to change 'state' from 'action required' to see them:
https://patchwork.ozlabs.org/project/uboot/list/?series=&submitter=&state=*&q=hw_watchdog&archive=&delegate=

Rasmus

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/2] a little RPi watchdog cleanup
  2024-07-15 13:03   ` Rasmus Villemoes
@ 2024-07-15 13:19     ` Stefan Roese
  2024-07-15 13:24     ` Peter Robinson
  1 sibling, 0 replies; 10+ messages in thread
From: Stefan Roese @ 2024-07-15 13:19 UTC (permalink / raw)
  To: Rasmus Villemoes; +Cc: u-boot, Tom Rini, Matthias Brugger, Peter Robinson

On 7/15/24 15:03, Rasmus Villemoes wrote:
> Stefan Roese <sr@denx.de> writes:
> 
>> @Tom,
>>
>> I can't find these patches (and v1) in patchworks. Do you have an
>> idea, why this is the case?
>>
> 
> Perhaps because they (v2) have already been merged to master via a PR from
> Peter?  commit 1ca216522d4.

Ah, I was not aware that it was already merged. Okay, that explains it
of course.

> So one has to change 'state' from 'action required' to see them:
> https://patchwork.ozlabs.org/project/uboot/list/?series=&submitter=&state=*&q=hw_watchdog&archive=&delegate=

Nice, I never noticed that I could change this view.

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/2] a little RPi watchdog cleanup
  2024-07-15 13:03   ` Rasmus Villemoes
  2024-07-15 13:19     ` Stefan Roese
@ 2024-07-15 13:24     ` Peter Robinson
  2024-07-15 14:28       ` Tom Rini
  1 sibling, 1 reply; 10+ messages in thread
From: Peter Robinson @ 2024-07-15 13:24 UTC (permalink / raw)
  To: Rasmus Villemoes; +Cc: Stefan Roese, u-boot, Tom Rini, Matthias Brugger

> > I can't find these patches (and v1) in patchworks. Do you have an
> > idea, why this is the case?
> >
>
> Perhaps because they (v2) have already been merged to master via a PR from
> Peter?  commit 1ca216522d4.

They were there, although weirdly they weren't assigned to me and I
had to dig for therm.

> So one has to change 'state' from 'action required' to see them:
> https://patchwork.ozlabs.org/project/uboot/list/?series=&submitter=&state=*&q=hw_watchdog&archive=&delegate=
>
> Rasmus

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/2] a little RPi watchdog cleanup
  2024-07-15 13:24     ` Peter Robinson
@ 2024-07-15 14:28       ` Tom Rini
  0 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2024-07-15 14:28 UTC (permalink / raw)
  To: Peter Robinson; +Cc: Rasmus Villemoes, Stefan Roese, u-boot, Matthias Brugger

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

On Mon, Jul 15, 2024 at 02:24:48PM +0100, Peter Robinson wrote:
> > > I can't find these patches (and v1) in patchworks. Do you have an
> > > idea, why this is the case?
> > >
> >
> > Perhaps because they (v2) have already been merged to master via a PR from
> > Peter?  commit 1ca216522d4.
> 
> They were there, although weirdly they weren't assigned to me and I
> had to dig for therm.

Since that was almost certainly me, sorry, and I don't recall if I
assigned them to Stefan as "watchdog" or just typo'd and very randomly
assigned to someone else.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-07-15 14:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12  9:07 [PATCH v2 0/2] a little RPi watchdog cleanup Rasmus Villemoes
2024-07-12  9:07 ` [PATCH v2 1/2] arm: bcm283x: remove unused empty hw_watchdog_disable Rasmus Villemoes
2024-07-12 10:21   ` Peter Robinson
2024-07-12  9:07 ` [PATCH v2 2/2] board: rpi: remove leftover CONFIG_HW_WATCHDOG block Rasmus Villemoes
2024-07-12 10:21   ` Peter Robinson
2024-07-15  6:57 ` [PATCH v2 0/2] a little RPi watchdog cleanup Stefan Roese
2024-07-15 13:03   ` Rasmus Villemoes
2024-07-15 13:19     ` Stefan Roese
2024-07-15 13:24     ` Peter Robinson
2024-07-15 14:28       ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.