blob: 99c88e5df71488b0475b27cb5aa1c9ab2eb0d159 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0 */
Stephen Warren45b8ae62012-08-05 16:07:21 +00002/*
Stephen Warren8780f222015-02-16 12:16:14 -07003 * (C) Copyright 2012,2015 Stephen Warren
Stephen Warren45b8ae62012-08-05 16:07:21 +00004 */
5
Marek Vasut1a66a5f2015-05-04 22:54:34 +02006#ifndef _BCM2835_WDOG_H
7#define _BCM2835_WDOG_H
Stephen Warren45b8ae62012-08-05 16:07:21 +00008
Stephen Warren9d5990b2016-03-16 21:40:56 -06009#ifndef CONFIG_BCM2835
Stephen Warren8780f222015-02-16 12:16:14 -070010#define BCM2835_WDOG_PHYSADDR 0x3f100000
11#else
Stephen Warren45b8ae62012-08-05 16:07:21 +000012#define BCM2835_WDOG_PHYSADDR 0x20100000
Stephen Warren8780f222015-02-16 12:16:14 -070013#endif
Stephen Warren45b8ae62012-08-05 16:07:21 +000014
15struct bcm2835_wdog_regs {
16 u32 unknown0[7];
17 u32 rstc;
Alexander Graf3fce5342016-11-02 10:36:18 +010018 u32 rsts;
Stephen Warren45b8ae62012-08-05 16:07:21 +000019 u32 wdog;
20};
21
22#define BCM2835_WDOG_PASSWORD 0x5a000000
23
24#define BCM2835_WDOG_RSTC_WRCFG_MASK 0x00000030
25#define BCM2835_WDOG_RSTC_WRCFG_FULL_RESET 0x00000020
26
27#define BCM2835_WDOG_WDOG_TIMEOUT_MASK 0x0000ffff
28
29#endif