Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Christophe Leroy | 8906764 | 2018-03-16 17:21:01 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2017 CS Systemes d'Information |
Christophe Leroy | 8906764 | 2018-03-16 17:21:01 +0100 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <mpc8xx.h> |
| 8 | #include <asm/cpm_8xx.h> |
| 9 | #include <asm/io.h> |
| 10 | |
Christophe Leroy | 8906764 | 2018-03-16 17:21:01 +0100 | [diff] [blame] | 11 | void 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 | |