blob: 02ec35eb1a98a40fce51abb71d1f694d4958de2a [file] [log] [blame]
Michael Schwingen10c97872011-05-23 00:00:09 +02001/*
2 * (C) Copyright 2009
3 * Michael Schwingen, michael@schwingen.org
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Michael Schwingen10c97872011-05-23 00:00:09 +02006 */
7
8#include <common.h>
9#include <config.h>
10#include <asm/io.h>
11#include "dvlhost_hw.h"
12
13DECLARE_GLOBAL_DATA_PTR;
14
15#ifdef CONFIG_HW_WATCHDOG
16#include <watchdog.h>
17#include <asm/arch/ixp425.h>
18
19void 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 */