board: freescale: p1_p2_rdb_pc: Turn off watchdog before reset
authorPali Rohár <pali@kernel.org>
Mon, 1 Aug 2022 13:31:46 +0000 (15:31 +0200)
committerPeng Fan <peng.fan@nxp.com>
Tue, 6 Sep 2022 06:08:35 +0000 (14:08 +0800)
commit44366be10a9386a8887124a77a7d06169c3aa1f3
treebe549e1964eb17dc4473b99b6d200f4c0e0570b3
parent7e962cb132d6056b0a6f75eee2d800c9422da961
board: freescale: p1_p2_rdb_pc: Turn off watchdog before reset

P1/P2 RDB boards have external max6370 watchdog connected to CPLD and this
watchdog is not deactivated on board reset. So if it is active during board
reset, it can trigger another reset when CPU is booting U-Boot. To prevent
possible infinite reset loop caused by external watchdog, turn it off
before reset.

Do it via a new board_reset_prepare() callback which is called from
do_reset() function before any reset sequence.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/powerpc/cpu/mpc85xx/cpu.c
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c