imxwdogreg.h revision 1.3 1 /*-
2 * Copyright (c) 2010 Genetec Corporation. All rights reserved.
3 * Written by Hiroyuki Bessho for Genetec Corporation.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following
12 * disclaimer in the documentation and/or other materials provided
13 * with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS''
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
18 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS
19 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
22 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29 /*
30 * Watchdog register definitions for Freescale i.MX31/i.MX51/i.MX6
31 *
32 * MCIMX31 and MCIMX31L Application Processors
33 * Reference Manual
34 * MCIMC31RM
35 * Rev. 2.3
36 * 1/2007
37 *
38 * MCIMX51 Multimedia Applications Processor
39 * Reference Manual
40 * MCIMX51RM
41 * Rev. 1
42 * 2/2010
43 *
44 * i.MX 6Dual/6Quad Applications Processor
45 * Reference Manual
46 * IMX6DQRM
47 * Rev. 1
48 * 4/2013
49 */
50
51 #ifndef _ARM_IMX_IMXWDOGREG_H
52 #define _ARM_IMX_IMXWDOGREG_H
53
54 #define IMX_WDOG_WCR 0x0000 /* Watchdog Control Register */
55 #define WCR_WDZST __BIT(0) /* watchdog low power */
56 #define WCR_WDBG __BIT(1) /* watchdog debug enable */
57 #define WCR_WDE __BIT(2) /* watchdog enable */
58 #define WCR_WDT __BIT(3) /* timeout assertion */
59 #define WCR_SRS __BIT(4) /* software reset signal */
60 #define WCR_WDA __BIT(5) /* ipp_wdog* assertion */
61 #define WCR_WDW __BIT(7) /* disable for wait */
62 #define WCR_WT __BITS(15, 8)
63 /* watchdog timeout
64 0=0.5sec 0xff=128sec */
65
66 #define IMX_WDOG_WSR 0x0002 /* Watchdog Service Register */
67 #define WSR_MAGIC1 0x5555 /* 1st word of service sequence */
68 #define WSR_MAGIC2 0xaaaa /* 2nd word of service sequence */
69
70 #define IMX_WDOG_WRSR 0x0004 /* Watchdog Reset Status Register */
71 #define WRSR_SFTW __BIT(0) /* reset is the result of a
72 * software reset */
73 #define WRSR_TOUT __BIT(1) /* reset is the result of a
74 * WDOG timeout */
75 /* only for i.MX31 */
76 #define WRSR_CMON __BIT(2)
77 #define WRSR_EXT __BIT(3)
78 #define WRSR_JRST __BIT(5)
79 /* i.MX31 and iMX6 */
80 #define WRSR_PWR __BIT(4)
81
82 /* only for i.MX51 and i.MX6 */
83 #define IMX_WDOG_WICR 0x0006 /* Watchdog Interrupt Control Register */
84 #define WICR_WICT __BITS(7,0) /* interrupt count timeout */
85 #define WICR_WTIS __BIT(14) /* interrupt status [w1c] */
86 #define WICR_WIE __BIT(15) /* interrupt enable */
87
88 /* only for i.MX51 and i.MX6 */
89 #define IMX_WDOG_WMCR 0x0008
90 #define WMCR_PDE __BIT(0) /* power down enable */
91
92 #endif /* _ARM_IMX_IMXWDOGREG_H */
93