From 21eaade449e6e50f8c41ee65953126e2a1e5d683 Mon Sep 17 00:00:00 2001 From: Christophe Leroy Date: Mon, 3 Apr 2023 10:27:39 +0200 Subject: [PATCH] watchdog: mpc8xx: Rename it mpc8xxx mpc8xx, mpc83xx and mpc86xx have similar watchdog with almost same memory registers. Rename it mpc8xxx which is the generic name used for drivers supporting several mpc families. The driver will be made more generic in following patch. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 2 +- drivers/watchdog/Kconfig | 6 ++--- drivers/watchdog/Makefile | 2 +- .../watchdog/{mpc8xx_wdt.c => mpc8xxx_wdt.c} | 24 +++++++++---------- 4 files changed, 17 insertions(+), 17 deletions(-) rename drivers/watchdog/{mpc8xx_wdt.c => mpc8xxx_wdt.c} (72%) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index bee59c3bea..f20d58b4de 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -31,7 +31,7 @@ config MPC8xx select CREATE_ARCH_SYMLINK select BOARD_EARLY_INIT_F imply CMD_REGINFO - imply WDT_MPC8xx + imply WDT_MPC8xxx endchoice diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index b5ac8f7f50..f6554d5c93 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -184,12 +184,12 @@ config WDT_MESON_GXBB Select this to enable Meson watchdog timer, which can be found on some Amlogic platforms. -config WDT_MPC8xx - bool "MPC8xx watchdog timer support" +config WDT_MPC8xxx + bool "MPC8xxx watchdog timer support" depends on WDT && MPC8xx select HW_WATCHDOG help - Select this to enable mpc8xx watchdog timer + Select this to enable mpc8xxx watchdog timer config WDT_MT7620 bool "MediaTek MT7620 watchdog timer support" diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index 446d961d7d..aba1df285d 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile @@ -29,7 +29,7 @@ obj-$(CONFIG_WDT_CDNS) += cdns_wdt.o obj-$(CONFIG_WDT_GPIO) += gpio_wdt.o obj-$(CONFIG_WDT_MAX6370) += max6370_wdt.o obj-$(CONFIG_WDT_MESON_GXBB) += meson_gxbb_wdt.o -obj-$(CONFIG_WDT_MPC8xx) += mpc8xx_wdt.o +obj-$(CONFIG_WDT_MPC8xxx) += mpc8xxx_wdt.o obj-$(CONFIG_WDT_MT7620) += mt7620_wdt.o obj-$(CONFIG_WDT_MT7621) += mt7621_wdt.o obj-$(CONFIG_WDT_MTK) += mtk_wdt.o diff --git a/drivers/watchdog/mpc8xx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c similarity index 72% rename from drivers/watchdog/mpc8xx_wdt.c rename to drivers/watchdog/mpc8xxx_wdt.c index c8b104d8f5..ffca3ec877 100644 --- a/drivers/watchdog/mpc8xx_wdt.c +++ b/drivers/watchdog/mpc8xxx_wdt.c @@ -19,7 +19,7 @@ void hw_watchdog_reset(void) out_be16(&immap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ } -static int mpc8xx_wdt_start(struct udevice *dev, u64 timeout, ulong flags) +static int mpc8xxx_wdt_start(struct udevice *dev, u64 timeout, ulong flags) { immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; u32 val = CONFIG_SYS_SYPCR; @@ -38,7 +38,7 @@ static int mpc8xx_wdt_start(struct udevice *dev, u64 timeout, ulong flags) } -static int mpc8xx_wdt_stop(struct udevice *dev) +static int mpc8xxx_wdt_stop(struct udevice *dev) { immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; @@ -49,27 +49,27 @@ static int mpc8xx_wdt_stop(struct udevice *dev) return 0; } -static int mpc8xx_wdt_reset(struct udevice *dev) +static int mpc8xxx_wdt_reset(struct udevice *dev) { hw_watchdog_reset(); return 0; } -static const struct wdt_ops mpc8xx_wdt_ops = { - .start = mpc8xx_wdt_start, - .reset = mpc8xx_wdt_reset, - .stop = mpc8xx_wdt_stop, +static const struct wdt_ops mpc8xxx_wdt_ops = { + .start = mpc8xxx_wdt_start, + .reset = mpc8xxx_wdt_reset, + .stop = mpc8xxx_wdt_stop, }; -static const struct udevice_id mpc8xx_wdt_ids[] = { +static const struct udevice_id mpc8xxx_wdt_ids[] = { { .compatible = "fsl,pq1-wdt" }, {} }; -U_BOOT_DRIVER(wdt_mpc8xx) = { - .name = "wdt_mpc8xx", +U_BOOT_DRIVER(wdt_mpc8xxx) = { + .name = "wdt_mpc8xxx", .id = UCLASS_WDT, - .of_match = mpc8xx_wdt_ids, - .ops = &mpc8xx_wdt_ops, + .of_match = mpc8xxx_wdt_ids, + .ops = &mpc8xxx_wdt_ops, }; -- 2.39.5