34833e8ea9dfe87bcda4238d12cffb8a2259f09d
[openwrt.git] / target / linux / ifxmips / files / include / asm-mips / ifxmips / danube_wdt.h
1 /*
2  *   This program is free software; you can redistribute it and/or modify
3  *   it under the terms of the GNU General Public License as published by
4  *   the Free Software Foundation; either version 2 of the License, or
5  *   (at your option) any later version.
6  *
7  *   This program is distributed in the hope that it will be useful,
8  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
9  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  *   GNU General Public License for more details.
11  *
12  *   You should have received a copy of the GNU General Public License
13  *   along with this program; if not, write to the Free Software
14  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
15  *
16  *   Copyright (C) 2005 infineon
17  *   Copyright (C) 2007 John Crispin <blogic@openwrt.org> 
18  *
19  */
20
21 #ifndef IFXMIPS_WDT_H
22 #define IFXMIPS_WDT_H
23
24 /* IFXMips wdt ioctl control */
25 #define IFXMIPS_WDT_IOC_MAGIC                   0xc0
26 #define IFXMIPS_WDT_IOC_START                   _IOW(IFXMIPS_WDT_IOC_MAGIC, 0, int)
27 #define IFXMIPS_WDT_IOC_STOP                            _IO(IFXMIPS_WDT_IOC_MAGIC, 1)
28 #define IFXMIPS_WDT_IOC_PING                            _IO(IFXMIPS_WDT_IOC_MAGIC, 2)
29 #define IFXMIPS_WDT_IOC_SET_PWL                 _IOW(IFXMIPS_WDT_IOC_MAGIC, 3, int)
30 #define IFXMIPS_WDT_IOC_SET_DSEN                        _IOW(IFXMIPS_WDT_IOC_MAGIC, 4, int)
31 #define IFXMIPS_WDT_IOC_SET_LPEN                        _IOW(IFXMIPS_WDT_IOC_MAGIC, 5, int)
32 #define IFXMIPS_WDT_IOC_GET_STATUS              _IOR(IFXMIPS_WDT_IOC_MAGIC, 6, int)
33 #define IFXMIPS_WDT_IOC_SET_CLKDIV              _IOW(IFXMIPS_WDT_IOC_MAGIC, 7, int)
34
35 /* password 1 and 2 */
36 #define IFXMIPS_WDT_PW1                                  0x000000BE
37 #define IFXMIPS_WDT_PW2                                  0x000000DC
38
39 #define IFXMIPS_WDT_CLKDIV0_VAL                 1
40 #define IFXMIPS_WDT_CLKDIV1_VAL                 64
41 #define IFXMIPS_WDT_CLKDIV2_VAL                 4096
42 #define IFXMIPS_WDT_CLKDIV3_VAL                 262144
43 #define IFXMIPS_WDT_CLKDIV0                             0
44 #define IFXMIPS_WDT_CLKDIV1                             1
45 #define IFXMIPS_WDT_CLKDIV2                             2
46 #define IFXMIPS_WDT_CLKDIV3                             3
47
48 #endif