From 26e8ebcd7cb7eabe2d62384b22d3ed9a235cb60e Mon Sep 17 00:00:00 2001 From: Christophe Leroy Date: Mon, 3 Apr 2023 10:27:39 +0200 Subject: watchdog: mpc8xxx: Make it generic mpc8xx, mpc83xx and mpc86xx have similar watchdog with almost same memory registers. Refactor the driver to get the register addresses from the device tree and use the compatible to know the prescale factor. Calculate the watchdog setup value from the provided timeout. Don't declare it anymore as an HW_WATCHDOG, u-boot will start servicing the watchdog early enough. On mpc8xx the watchdog configuration register is also used for configuring the bus monitor. So add it as an option to the watchdog when it is mpc8xx. When watchdog is not selected, leave the configuration of the initial SYPCR from Kconfig. Signed-off-by: Christophe Leroy --- configs/CMPC885_defconfig | 2 +- configs/MCR3000_defconfig | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'configs') diff --git a/configs/CMPC885_defconfig b/configs/CMPC885_defconfig index 484a81b8d3f..1fe67d02f2f 100644 --- a/configs/CMPC885_defconfig +++ b/configs/CMPC885_defconfig @@ -11,7 +11,6 @@ CONFIG_TARGET_CMPC885=y CONFIG_MPC885=y CONFIG_CMD_IMMAP=y CONFIG_SYS_SIUMCR=0x00620000 -CONFIG_SYS_SYPCR=0xFFFFFF8F CONFIG_SYS_TBSCR=0x00C3 CONFIG_SYS_PISCR=0x0000 CONFIG_SYS_PLPRCR_BOOL=y @@ -106,5 +105,6 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_MPC8XX_SPI=y CONFIG_WDT=y +CONFIG_WDT_MPC8xxx_BME=y # CONFIG_REGEX is not set CONFIG_LZMA=y diff --git a/configs/MCR3000_defconfig b/configs/MCR3000_defconfig index 4b5ce407eae..fc2bf5b2f94 100644 --- a/configs/MCR3000_defconfig +++ b/configs/MCR3000_defconfig @@ -11,7 +11,6 @@ CONFIG_MPC8xx=y CONFIG_TARGET_MCR3000=y CONFIG_CMD_IMMAP=y CONFIG_SYS_SIUMCR=0x00600400 -CONFIG_SYS_SYPCR=0xFFFFFF8F CONFIG_SYS_TBSCR=0x00C3 CONFIG_SYS_PISCR=0x0000 CONFIG_SYS_PLPRCR_BOOL=y @@ -29,7 +28,6 @@ CONFIG_AUTOBOOT_PROMPT="\nEnter password - autoboot in %d sec...\n" CONFIG_AUTOBOOT_DELAY_STR="root" CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="run flashboot" -CONFIG_BOARD_EARLY_INIT_R=y # CONFIG_HWCONFIG is not set CONFIG_MISC_INIT_R=y CONFIG_HUSH_PARSER=y @@ -102,4 +100,5 @@ CONFIG_MPC8XX_FEC=y # CONFIG_PCI is not set CONFIG_DM_SERIAL=y CONFIG_WDT=y +CONFIG_WDT_MPC8xxx_BME=y CONFIG_LZMA=y -- cgit v1.3.1