summaryrefslogtreecommitdiff
path: root/board/cssi
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2023-04-03 11:27:39 +0300
committerChristophe Leroy <christophe.leroy@csgroup.eu>2023-04-06 15:47:47 +0300
commit26e8ebcd7cb7eabe2d62384b22d3ed9a235cb60e (patch)
tree387c3debc44eb3d2858830b5eafb1cf31b934db7 /board/cssi
parent21eaade449e6e50f8c41ee65953126e2a1e5d683 (diff)
downloadu-boot-26e8ebcd7cb7eabe2d62384b22d3ed9a235cb60e.tar.xz
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 <christophe.leroy@csgroup.eu>
Diffstat (limited to 'board/cssi')
-rw-r--r--board/cssi/mcr3000/mcr3000.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/board/cssi/mcr3000/mcr3000.c b/board/cssi/mcr3000/mcr3000.c
index 7b3ab12bd5..3514f67490 100644
--- a/board/cssi/mcr3000/mcr3000.c
+++ b/board/cssi/mcr3000/mcr3000.c
@@ -138,17 +138,3 @@ int board_early_init_f(void)
return 0;
}
-
-int board_early_init_r(void)
-{
- struct udevice *watchdog_dev = NULL;
-
- if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) {
- puts("Cannot find watchdog!\n");
- } else {
- puts("Enabling watchdog.\n");
- wdt_start(watchdog_dev, 0xffff, 0);
- }
-
- return 0;
-}