]> git.dujemihanovic.xyz Git - u-boot.git/commit
watchdog: mpc8xxx: Make it generic
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 3 Apr 2023 08:27:39 +0000 (10:27 +0200)
committerChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 6 Apr 2023 12:47:47 +0000 (14:47 +0200)
commit26e8ebcd7cb7eabe2d62384b22d3ed9a235cb60e
tree387c3debc44eb3d2858830b5eafb1cf31b934db7
parent21eaade449e6e50f8c41ee65953126e2a1e5d683
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>
arch/powerpc/cpu/mpc8xx/Kconfig
arch/powerpc/cpu/mpc8xx/cpu_init.c
arch/powerpc/dts/cmpc885.dts
arch/powerpc/dts/mcr3000.dts
board/cssi/mcr3000/mcr3000.c
configs/CMPC885_defconfig
configs/MCR3000_defconfig
drivers/watchdog/Kconfig
drivers/watchdog/mpc8xxx_wdt.c