Stephen Warren | 45b8ae6 | 2012-08-05 16:07:21 +0000 | [diff] [blame] | 1 | /* |
Stephen Warren | 8780f22 | 2015-02-16 12:16:14 -0700 | [diff] [blame] | 2 | * (C) Copyright 2012,2015 Stephen Warren |
Stephen Warren | 45b8ae6 | 2012-08-05 16:07:21 +0000 | [diff] [blame] | 3 | * |
Stephen Warren | 29e494c | 2015-02-16 12:16:13 -0700 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0 |
Stephen Warren | 45b8ae6 | 2012-08-05 16:07:21 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
Marek Vasut | 1a66a5f | 2015-05-04 22:54:34 +0200 | [diff] [blame] | 7 | #ifndef _BCM2835_WDOG_H |
| 8 | #define _BCM2835_WDOG_H |
Stephen Warren | 45b8ae6 | 2012-08-05 16:07:21 +0000 | [diff] [blame] | 9 | |
Stephen Warren | 9d5990b | 2016-03-16 21:40:56 -0600 | [diff] [blame] | 10 | #ifndef CONFIG_BCM2835 |
Stephen Warren | 8780f22 | 2015-02-16 12:16:14 -0700 | [diff] [blame] | 11 | #define BCM2835_WDOG_PHYSADDR 0x3f100000 |
| 12 | #else |
Stephen Warren | 45b8ae6 | 2012-08-05 16:07:21 +0000 | [diff] [blame] | 13 | #define BCM2835_WDOG_PHYSADDR 0x20100000 |
Stephen Warren | 8780f22 | 2015-02-16 12:16:14 -0700 | [diff] [blame] | 14 | #endif |
Stephen Warren | 45b8ae6 | 2012-08-05 16:07:21 +0000 | [diff] [blame] | 15 | |
| 16 | struct 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 |