Michael Schwingen | 10c9787 | 2011-05-23 00:00:09 +0200 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2009 |
| 3 | * Michael Schwingen, michael@schwingen.org |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Michael Schwingen | 10c9787 | 2011-05-23 00:00:09 +0200 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
| 9 | #include <config.h> |
| 10 | #include <asm/io.h> |
| 11 | #include "dvlhost_hw.h" |
| 12 | |
| 13 | DECLARE_GLOBAL_DATA_PTR; |
| 14 | |
| 15 | #ifdef CONFIG_HW_WATCHDOG |
| 16 | #include <watchdog.h> |
| 17 | #include <asm/arch/ixp425.h> |
| 18 | |
| 19 | void hw_watchdog_reset(void) |
| 20 | { |
| 21 | unsigned int x; |
| 22 | x = readl(IXP425_GPIO_GPOUTR); |
| 23 | x ^= (1 << (CONFIG_SYS_GPIO_WDGTRIGGER)); |
| 24 | writel(x, IXP425_GPIO_GPOUTR); |
| 25 | } |
| 26 | |
| 27 | #endif /* CONFIG_HW_WATCHDOG */ |