Christophe Leroy | 8906764 | 2018-03-16 17:21:01 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017 CS Systemes d'Information |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <mpc8xx.h> |
| 9 | #include <asm/cpm_8xx.h> |
| 10 | #include <asm/io.h> |
| 11 | |
| 12 | DECLARE_GLOBAL_DATA_PTR; |
| 13 | |
| 14 | void hw_watchdog_reset(void) |
| 15 | { |
| 16 | immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; |
| 17 | |
| 18 | out_be16(&immap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */ |
| 19 | out_be16(&immap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ |
| 20 | } |
| 21 | |