blob: ccb06ac425f40d12b56adc2ff6143d1a89d782ab [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Christophe Leroy89067642018-03-16 17:21:01 +01002/*
3 * Copyright 2017 CS Systemes d'Information
Christophe Leroy89067642018-03-16 17:21:01 +01004 */
5
6#include <common.h>
7#include <mpc8xx.h>
8#include <asm/cpm_8xx.h>
9#include <asm/io.h>
10
Christophe Leroy89067642018-03-16 17:21:01 +010011void hw_watchdog_reset(void)
12{
13 immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
14
15 out_be16(&immap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */
16 out_be16(&immap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */
17}
18