blob: 7741d7ba15584197baa22750e18e1afbb2a87c29 [file] [log] [blame]
Stephen Warren45b8ae62012-08-05 16:07:21 +00001/*
Stephen Warren8780f222015-02-16 12:16:14 -07002 * (C) Copyright 2012,2015 Stephen Warren
Stephen Warren45b8ae62012-08-05 16:07:21 +00003 *
Stephen Warren29e494c2015-02-16 12:16:13 -07004 * SPDX-License-Identifier: GPL-2.0
Stephen Warren45b8ae62012-08-05 16:07:21 +00005 */
6
Marek Vasut1a66a5f2015-05-04 22:54:34 +02007#ifndef _BCM2835_WDOG_H
8#define _BCM2835_WDOG_H
Stephen Warren45b8ae62012-08-05 16:07:21 +00009
Stephen Warren9d5990b2016-03-16 21:40:56 -060010#ifndef CONFIG_BCM2835
Stephen Warren8780f222015-02-16 12:16:14 -070011#define BCM2835_WDOG_PHYSADDR 0x3f100000
12#else
Stephen Warren45b8ae62012-08-05 16:07:21 +000013#define BCM2835_WDOG_PHYSADDR 0x20100000
Stephen Warren8780f222015-02-16 12:16:14 -070014#endif
Stephen Warren45b8ae62012-08-05 16:07:21 +000015
16struct bcm2835_wdog_regs {
17 u32 unknown0[7];
18 u32 rstc;
19 u32 unknown1;
20 u32 wdog;
21};
22
23#define BCM2835_WDOG_PASSWORD 0x5a000000
24
25#define BCM2835_WDOG_RSTC_WRCFG_MASK 0x00000030
26#define BCM2835_WDOG_RSTC_WRCFG_FULL_RESET 0x00000020
27
28#define BCM2835_WDOG_WDOG_TIMEOUT_MASK 0x0000ffff
29
30#endif