* [PATCH] watchdog: pika_wdt: replace in_be32/out_be32 with ioread32be/iowrite32be
@ 2026-06-02 3:56 Rosen Penev
2026-06-07 16:28 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2026-06-02 3:56 UTC (permalink / raw)
To: linux-watchdog; +Cc: Wim Van Sebroeck, chleroy, Guenter Roeck, open list
Convert the ppc4xx-specific in_be32/out_be32 to the portable
ioread32be/iowrite32be. Also relax the Kconfig dependency from
(PPC64 && COMPILE_TEST) to just COMPILE_TEST to get build coverage.
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/watchdog/Kconfig | 2 +-
drivers/watchdog/pika_wdt.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 8319c503319a..7c5d6f642a96 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -2040,7 +2040,7 @@ config 8xxx_WDT
config PIKA_WDT
tristate "PIKA FPGA Watchdog"
- depends on WARP || (PPC64 && COMPILE_TEST)
+ depends on WARP || COMPILE_TEST
default WARP
help
This enables the watchdog in the PIKA FPGA. Currently used on
diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c
index 87b8988d2520..2d3c201540a9 100644
--- a/drivers/watchdog/pika_wdt.c
+++ b/drivers/watchdog/pika_wdt.c
@@ -77,10 +77,10 @@ static inline void pikawdt_reset(void)
* seconds. Valid ranges are 1 to 15 seconds. The value can
* be modified dynamically.
*/
- unsigned reset = in_be32(pikawdt_private.fpga + 0x14);
+ unsigned reset = ioread32be(pikawdt_private.fpga + 0x14);
/* enable with max timeout - 15 seconds */
reset |= (1 << 7) + (WDT_HW_TIMEOUT << 8);
- out_be32(pikawdt_private.fpga + 0x14, reset);
+ iowrite32be(reset, pikawdt_private.fpga + 0x14);
}
/*
@@ -242,7 +242,7 @@ static int __init pikawdt_init(void)
return -ENOMEM;
}
- ident.firmware_version = in_be32(pikawdt_private.fpga + 0x1c) & 0xffff;
+ ident.firmware_version = ioread32be(pikawdt_private.fpga + 0x1c) & 0xffff;
/* POST information is in the sd area. */
np = of_find_compatible_node(NULL, NULL, "pika,fpga-sd");
@@ -264,7 +264,7 @@ static int __init pikawdt_init(void)
* Bit 31, WDOG: Set to 1 when the last reset was caused by a watchdog
* timeout.
*/
- post1 = in_be32(fpga + 0x40);
+ post1 = ioread32be(fpga + 0x40);
if (post1 & 0x80000000)
pikawdt_private.bootstatus = WDIOF_CARDRESET;
--
2.54.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] watchdog: pika_wdt: replace in_be32/out_be32 with ioread32be/iowrite32be
2026-06-02 3:56 [PATCH] watchdog: pika_wdt: replace in_be32/out_be32 with ioread32be/iowrite32be Rosen Penev
@ 2026-06-07 16:28 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2026-06-07 16:28 UTC (permalink / raw)
To: Rosen Penev, linux-watchdog; +Cc: Wim Van Sebroeck, chleroy, open list
On 6/1/26 20:56, Rosen Penev wrote:
> Convert the ppc4xx-specific in_be32/out_be32 to the portable
> ioread32be/iowrite32be. Also relax the Kconfig dependency from
> (PPC64 && COMPILE_TEST) to just COMPILE_TEST to get build coverage.
>
> Assisted-by: opencode:big-pickle
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
This is an old watchdog driver, not using the watchdog subsystem.
Please leave such drivers alone unless fixing a real bug.
Guenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-07 16:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-02 3:56 [PATCH] watchdog: pika_wdt: replace in_be32/out_be32 with ioread32be/iowrite32be Rosen Penev
2026-06-07 16:28 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®