mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-24 02:48:51 +09:00
![Christophe Leroy](/assets/img/avatar_default.png)
In preparation of DM watchdog, move basic actions into drivers/watchdog Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
22 lines
435 B
C
22 lines
435 B
C
/*
|
|
* Copyright 2017 CS Systemes d'Information
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <mpc8xx.h>
|
|
#include <asm/cpm_8xx.h>
|
|
#include <asm/io.h>
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
void hw_watchdog_reset(void)
|
|
{
|
|
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
|
|
|
|
out_be16(&immap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */
|
|
out_be16(&immap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */
|
|
}
|
|
|