Tue Jun 18 23:39:44 2013 UTC ()
Add OMAP5_PRM_RSTCTRL definition


(matt)
diff -r1.21 -r1.22 src/sys/arch/arm/omap/omap2_reg.h

cvs diff -r1.21 -r1.22 src/sys/arch/arm/omap/Attic/omap2_reg.h (switch to unified diff)

--- src/sys/arch/arm/omap/Attic/omap2_reg.h 2013/06/18 22:41:03 1.21
+++ src/sys/arch/arm/omap/Attic/omap2_reg.h 2013/06/18 23:39:44 1.22
@@ -1,804 +1,805 @@ @@ -1,804 +1,805 @@
1/* $NetBSD: omap2_reg.h,v 1.21 2013/06/18 22:41:03 matt Exp $ */ 1/* $NetBSD: omap2_reg.h,v 1.22 2013/06/18 23:39:44 matt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2007 Microsoft 4 * Copyright (c) 2007 Microsoft
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software 15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement: 16 * must display the following acknowledgement:
17 * This product includes software developed by Microsoft 17 * This product includes software developed by Microsoft
18 * 18 *
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
20 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT, 22 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT,
23 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE. 29 * SUCH DAMAGE.
30 */ 30 */
31 31
32#ifndef _ARM_OMAP_OMAP2_REG_H_ 32#ifndef _ARM_OMAP_OMAP2_REG_H_
33#define _ARM_OMAP_OMAP2_REG_H_ 33#define _ARM_OMAP_OMAP2_REG_H_
34 34
35#include "opt_omap.h" 35#include "opt_omap.h"
36 36
37/* 37/*
38 * Header for misc. omap2/3/4 registers 38 * Header for misc. omap2/3/4 registers
39 */ 39 */
40 40
41/* 41/*
42 * L4 Interconnect WAKEUP address space 42 * L4 Interconnect WAKEUP address space
43 */ 43 */
44#define OMAP2430_L4_CORE_BASE 0x48000000 44#define OMAP2430_L4_CORE_BASE 0x48000000
45#define OMAP2430_L4_CORE_SIZE (16 << 20) /* 16 MB */ 45#define OMAP2430_L4_CORE_SIZE (16 << 20) /* 16 MB */
46 46
47#define OMAP2430_L4_WAKEUP_BASE 0x49000000 47#define OMAP2430_L4_WAKEUP_BASE 0x49000000
48#define OMAP2430_L4_WAKEUP_SIZE (8 << 20) /* 8 MB */ 48#define OMAP2430_L4_WAKEUP_SIZE (8 << 20) /* 8 MB */
49 49
50#define OMAP3430_L4_CORE_BASE 0x48000000 50#define OMAP3430_L4_CORE_BASE 0x48000000
51#define OMAP3430_L4_CORE_SIZE 0x01000000 /* 16 MB */ 51#define OMAP3430_L4_CORE_SIZE 0x01000000 /* 16 MB */
52 52
53#define OMAP3530_L4_CORE_BASE 0x48000000 53#define OMAP3530_L4_CORE_BASE 0x48000000
54#define OMAP3530_L4_CORE_SIZE 0x01000000 /* 16 MB */ 54#define OMAP3530_L4_CORE_SIZE 0x01000000 /* 16 MB */
55 55
56/* OMAP3 processors */ 56/* OMAP3 processors */
57 57
58#define OMAP3430_L4_WAKEUP_BASE 0x48300000 58#define OMAP3430_L4_WAKEUP_BASE 0x48300000
59#define OMAP3430_L4_WAKEUP_SIZE 0x00040000 /* 256KB */ 59#define OMAP3430_L4_WAKEUP_SIZE 0x00040000 /* 256KB */
60 60
61#define OMAP3430_L4_PERIPHERAL_BASE 0x49000000 61#define OMAP3430_L4_PERIPHERAL_BASE 0x49000000
62#define OMAP3430_L4_PERIPHERAL_SIZE 0x00100000 /* 1MB */ 62#define OMAP3430_L4_PERIPHERAL_SIZE 0x00100000 /* 1MB */
63 63
64#define OMAP3430_L4_EMULATION_BASE 0x54000000 64#define OMAP3430_L4_EMULATION_BASE 0x54000000
65#define OMAP3430_L4_EMULATION_SIZE 0x00800000 /* 8MB */ 65#define OMAP3430_L4_EMULATION_SIZE 0x00800000 /* 8MB */
66 66
67#define OMAP3530_L4_WAKEUP_BASE 0x48300000 67#define OMAP3530_L4_WAKEUP_BASE 0x48300000
68#define OMAP3530_L4_WAKEUP_SIZE 0x00040000 /* 256KB */ 68#define OMAP3530_L4_WAKEUP_SIZE 0x00040000 /* 256KB */
69 69
70#define OMAP3530_L4_PERIPHERAL_BASE 0x49000000 70#define OMAP3530_L4_PERIPHERAL_BASE 0x49000000
71#define OMAP3530_L4_PERIPHERAL_SIZE 0x00100000 /* 1MB */ 71#define OMAP3530_L4_PERIPHERAL_SIZE 0x00100000 /* 1MB */
72 72
73#define OMAP3530_L4_EMULATION_BASE 0x54000000 73#define OMAP3530_L4_EMULATION_BASE 0x54000000
74#define OMAP3530_L4_EMULATION_SIZE 0x00800000 /* 8MB */ 74#define OMAP3530_L4_EMULATION_SIZE 0x00800000 /* 8MB */
75 75
76/* OMAP4 processors */ 76/* OMAP4 processors */
77 77
78#define OMAP4430_L4_CORE_BASE 0x4A000000 78#define OMAP4430_L4_CORE_BASE 0x4A000000
79#define OMAP4430_L4_CORE_SIZE 0x01000000 /* 16MB - CFG */ 79#define OMAP4430_L4_CORE_SIZE 0x01000000 /* 16MB - CFG */
80 80
81#define OMAP4430_L4_WAKEUP_BASE 0x4A300000 81#define OMAP4430_L4_WAKEUP_BASE 0x4A300000
82#define OMAP4430_L4_WAKEUP_SIZE 0x00040000 /* 256KB */ 82#define OMAP4430_L4_WAKEUP_SIZE 0x00040000 /* 256KB */
83 83
84#define OMAP4430_L4_PERIPHERAL_BASE 0x48000000 84#define OMAP4430_L4_PERIPHERAL_BASE 0x48000000
85#define OMAP4430_L4_PERIPHERAL_SIZE 0x01000000 /* 16MB */ 85#define OMAP4430_L4_PERIPHERAL_SIZE 0x01000000 /* 16MB */
86 86
87#define OMAP4430_L4_ABE_BASE 0x49000000 /* Actually L3 */ 87#define OMAP4430_L4_ABE_BASE 0x49000000 /* Actually L3 */
88#define OMAP4430_L4_ABE_SIZE 0x01000000 /* 16MB */ 88#define OMAP4430_L4_ABE_SIZE 0x01000000 /* 16MB */
89 89
90#define OMAP4430_EMIF1_BASE 0x4C000000 /* MemCtrl 0 */ 90#define OMAP4430_EMIF1_BASE 0x4C000000 /* MemCtrl 0 */
91#define OMAP4430_EMIF1_SIZE 0x00100000 /* 4KB padded to 1M */ 91#define OMAP4430_EMIF1_SIZE 0x00100000 /* 4KB padded to 1M */
92 92
93#define OMAP4430_EMIF2_BASE 0x4D000000 /* MemCtrl 1 */ 93#define OMAP4430_EMIF2_BASE 0x4D000000 /* MemCtrl 1 */
94#define OMAP4430_EMIF2_SIZE 0x00100000 /* 4KB padded to 1M */ 94#define OMAP4430_EMIF2_SIZE 0x00100000 /* 4KB padded to 1M */
95 95
96/* OMAP5 processors */ 96/* OMAP5 processors */
97 97
98#define OMAP5430_L4_CORE_BASE 0x4A000000 98#define OMAP5430_L4_CORE_BASE 0x4A000000
99#define OMAP5430_L4_CORE_SIZE 0x01000000 /* 16MB - CFG */ 99#define OMAP5430_L4_CORE_SIZE 0x01000000 /* 16MB - CFG */
100 100
101#define OMAP5430_L4_WAKEUP_BASE 0x4AE00000 101#define OMAP5430_L4_WAKEUP_BASE 0x4AE00000
102#define OMAP5430_L4_WAKEUP_SIZE 0x00200000 /* 2M */ 102#define OMAP5430_L4_WAKEUP_SIZE 0x00200000 /* 2M */
103 103
104#define OMAP5430_L4_PERIPHERAL_BASE 0x48000000 104#define OMAP5430_L4_PERIPHERAL_BASE 0x48000000
105#define OMAP5430_L4_PERIPHERAL_SIZE 0x01000000 /* 16MB */ 105#define OMAP5430_L4_PERIPHERAL_SIZE 0x01000000 /* 16MB */
106 106
107#define OMAP5430_L4_ABE_BASE 0x49000000 /* Actually L3 */ 107#define OMAP5430_L4_ABE_BASE 0x49000000 /* Actually L3 */
108#define OMAP5430_L4_ABE_SIZE 0x01000000 /* 16MB */ 108#define OMAP5430_L4_ABE_SIZE 0x01000000 /* 16MB */
109 109
110#define OMAP5430_EMIF1_BASE 0x4C000000 /* MemCtrl 0 */ 110#define OMAP5430_EMIF1_BASE 0x4C000000 /* MemCtrl 0 */
111#define OMAP5430_EMIF1_SIZE 0x00100000 /* 4KB padded to 1M */ 111#define OMAP5430_EMIF1_SIZE 0x00100000 /* 4KB padded to 1M */
112 112
113#define OMAP5430_EMIF2_BASE 0x4D000000 /* MemCtrl 1 */ 113#define OMAP5430_EMIF2_BASE 0x4D000000 /* MemCtrl 1 */
114#define OMAP5430_EMIF2_SIZE 0x00100000 /* 4KB padded to 1M */ 114#define OMAP5430_EMIF2_SIZE 0x00100000 /* 4KB padded to 1M */
115 115
116/* TI Sitara AM335x (OMAP like) */ 116/* TI Sitara AM335x (OMAP like) */
117 117
118#define TI_AM335X_L4_WAKEUP_BASE 0x44C00000 118#define TI_AM335X_L4_WAKEUP_BASE 0x44C00000
119#define TI_AM335X_L4_WAKEUP_SIZE 0x00400000 /* 4MB */ 119#define TI_AM335X_L4_WAKEUP_SIZE 0x00400000 /* 4MB */
120 120
121#define TI_AM335X_L4_PERIPHERAL_BASE 0x48000000 121#define TI_AM335X_L4_PERIPHERAL_BASE 0x48000000
122#define TI_AM335X_L4_PERIPHERAL_SIZE 0x01000000 /* 16MB */ 122#define TI_AM335X_L4_PERIPHERAL_SIZE 0x01000000 /* 16MB */
123 123
124#define TI_AM335X_L4_FAST_BASE 0x4A000000 124#define TI_AM335X_L4_FAST_BASE 0x4A000000
125#define TI_AM335X_L4_FAST_SIZE 0x01000000 /* 16MB */ 125#define TI_AM335X_L4_FAST_SIZE 0x01000000 /* 16MB */
126 126
127#define TI_AM335X_EMIF1_BASE 0x4C000000 127#define TI_AM335X_EMIF1_BASE 0x4C000000
128#define TI_AM335X_EMIF1_SIZE 0x00100000 /* 4KB pad to 1MB */ 128#define TI_AM335X_EMIF1_SIZE 0x00100000 /* 4KB pad to 1MB */
129 129
130/* TI Sitara DM37xx (OMAP like) */ 130/* TI Sitara DM37xx (OMAP like) */
131 131
132#define TI_DM37XX_L4_CORE_BASE 0x48000000 132#define TI_DM37XX_L4_CORE_BASE 0x48000000
133#define TI_DM37XX_L4_CORE_SIZE 0x01000000 /* 16MB */ 133#define TI_DM37XX_L4_CORE_SIZE 0x01000000 /* 16MB */
134 134
135#define TI_DM37XX_L4_WAKEUP_BASE 0x48300000 135#define TI_DM37XX_L4_WAKEUP_BASE 0x48300000
136#define TI_DM37XX_L4_WAKEUP_SIZE 0x00010000 /* 64KB */ 136#define TI_DM37XX_L4_WAKEUP_SIZE 0x00010000 /* 64KB */
137 137
138#define TI_DM37XX_L4_PERIPHERAL_BASE 0x49000000 138#define TI_DM37XX_L4_PERIPHERAL_BASE 0x49000000
139#define TI_DM37XX_L4_PERIPHERAL_SIZE 0x01000000 /* 16MB */ 139#define TI_DM37XX_L4_PERIPHERAL_SIZE 0x01000000 /* 16MB */
140 140
141#define TI_DM37XX_L4_EMULATION_BASE 0x54000000 141#define TI_DM37XX_L4_EMULATION_BASE 0x54000000
142#define TI_DM37XX_L4_EMULATION_SIZE 0x00800000 /* 8MB */ 142#define TI_DM37XX_L4_EMULATION_SIZE 0x00800000 /* 8MB */
143 143
144/* 144/*
145 * Clock Management registers base, offsets, and size 145 * Clock Management registers base, offsets, and size
146 */ 146 */
147#ifdef OMAP_2430 147#ifdef OMAP_2430
148#define OMAP2_CM_BASE 0x49006000 148#define OMAP2_CM_BASE 0x49006000
149#endif 149#endif
150#ifdef OMAP_2420 150#ifdef OMAP_2420
151#define OMAP2_CM_BASE 0x48008000 151#define OMAP2_CM_BASE 0x48008000
152#endif 152#endif
153#ifdef OMAP_3430 153#ifdef OMAP_3430
154#define OMAP2_CM_BASE (OMAP3430_L4_CORE_BASE + 0x04000) 154#define OMAP2_CM_BASE (OMAP3430_L4_CORE_BASE + 0x04000)
155#endif 155#endif
156#ifdef OMAP_3530 156#ifdef OMAP_3530
157#define OMAP2_CM_BASE (OMAP3530_L4_CORE_BASE + 0x04000) 157#define OMAP2_CM_BASE (OMAP3530_L4_CORE_BASE + 0x04000)
158#endif 158#endif
159#ifdef OMAP_4430 159#ifdef OMAP_4430
160#define OMAP2_CM_BASE (OMAP4430_L4_CORE_BASE + 0x04000) 160#define OMAP2_CM_BASE (OMAP4430_L4_CORE_BASE + 0x04000)
161#endif 161#endif
162#ifdef OMAP_5430 162#ifdef OMAP_5430
163#define OMAP2_CM_BASE (OMAP5430_L4_CORE_BASE + 0x04000) 163#define OMAP2_CM_BASE (OMAP5430_L4_CORE_BASE + 0x04000)
164#endif 164#endif
165#ifdef TI_AM335X 165#ifdef TI_AM335X
166#define OMAP2_CM_BASE (TI_AM335X_L4_WAKEUP_BASE + 0x200000) 166#define OMAP2_CM_BASE (TI_AM335X_L4_WAKEUP_BASE + 0x200000)
167#endif 167#endif
168#ifdef TI_DM37XX 168#ifdef TI_DM37XX
169#define OMAP2_CM_BASE 0x48004000 169#define OMAP2_CM_BASE 0x48004000
170#endif 170#endif
171 171
172#define OMAP2_CM_CLKSEL_MPU 0x140 172#define OMAP2_CM_CLKSEL_MPU 0x140
173#define OMAP2_CM_FCLKEN1_CORE 0x200 173#define OMAP2_CM_FCLKEN1_CORE 0x200
174#define OMAP2_CM_FCLKEN2_CORE 0x204 174#define OMAP2_CM_FCLKEN2_CORE 0x204
175#define OMAP2_CM_ICLKEN1_CORE 0x210 175#define OMAP2_CM_ICLKEN1_CORE 0x210
176#define OMAP2_CM_ICLKEN2_CORE 0x214 176#define OMAP2_CM_ICLKEN2_CORE 0x214
177#define OMAP2_CM_CLKSEL2_CORE 0x244 177#define OMAP2_CM_CLKSEL2_CORE 0x244
178#define OMAP3_CM_IDLEST1_CORE 0xa20 178#define OMAP3_CM_IDLEST1_CORE 0xa20
179#define OMAP2_CM_SIZE (0x1000) 179#define OMAP2_CM_SIZE (0x1000)
180 180
181/* 181/*
182 * bit defines for OMAP2_CM_CLKSEL_MPU 182 * bit defines for OMAP2_CM_CLKSEL_MPU
183 */ 183 */
184#define OMAP2_CM_CLKSEL_MPU_FULLSPEED 1 184#define OMAP2_CM_CLKSEL_MPU_FULLSPEED 1
185#define OMAP2_CM_CLKSEL_MPU_HALFSPEED 2 185#define OMAP2_CM_CLKSEL_MPU_HALFSPEED 2
186 186
187/* 187/*
188 * bit defines for OMAP2_CM_FCLKEN2_CORE 188 * bit defines for OMAP2_CM_FCLKEN2_CORE
189 */ 189 */
190#define OMAP2_CM_FCLKEN1_CORE_EN_DSS1 __BIT(0) 190#define OMAP2_CM_FCLKEN1_CORE_EN_DSS1 __BIT(0)
191#define OMAP2_CM_FCLKEN1_CORE_EN_DSS2 __BIT(1) 191#define OMAP2_CM_FCLKEN1_CORE_EN_DSS2 __BIT(1)
192#define OMAP2_CM_FCLKEN1_CORE_EN_TV __BIT(2) 192#define OMAP2_CM_FCLKEN1_CORE_EN_TV __BIT(2)
193#define OMAP2_CM_FCLKEN1_CORE_RESa __BIT(3) 193#define OMAP2_CM_FCLKEN1_CORE_RESa __BIT(3)
194#define OMAP2_CM_FCLKEN1_CORE_EN_GPT2 __BIT(4) 194#define OMAP2_CM_FCLKEN1_CORE_EN_GPT2 __BIT(4)
195#define OMAP2_CM_FCLKEN1_CORE_EN_GPT3 __BIT(5) 195#define OMAP2_CM_FCLKEN1_CORE_EN_GPT3 __BIT(5)
196#define OMAP2_CM_FCLKEN1_CORE_EN_GPT4 __BIT(6) 196#define OMAP2_CM_FCLKEN1_CORE_EN_GPT4 __BIT(6)
197#define OMAP2_CM_FCLKEN1_CORE_EN_GPT5 __BIT(7) 197#define OMAP2_CM_FCLKEN1_CORE_EN_GPT5 __BIT(7)
198#define OMAP2_CM_FCLKEN1_CORE_EN_GPT6 __BIT(8) 198#define OMAP2_CM_FCLKEN1_CORE_EN_GPT6 __BIT(8)
199#define OMAP2_CM_FCLKEN1_CORE_EN_GPT7 __BIT(9) 199#define OMAP2_CM_FCLKEN1_CORE_EN_GPT7 __BIT(9)
200#define OMAP2_CM_FCLKEN1_CORE_EN_GPT8 __BIT(10) 200#define OMAP2_CM_FCLKEN1_CORE_EN_GPT8 __BIT(10)
201#define OMAP2_CM_FCLKEN1_CORE_EN_GPT9 __BIT(11) 201#define OMAP2_CM_FCLKEN1_CORE_EN_GPT9 __BIT(11)
202#define OMAP2_CM_FCLKEN1_CORE_EN_GPT10 __BIT(12) 202#define OMAP2_CM_FCLKEN1_CORE_EN_GPT10 __BIT(12)
203#define OMAP2_CM_FCLKEN1_CORE_EN_GPT11 __BIT(13) 203#define OMAP2_CM_FCLKEN1_CORE_EN_GPT11 __BIT(13)
204#define OMAP2_CM_FCLKEN1_CORE_EN_GPT12 __BIT(14) 204#define OMAP2_CM_FCLKEN1_CORE_EN_GPT12 __BIT(14)
205#define OMAP2_CM_FCLKEN1_CORE_EN_MCBSP1 __BIT(15) 205#define OMAP2_CM_FCLKEN1_CORE_EN_MCBSP1 __BIT(15)
206#define OMAP2_CM_FCLKEN1_CORE_EN_MCBSP2 __BIT(16) 206#define OMAP2_CM_FCLKEN1_CORE_EN_MCBSP2 __BIT(16)
207#define OMAP2_CM_FCLKEN1_CORE_EN_MCSPI1 __BIT(17) 207#define OMAP2_CM_FCLKEN1_CORE_EN_MCSPI1 __BIT(17)
208#define OMAP2_CM_FCLKEN1_CORE_EN_MCSPI2 __BIT(18) 208#define OMAP2_CM_FCLKEN1_CORE_EN_MCSPI2 __BIT(18)
209#define OMAP2_CM_FCLKEN1_CORE_RESb __BITS(20,19) 209#define OMAP2_CM_FCLKEN1_CORE_RESb __BITS(20,19)
210#define OMAP2_CM_FCLKEN1_CORE_EN_UART1 __BIT(21) 210#define OMAP2_CM_FCLKEN1_CORE_EN_UART1 __BIT(21)
211#define OMAP2_CM_FCLKEN1_CORE_EN_UART2 __BIT(22) 211#define OMAP2_CM_FCLKEN1_CORE_EN_UART2 __BIT(22)
212#define OMAP2_CM_FCLKEN1_CORE_EN_HDQ __BIT(23) 212#define OMAP2_CM_FCLKEN1_CORE_EN_HDQ __BIT(23)
213#define OMAP2_CM_FCLKEN1_CORE_RESc __BIT(24) 213#define OMAP2_CM_FCLKEN1_CORE_RESc __BIT(24)
214#define OMAP2_CM_FCLKEN1_CORE_EN_FAC __BIT(25) 214#define OMAP2_CM_FCLKEN1_CORE_EN_FAC __BIT(25)
215#define OMAP2_CM_FCLKEN1_CORE_RESd __BIT(26) 215#define OMAP2_CM_FCLKEN1_CORE_RESd __BIT(26)
216#define OMAP2_CM_FCLKEN1_CORE_EN_MSPRO __BIT(27) 216#define OMAP2_CM_FCLKEN1_CORE_EN_MSPRO __BIT(27)
217#define OMAP2_CM_FCLKEN1_CORE_RESe __BIT(28) 217#define OMAP2_CM_FCLKEN1_CORE_RESe __BIT(28)
218#define OMAP2_CM_FCLKEN1_CORE_EN_WDT4 __BIT(29) 218#define OMAP2_CM_FCLKEN1_CORE_EN_WDT4 __BIT(29)
219#define OMAP2_CM_FCLKEN1_CORE_RESf __BIT(30) 219#define OMAP2_CM_FCLKEN1_CORE_RESf __BIT(30)
220#define OMAP2_CM_FCLKEN1_CORE_EN_CAM __BIT(31) 220#define OMAP2_CM_FCLKEN1_CORE_EN_CAM __BIT(31)
221#define OMAP2_CM_FCLKEN1_CORE_RESV \ 221#define OMAP2_CM_FCLKEN1_CORE_RESV \
222 (OMAP2_CM_FCLKEN1_CORE_RESa \ 222 (OMAP2_CM_FCLKEN1_CORE_RESa \
223 |OMAP2_CM_FCLKEN1_CORE_RESb \ 223 |OMAP2_CM_FCLKEN1_CORE_RESb \
224 |OMAP2_CM_FCLKEN1_CORE_RESc \ 224 |OMAP2_CM_FCLKEN1_CORE_RESc \
225 |OMAP2_CM_FCLKEN1_CORE_RESd \ 225 |OMAP2_CM_FCLKEN1_CORE_RESd \
226 |OMAP2_CM_FCLKEN1_CORE_RESe \ 226 |OMAP2_CM_FCLKEN1_CORE_RESe \
227 |OMAP2_CM_FCLKEN1_CORE_RESf) 227 |OMAP2_CM_FCLKEN1_CORE_RESf)
228 228
229 229
230/* 230/*
231 * bit defines for OMAP2_CM_FCLKEN2_CORE 231 * bit defines for OMAP2_CM_FCLKEN2_CORE
232 */ 232 */
233#define OMAP2_CM_FCLKEN2_CORE_EN_USB __BIT(0) 233#define OMAP2_CM_FCLKEN2_CORE_EN_USB __BIT(0)
234#define OMAP2_CM_FCLKEN2_CORE_EN_SSI __BIT(1) 234#define OMAP2_CM_FCLKEN2_CORE_EN_SSI __BIT(1)
235#define OMAP2_CM_FCLKEN2_CORE_EN_UART3 __BIT(2) 235#define OMAP2_CM_FCLKEN2_CORE_EN_UART3 __BIT(2)
236#define OMAP2_CM_FCLKEN2_CORE_EN_MCBSP3 __BIT(3) 236#define OMAP2_CM_FCLKEN2_CORE_EN_MCBSP3 __BIT(3)
237#define OMAP2_CM_FCLKEN2_CORE_EN_MCBSP4 __BIT(4) 237#define OMAP2_CM_FCLKEN2_CORE_EN_MCBSP4 __BIT(4)
238#define OMAP2_CM_FCLKEN2_CORE_EN_MCBSP5 __BIT(5) 238#define OMAP2_CM_FCLKEN2_CORE_EN_MCBSP5 __BIT(5)
239#define OMAP2_CM_FCLKEN2_CORE_RESa __BIT(6) 239#define OMAP2_CM_FCLKEN2_CORE_RESa __BIT(6)
240#define OMAP2_CM_FCLKEN2_CORE_EN_MMCHS1 __BIT(7) 240#define OMAP2_CM_FCLKEN2_CORE_EN_MMCHS1 __BIT(7)
241#define OMAP2_CM_FCLKEN2_CORE_EN_MMCHS2 __BIT(8) 241#define OMAP2_CM_FCLKEN2_CORE_EN_MMCHS2 __BIT(8)
242#define OMAP2_CM_FCLKEN2_CORE_EN_NCSPI3 __BIT(9) 242#define OMAP2_CM_FCLKEN2_CORE_EN_NCSPI3 __BIT(9)
243#define OMAP2_CM_FCLKEN2_CORE_EN_GPIO5 __BIT(10) 243#define OMAP2_CM_FCLKEN2_CORE_EN_GPIO5 __BIT(10)
244#define OMAP2_CM_FCLKEN2_CORE_RESb __BITS(15,11) 244#define OMAP2_CM_FCLKEN2_CORE_RESb __BITS(15,11)
245#define OMAP2_CM_FCLKEN2_CORE_EN_MMCHSDB1 __BIT(16) 245#define OMAP2_CM_FCLKEN2_CORE_EN_MMCHSDB1 __BIT(16)
246#define OMAP2_CM_FCLKEN2_CORE_EN_MMCHSDB2 __BIT(17) 246#define OMAP2_CM_FCLKEN2_CORE_EN_MMCHSDB2 __BIT(17)
247#define OMAP2_CM_FCLKEN2_CORE_RESc __BIT(18) 247#define OMAP2_CM_FCLKEN2_CORE_RESc __BIT(18)
248#define OMAP2_CM_FCLKEN2_CORE_I2CHS1 __BIT(19) 248#define OMAP2_CM_FCLKEN2_CORE_I2CHS1 __BIT(19)
249#define OMAP2_CM_FCLKEN2_CORE_I2CHS2 __BIT(20) 249#define OMAP2_CM_FCLKEN2_CORE_I2CHS2 __BIT(20)
250#define OMAP2_CM_FCLKEN2_CORE_RESd __BITS(31,21) 250#define OMAP2_CM_FCLKEN2_CORE_RESd __BITS(31,21)
251#define OMAP2_CM_FCLKEN2_CORE_RESV \ 251#define OMAP2_CM_FCLKEN2_CORE_RESV \
252 (OMAP2_CM_FCLKEN2_CORE_RESa \ 252 (OMAP2_CM_FCLKEN2_CORE_RESa \
253 |OMAP2_CM_FCLKEN2_CORE_RESb \ 253 |OMAP2_CM_FCLKEN2_CORE_RESb \
254 |OMAP2_CM_FCLKEN2_CORE_RESc \ 254 |OMAP2_CM_FCLKEN2_CORE_RESc \
255 |OMAP2_CM_FCLKEN2_CORE_RESd) 255 |OMAP2_CM_FCLKEN2_CORE_RESd)
256 256
257 257
258/* 258/*
259 * bit defines for OMAP2_CM_ICLKEN1_CORE 259 * bit defines for OMAP2_CM_ICLKEN1_CORE
260 */ 260 */
261#define OMAP2_CM_ICLKEN1_CORE_EN_DSS __BIT(0) 261#define OMAP2_CM_ICLKEN1_CORE_EN_DSS __BIT(0)
262#define OMAP2_CM_ICLKEN1_CORE_RESa __BITS(3,1) 262#define OMAP2_CM_ICLKEN1_CORE_RESa __BITS(3,1)
263#define OMAP2_CM_ICLKEN1_CORE_EN_GPT2 __BIT(4) 263#define OMAP2_CM_ICLKEN1_CORE_EN_GPT2 __BIT(4)
264#define OMAP2_CM_ICLKEN1_CORE_EN_GPT3 __BIT(5) 264#define OMAP2_CM_ICLKEN1_CORE_EN_GPT3 __BIT(5)
265#define OMAP2_CM_ICLKEN1_CORE_EN_GPT4 __BIT(6) 265#define OMAP2_CM_ICLKEN1_CORE_EN_GPT4 __BIT(6)
266#define OMAP2_CM_ICLKEN1_CORE_EN_GPT5 __BIT(7) 266#define OMAP2_CM_ICLKEN1_CORE_EN_GPT5 __BIT(7)
267#define OMAP2_CM_ICLKEN1_CORE_EN_GPT6 __BIT(8) 267#define OMAP2_CM_ICLKEN1_CORE_EN_GPT6 __BIT(8)
268#define OMAP2_CM_ICLKEN1_CORE_EN_GPT7 __BIT(9) 268#define OMAP2_CM_ICLKEN1_CORE_EN_GPT7 __BIT(9)
269#define OMAP2_CM_ICLKEN1_CORE_EN_GPT8 __BIT(10) 269#define OMAP2_CM_ICLKEN1_CORE_EN_GPT8 __BIT(10)
270#define OMAP2_CM_ICLKEN1_CORE_EN_GPT9 __BIT(11) 270#define OMAP2_CM_ICLKEN1_CORE_EN_GPT9 __BIT(11)
271#define OMAP2_CM_ICLKEN1_CORE_EN_GPT10 __BIT(12) 271#define OMAP2_CM_ICLKEN1_CORE_EN_GPT10 __BIT(12)
272#define OMAP2_CM_ICLKEN1_CORE_EN_GPT11 __BIT(13) 272#define OMAP2_CM_ICLKEN1_CORE_EN_GPT11 __BIT(13)
273#define OMAP2_CM_ICLKEN1_CORE_EN_GPT12 __BIT(14) 273#define OMAP2_CM_ICLKEN1_CORE_EN_GPT12 __BIT(14)
274#define OMAP2_CM_ICLKEN1_CORE_EN_MCBSP1 __BIT(15) 274#define OMAP2_CM_ICLKEN1_CORE_EN_MCBSP1 __BIT(15)
275#define OMAP2_CM_ICLKEN1_CORE_EN_MCBSP2 __BIT(16) 275#define OMAP2_CM_ICLKEN1_CORE_EN_MCBSP2 __BIT(16)
276#define OMAP2_CM_ICLKEN1_CORE_EN_MCSPI1 __BIT(17) 276#define OMAP2_CM_ICLKEN1_CORE_EN_MCSPI1 __BIT(17)
277#define OMAP2_CM_ICLKEN1_CORE_EN_MCSPI2 __BIT(18) 277#define OMAP2_CM_ICLKEN1_CORE_EN_MCSPI2 __BIT(18)
278#define OMAP2_CM_ICLKEN1_CORE_EN_I2C1 __BIT(19) 278#define OMAP2_CM_ICLKEN1_CORE_EN_I2C1 __BIT(19)
279#define OMAP2_CM_ICLKEN1_CORE_EN_I2C2 __BIT(20) 279#define OMAP2_CM_ICLKEN1_CORE_EN_I2C2 __BIT(20)
280#define OMAP2_CM_ICLKEN1_CORE_EN_UART1 __BIT(21) 280#define OMAP2_CM_ICLKEN1_CORE_EN_UART1 __BIT(21)
281#define OMAP2_CM_ICLKEN1_CORE_EN_UART2 __BIT(22) 281#define OMAP2_CM_ICLKEN1_CORE_EN_UART2 __BIT(22)
282#define OMAP2_CM_ICLKEN1_CORE_EN_HDQ __BIT(23) 282#define OMAP2_CM_ICLKEN1_CORE_EN_HDQ __BIT(23)
283#define OMAP2_CM_ICLKEN1_CORE_RESb __BIT(24) 283#define OMAP2_CM_ICLKEN1_CORE_RESb __BIT(24)
284#define OMAP2_CM_ICLKEN1_CORE_EN_FAC __BIT(25) 284#define OMAP2_CM_ICLKEN1_CORE_EN_FAC __BIT(25)
285#define OMAP2_CM_ICLKEN1_CORE_RESc __BIT(26) 285#define OMAP2_CM_ICLKEN1_CORE_RESc __BIT(26)
286#define OMAP2_CM_ICLKEN1_CORE_EN_MSPR0 __BIT(27) 286#define OMAP2_CM_ICLKEN1_CORE_EN_MSPR0 __BIT(27)
287#define OMAP2_CM_ICLKEN1_CORE_RESd __BIT(28) 287#define OMAP2_CM_ICLKEN1_CORE_RESd __BIT(28)
288#define OMAP2_CM_ICLKEN1_CORE_EN_WDT4 __BIT(29) 288#define OMAP2_CM_ICLKEN1_CORE_EN_WDT4 __BIT(29)
289#define OMAP2_CM_ICLKEN1_CORE_EN_MAILBOXES __BIT(30) 289#define OMAP2_CM_ICLKEN1_CORE_EN_MAILBOXES __BIT(30)
290#define OMAP2_CM_ICLKEN1_CORE_EN_CAM __BIT(31) 290#define OMAP2_CM_ICLKEN1_CORE_EN_CAM __BIT(31)
291#define OMAP2_CM_ICLKEN1_CORE_RESV \ 291#define OMAP2_CM_ICLKEN1_CORE_RESV \
292 (OMAP2_CM_ICLKEN1_CORE_RESa \ 292 (OMAP2_CM_ICLKEN1_CORE_RESa \
293 |OMAP2_CM_ICLKEN1_CORE_RESb \ 293 |OMAP2_CM_ICLKEN1_CORE_RESb \
294 |OMAP2_CM_ICLKEN1_CORE_RESc \ 294 |OMAP2_CM_ICLKEN1_CORE_RESc \
295 |OMAP2_CM_ICLKEN1_CORE_RESd) 295 |OMAP2_CM_ICLKEN1_CORE_RESd)
296 296
297 297
298/* 298/*
299 * bit defines for OMAP2_CM_ICLKEN2_CORE 299 * bit defines for OMAP2_CM_ICLKEN2_CORE
300 */ 300 */
301#define OMAP2_CM_ICLKEN2_CORE_EN_USB __BIT(0) 301#define OMAP2_CM_ICLKEN2_CORE_EN_USB __BIT(0)
302#define OMAP2_CM_ICLKEN2_CORE_EN_SSI __BIT(1) 302#define OMAP2_CM_ICLKEN2_CORE_EN_SSI __BIT(1)
303#define OMAP2_CM_ICLKEN2_CORE_EN_UART3 __BIT(2) 303#define OMAP2_CM_ICLKEN2_CORE_EN_UART3 __BIT(2)
304#define OMAP2_CM_ICLKEN2_CORE_EN_MCBSP3 __BIT(3) 304#define OMAP2_CM_ICLKEN2_CORE_EN_MCBSP3 __BIT(3)
305#define OMAP2_CM_ICLKEN2_CORE_EN_MCBSP4 __BIT(4) 305#define OMAP2_CM_ICLKEN2_CORE_EN_MCBSP4 __BIT(4)
306#define OMAP2_CM_ICLKEN2_CORE_EN_MCBSP5 __BIT(5) 306#define OMAP2_CM_ICLKEN2_CORE_EN_MCBSP5 __BIT(5)
307#define OMAP2_CM_ICLKEN2_CORE_EN_USBHS __BIT(6) 307#define OMAP2_CM_ICLKEN2_CORE_EN_USBHS __BIT(6)
308#define OMAP2_CM_ICLKEN2_CORE_EN_MMCHS1 __BIT(7) 308#define OMAP2_CM_ICLKEN2_CORE_EN_MMCHS1 __BIT(7)
309#define OMAP2_CM_ICLKEN2_CORE_EN_MMCHS2 __BIT(8) 309#define OMAP2_CM_ICLKEN2_CORE_EN_MMCHS2 __BIT(8)
310#define OMAP2_CM_ICLKEN2_CORE_EN_NCSPI3 __BIT(9) 310#define OMAP2_CM_ICLKEN2_CORE_EN_NCSPI3 __BIT(9)
311#define OMAP2_CM_ICLKEN2_CORE_EN_GPIO5 __BIT(10) 311#define OMAP2_CM_ICLKEN2_CORE_EN_GPIO5 __BIT(10)
312#define OMAP2_CM_ICLKEN2_CORE_EN_MDM_INTC __BIT(11) 312#define OMAP2_CM_ICLKEN2_CORE_EN_MDM_INTC __BIT(11)
313#define OMAP2_CM_ICLKEN2_CORE_RESV __BIT(31,12) 313#define OMAP2_CM_ICLKEN2_CORE_RESV __BIT(31,12)
314 314
315/* 315/*
316 * bit defines for OMAP2_CM_CLKSEL2_CORE 316 * bit defines for OMAP2_CM_CLKSEL2_CORE
317 */ 317 */
318#define OMAP2_CM_CLKSEL2_CORE_GPTn(n, v) \ 318#define OMAP2_CM_CLKSEL2_CORE_GPTn(n, v) \
319 (((v) & 0x3) << (2 + ((((n) - 2) << 1)))) 319 (((v) & 0x3) << (2 + ((((n) - 2) << 1))))
320# define CLKSEL2_CORE_GPT_FUNC_32K_CLK 0x0 320# define CLKSEL2_CORE_GPT_FUNC_32K_CLK 0x0
321# define CLKSEL2_CORE_GPT_SYS_CLK 0x1 321# define CLKSEL2_CORE_GPT_SYS_CLK 0x1
322# define CLKSEL2_CORE_GPT_ALT_CLK 0x2 322# define CLKSEL2_CORE_GPT_ALT_CLK 0x2
323# define CLKSEL2_CORE_GPT_ALT_RESV 0x3 323# define CLKSEL2_CORE_GPT_ALT_RESV 0x3
324 324
325#define OMAP2_CM_CLKSEL2_CORE_RESa __BITS(1,0) 325#define OMAP2_CM_CLKSEL2_CORE_RESa __BITS(1,0)
326#define OMAP2_CM_CLKSEL2_CORE_RESb __BITS(31,24) 326#define OMAP2_CM_CLKSEL2_CORE_RESb __BITS(31,24)
327#define OMAP2_CM_CLKSEL2_CORE_RESV \ 327#define OMAP2_CM_CLKSEL2_CORE_RESV \
328 (OMAP2_CM_CLKSEL2_CORE_RESa \ 328 (OMAP2_CM_CLKSEL2_CORE_RESa \
329 |OMAP2_CM_CLKSEL2_CORE_RESb) 329 |OMAP2_CM_CLKSEL2_CORE_RESb)
330 330
331 331
332#define OMAP3_CM_CLKSEL1_PLL_MPU 0x940 332#define OMAP3_CM_CLKSEL1_PLL_MPU 0x940
333#define OMAP3_CM_CLKSEL2_PLL_MPU 0x944 333#define OMAP3_CM_CLKSEL2_PLL_MPU 0x944
334 334
335#define OMAP3_CM_CLKSEL1_PLL_MPU_CLK_SRC __BITS(21,19) 335#define OMAP3_CM_CLKSEL1_PLL_MPU_CLK_SRC __BITS(21,19)
336#define OMAP3_CM_CLKSEL1_PLL_MPU_DPLL_MULT __BITS(18,8) 336#define OMAP3_CM_CLKSEL1_PLL_MPU_DPLL_MULT __BITS(18,8)
337#define OMAP3_CM_CLKSEL1_PLL_MPU_DPLL_DIV __BITS(6,0) 337#define OMAP3_CM_CLKSEL1_PLL_MPU_DPLL_DIV __BITS(6,0)
338 338
339#define OMAP3_CM_CLKSEL2_PLL_MPU_DPLL_CLKOUT_DIV __BITS(4,0) 339#define OMAP3_CM_CLKSEL2_PLL_MPU_DPLL_CLKOUT_DIV __BITS(4,0)
340 340
341#define OMAP4_CM_SYS_CLKSEL 0x110 341#define OMAP4_CM_SYS_CLKSEL 0x110
342#define OMAP4_CM_CLKSEL_DPLL_MPU 0x16c 342#define OMAP4_CM_CLKSEL_DPLL_MPU 0x16c
343#define OMAP4_CM_DIV_M2_DPLL_MPU 0x170 343#define OMAP4_CM_DIV_M2_DPLL_MPU 0x170
344 344
345#define OMAP4_CM_SYS_CLKSEL_CLKIN __BITS(2,0) 345#define OMAP4_CM_SYS_CLKSEL_CLKIN __BITS(2,0)
346#define OMAP4_CM_CLKSEL_FREQS { 0, 12000, 13000, 16800, 19200, 26000, 27000, 38400 } 346#define OMAP4_CM_CLKSEL_FREQS { 0, 12000, 13000, 16800, 19200, 26000, 27000, 38400 }
347#define OMAP4_CM_CLKSEL_MULT 1000 347#define OMAP4_CM_CLKSEL_MULT 1000
348 348
349#define OMAP4_CM_CLKSEL_DPLL_MPU_DCC_EN __BIT(22) 349#define OMAP4_CM_CLKSEL_DPLL_MPU_DCC_EN __BIT(22)
350#define OMAP4_CM_CLKSEL_DPLL_MPU_DPLL_MULT __BITS(18,8) 350#define OMAP4_CM_CLKSEL_DPLL_MPU_DPLL_MULT __BITS(18,8)
351#define OMAP4_CM_CLKSEL_DPLL_MPU_DPLL_DIV __BITS(6,0) 351#define OMAP4_CM_CLKSEL_DPLL_MPU_DPLL_DIV __BITS(6,0)
352 352
353#define OMAP4_CM_DIV_M2_DPLL_MPU_DPLL_CLKOUT_DIV __BITS(4,0) 353#define OMAP4_CM_DIV_M2_DPLL_MPU_DPLL_CLKOUT_DIV __BITS(4,0)
354 354
355#define TI_AM335X_CM_CLKSEL_DPLL_MPU 0x2c 355#define TI_AM335X_CM_CLKSEL_DPLL_MPU 0x2c
356#define TI_AM335X_CM_CLKSEL_DPLL_MPU_DPLL_BYP_CLKSEL __BIT(23) 356#define TI_AM335X_CM_CLKSEL_DPLL_MPU_DPLL_BYP_CLKSEL __BIT(23)
357#define TI_AM335X_CM_CLKSEL_DPLL_MPU_DPLL_MULT __BITS(18,8) 357#define TI_AM335X_CM_CLKSEL_DPLL_MPU_DPLL_MULT __BITS(18,8)
358#define TI_AM335X_CM_CLKSEL_DPLL_MPU_DPLL_DIV __BITS(6,0) 358#define TI_AM335X_CM_CLKSEL_DPLL_MPU_DPLL_DIV __BITS(6,0)
359 359
360#define TI_AM335X_CM_DIV_M2_DPLL_MPU 0xa8 360#define TI_AM335X_CM_DIV_M2_DPLL_MPU 0xa8
361#define TI_AM335X_CM_DIV_M2_DPLL_MPU_ST_DPLL_CLKOUT __BIT(9) 361#define TI_AM335X_CM_DIV_M2_DPLL_MPU_ST_DPLL_CLKOUT __BIT(9)
362#define TI_AM335X_CM_DIV_M2_DPLL_MPU_DPLL_CLKOUT_GATE_CTRL __BIT(8) 362#define TI_AM335X_CM_DIV_M2_DPLL_MPU_DPLL_CLKOUT_GATE_CTRL __BIT(8)
363#define TI_AM335X_CM_DIV_M2_DPLL_MPU_DPLL_CLKOUT_DIVCHACK __BIT(5) 363#define TI_AM335X_CM_DIV_M2_DPLL_MPU_DPLL_CLKOUT_DIVCHACK __BIT(5)
364#define TI_AM335X_CM_DIV_M2_DPLL_MPU_DPLL_CLKOUT_DIV __BITS(4,0) 364#define TI_AM335X_CM_DIV_M2_DPLL_MPU_DPLL_CLKOUT_DIV __BITS(4,0)
365 365
366/* 366/*
367 * Power Management registers base, offsets, and size 367 * Power Management registers base, offsets, and size
368 */ 368 */
369#ifdef OMAP_3430 369#ifdef OMAP_3430
370#define OMAP2_PRM_BASE 0x48306000 370#define OMAP2_PRM_BASE 0x48306000
371#endif 371#endif
372#ifdef OMAP_3530 372#ifdef OMAP_3530
373#define OMAP2_PRM_BASE 0x48306000 373#define OMAP2_PRM_BASE 0x48306000
374#endif 374#endif
375#ifdef OMAP_4430 375#ifdef OMAP_4430
376#define OMAP2_PRM_BASE (OMAP4430_L4_WAKEUP_BASE + 0x6000) 376#define OMAP2_PRM_BASE (OMAP4430_L4_WAKEUP_BASE + 0x6000)
377#endif 377#endif
378#ifdef OMAP_5430 378#ifdef OMAP_5430
379#define OMAP2_PRM_BASE (OMAP5430_L4_WAKEUP_BASE + 0x6000) 379#define OMAP2_PRM_BASE (OMAP5430_L4_WAKEUP_BASE + 0x6000)
380#endif 380#endif
381#ifdef TI_AM335X 381#ifdef TI_AM335X
382#define OMAP2_PRM_BASE 0x48306000 382#define OMAP2_PRM_BASE 0x48306000
383#endif 383#endif
384#ifdef TI_DM37XX 384#ifdef TI_DM37XX
385#define OMAP2_PRM_BASE 0x48306000 385#define OMAP2_PRM_BASE 0x48306000
386#endif 386#endif
387 387
388#define OMAP2_PRM_SIZE 0x00002000 /* 8k */ 388#define OMAP2_PRM_SIZE 0x00002000 /* 8k */
389 389
390/* module offsets */ 390/* module offsets */
391#define OCP_MOD 0x0800 391#define OCP_MOD 0x0800
392#define MPU_MOD 0x0900 392#define MPU_MOD 0x0900
393#define CORE_MOD 0x0a00 393#define CORE_MOD 0x0a00
394#define GFX_MOD 0x0b00 394#define GFX_MOD 0x0b00
395#define WKUP_MOD 0x0c00 395#define WKUP_MOD 0x0c00
396#define PLL_MOD 0x0d00 396#define PLL_MOD 0x0d00
397 397
398/* module offsets specific to chip */ 398/* module offsets specific to chip */
399#define OMAP24XX_GR_MOD OCP_MOD 399#define OMAP24XX_GR_MOD OCP_MOD
400#define OMAP24XX_DSP_MOD 0x1000 400#define OMAP24XX_DSP_MOD 0x1000
401#define OMAP2430_MDM_MOD 0x1400 401#define OMAP2430_MDM_MOD 0x1400
402#define OMAP3430_IVA2_MOD 0x0000 /* IVA2 before base! */ 402#define OMAP3430_IVA2_MOD 0x0000 /* IVA2 before base! */
403#define OMAP3430ES2_SGX_MOD GFX_MOD 403#define OMAP3430ES2_SGX_MOD GFX_MOD
404#define OMAP3430_CCR_MOD PLL_MOD 404#define OMAP3430_CCR_MOD PLL_MOD
405#define OMAP3430_DSS_MOD 0x0e00 405#define OMAP3430_DSS_MOD 0x0e00
406#define OMAP3430_CAM_MOD 0x0f00 406#define OMAP3430_CAM_MOD 0x0f00
407#define OMAP3430_PER_MOD 0x1000 407#define OMAP3430_PER_MOD 0x1000
408#define OMAP3430_EMU_MOD 0x1100 408#define OMAP3430_EMU_MOD 0x1100
409#define OMAP3430_GR_MOD 0x1200 409#define OMAP3430_GR_MOD 0x1200
410#define OMAP3430_NEON_MOD 0x1300 410#define OMAP3430_NEON_MOD 0x1300
411#define OMAP3430ES2_USBHOST_MOD 0x1400 411#define OMAP3430ES2_USBHOST_MOD 0x1400
412 412
413#define OMAP2_RM_RSTCTRL 0x50 413#define OMAP2_RM_RSTCTRL 0x50
414#define OMAP2_RM_RSTTIME 0x54 414#define OMAP2_RM_RSTTIME 0x54
415#define OMAP2_RM_RSTST 0x58 415#define OMAP2_RM_RSTST 0x58
416#define OMAP2_PM_WKDEP 0xc8 416#define OMAP2_PM_WKDEP 0xc8
417#define OMAP2_PM_PWSTCTRL 0xe0 417#define OMAP2_PM_PWSTCTRL 0xe0
418#define OMAP2_PM_PWSTST 0xe4 418#define OMAP2_PM_PWSTST 0xe4
419#define OMAP2_PM_PREPWSTST 0xe8 419#define OMAP2_PM_PREPWSTST 0xe8
420#define OMAP2_PRM_IRQSTATUS 0xf8 420#define OMAP2_PRM_IRQSTATUS 0xf8
421#define OMAP2_PRM_IRQENABLE 0xfc 421#define OMAP2_PRM_IRQENABLE 0xfc
422 422
423#define OMAP_RST_DPLL3 __BIT(2) 423#define OMAP_RST_DPLL3 __BIT(2)
424#define OMAP_RST_GS __BIT(1) 424#define OMAP_RST_GS __BIT(1)
425 425
426#define OMAP3_PRM_CLKSEL 0x40 // from PLL_MOD 426#define OMAP3_PRM_CLKSEL 0x40 // from PLL_MOD
427#define OMAP3_PRM_CLKSEL_CLKIN __BITS(2,0) 427#define OMAP3_PRM_CLKSEL_CLKIN __BITS(2,0)
428#define OMAP3_PRM_CLKSEL_CLKIN_12000KHZ 0 428#define OMAP3_PRM_CLKSEL_CLKIN_12000KHZ 0
429#define OMAP3_PRM_CLKSEL_CLKIN_13000KHZ 1 429#define OMAP3_PRM_CLKSEL_CLKIN_13000KHZ 1
430#define OMAP3_PRM_CLKSEL_CLKIN_19200KHZ 2 430#define OMAP3_PRM_CLKSEL_CLKIN_19200KHZ 2
431#define OMAP3_PRM_CLKSEL_CLKIN_26000KHZ 3 431#define OMAP3_PRM_CLKSEL_CLKIN_26000KHZ 3
432#define OMAP3_PRM_CLKSEL_CLKIN_38400KHZ 4 432#define OMAP3_PRM_CLKSEL_CLKIN_38400KHZ 4
433#define OMAP3_PRM_CLKSEL_CLKIN_16800KHZ 5 433#define OMAP3_PRM_CLKSEL_CLKIN_16800KHZ 5
434#define OMAP3_PRM_CLKSEL_FREQS { 12000, 13000, 19200, 26000, 38400, 16800, 0, 0 } 434#define OMAP3_PRM_CLKSEL_FREQS { 12000, 13000, 19200, 26000, 38400, 16800, 0, 0 }
435#define OMAP3_PRM_CLKSEL_MULT 1000 435#define OMAP3_PRM_CLKSEL_MULT 1000
436 436
437#define OMAP4_PRM_RSTCTRL 0x7b00 437#define OMAP4_PRM_RSTCTRL 0x7b00
 438#define OMAP5_PRM_RSTCTRL 0x7c00
438#define OMAP4_PRM_RSTCTRL_WARM 0x0001 439#define OMAP4_PRM_RSTCTRL_WARM 0x0001
439#define OMAP4_PRM_RSTCTRL_COLD 0x0002 440#define OMAP4_PRM_RSTCTRL_COLD 0x0002
440 441
441/* 442/*
442 * L3 Interconnect Target Agent Common Registers 443 * L3 Interconnect Target Agent Common Registers
443 */ 444 */
444#define OMAP2_TA_GPMC 0x68002400 445#define OMAP2_TA_GPMC 0x68002400
445#define OMAP2_TA_L4_CORE 0x68006800 446#define OMAP2_TA_L4_CORE 0x68006800
446 447
447/* 448/*
448 * L3 Interconnect Target Agent Common Register offsets 449 * L3 Interconnect Target Agent Common Register offsets
449 */ 450 */
450#define OMAP2_TA_COMPONENT 0x00 451#define OMAP2_TA_COMPONENT 0x00
451#define OMAP2_TA_CORE 0x18 452#define OMAP2_TA_CORE 0x18
452#define OMAP2_TA_AGENT_CONTROL 0x20 453#define OMAP2_TA_AGENT_CONTROL 0x20
453#define OMAP2_TA_AGENT_STATUS 0x28 454#define OMAP2_TA_AGENT_STATUS 0x28
454#define OMAP2_TA_ERROR_LOG 0x58 455#define OMAP2_TA_ERROR_LOG 0x58
455#define OMAP2_TA_ERROR_LOG_ADDR 0x60 456#define OMAP2_TA_ERROR_LOG_ADDR 0x60
456 457
457/* 458/*
458 * OMAP2_TA_COMPONENT bits 459 * OMAP2_TA_COMPONENT bits
459 */ 460 */
460#define TA_COMPONENT_REV(r) ((r) & __BITS(15,0)) 461#define TA_COMPONENT_REV(r) ((r) & __BITS(15,0))
461#define TA_COMPONENT_CODE(r) (((r) >> 16) & __BITS(15,0)) 462#define TA_COMPONENT_CODE(r) (((r) >> 16) & __BITS(15,0))
462 463
463/* 464/*
464 * OMAP2_TA_CORE bits 465 * OMAP2_TA_CORE bits
465 */ 466 */
466#define TA_AGENT_CORE_REV(r) ((r) & __BITS(15,0)) 467#define TA_AGENT_CORE_REV(r) ((r) & __BITS(15,0))
467#define TA_AGENT_CORE_CODE(r) (((r) >> 16) & __BITS(15,0)) 468#define TA_AGENT_CORE_CODE(r) (((r) >> 16) & __BITS(15,0))
468 469
469/* 470/*
470 * OMAP2_TA_AGENT_CONTROL bits 471 * OMAP2_TA_AGENT_CONTROL bits
471 */ 472 */
472#define TA_AGENT_CONTROL_CORE_RESET __BIT(0) 473#define TA_AGENT_CONTROL_CORE_RESET __BIT(0)
473#define TA_AGENT_CONTROL_CORE_REJECT __BIT(4) 474#define TA_AGENT_CONTROL_CORE_REJECT __BIT(4)
474#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE __BITS(10,8) 475#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE __BITS(10,8)
475#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE_SHFT 8 476#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE_SHFT 8
476#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE_NONE 0 477#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE_NONE 0
477#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE_1 1 478#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE_1 1
478#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE_4 2 479#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE_4 2
479#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE_16 3 480#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE_16 3
480#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE_64 4 481#define TA_AGENT_CONTROL_CORE_TIMEOUT_BASE_64 4
481#define TA_AGENT_CONTROL_CORE_SERROR_REP __BIT(24) 482#define TA_AGENT_CONTROL_CORE_SERROR_REP __BIT(24)
482#define TA_AGENT_CONTROL_CORE_REQ_TIMEOUT_REP __BIT(25) 483#define TA_AGENT_CONTROL_CORE_REQ_TIMEOUT_REP __BIT(25)
483 484
484/* 485/*
485 * OMAP2_TA_AGENT_STATUS bits 486 * OMAP2_TA_AGENT_STATUS bits
486 */ 487 */
487#define TA_AGENT_STATUS_CORE_RESET __BIT(0) 488#define TA_AGENT_STATUS_CORE_RESET __BIT(0)
488#define TA_AGENT_STATUS_RESVa __BITS(3,1) 489#define TA_AGENT_STATUS_RESVa __BITS(3,1)
489#define TA_AGENT_STATUS_REQ_WAITING __BIT(4) 490#define TA_AGENT_STATUS_REQ_WAITING __BIT(4)
490#define TA_AGENT_STATUS_RESP_ACTIVE __BIT(5) 491#define TA_AGENT_STATUS_RESP_ACTIVE __BIT(5)
491#define TA_AGENT_STATUS_BURST __BIT(6) 492#define TA_AGENT_STATUS_BURST __BIT(6)
492#define TA_AGENT_STATUS_READEX __BIT(7) 493#define TA_AGENT_STATUS_READEX __BIT(7)
493#define TA_AGENT_STATUS_REQ_TIMEOUT __BIT(8) 494#define TA_AGENT_STATUS_REQ_TIMEOUT __BIT(8)
494#define TA_AGENT_STATUS_RESVb __BITS(11,9) 495#define TA_AGENT_STATUS_RESVb __BITS(11,9)
495#define TA_AGENT_STATUS_TIMEBASE __BITS(15,12) 496#define TA_AGENT_STATUS_TIMEBASE __BITS(15,12)
496#define TA_AGENT_STATUS_BURST_CLOSE __BIT(16) 497#define TA_AGENT_STATUS_BURST_CLOSE __BIT(16)
497#define TA_AGENT_STATUS_RESVc __BITS(23,17) 498#define TA_AGENT_STATUS_RESVc __BITS(23,17)
498#define TA_AGENT_STATUS_SERROR __BIT(24) /* XXX */ 499#define TA_AGENT_STATUS_SERROR __BIT(24) /* XXX */
499#define TA_AGENT_STATUS_RESVd __BITS(31,25) 500#define TA_AGENT_STATUS_RESVd __BITS(31,25)
500 501
501/* 502/*
502 * OMAP2_TA_ERROR_LOG bits 503 * OMAP2_TA_ERROR_LOG bits
503 */ 504 */
504#define TA_ERROR_LOG_CMD __BITS(2,0) 505#define TA_ERROR_LOG_CMD __BITS(2,0)
505#define TA_ERROR_LOG_RESa __BITS(7,3) 506#define TA_ERROR_LOG_RESa __BITS(7,3)
506#define TA_ERROR_LOG_INITID __BITS(15,8) /* initiator */ 507#define TA_ERROR_LOG_INITID __BITS(15,8) /* initiator */
507#define TA_ERROR_LOG_RESb __BITS(23,16) 508#define TA_ERROR_LOG_RESb __BITS(23,16)
508#define TA_ERROR_LOG_CODE __BITS(27,24) /* error */ 509#define TA_ERROR_LOG_CODE __BITS(27,24) /* error */
509#define TA_ERROR_LOG_RESc __BITS(30,28) 510#define TA_ERROR_LOG_RESc __BITS(30,28)
510#define TA_ERROR_LOG_MULTI __BIT(31) /* write to clear */ 511#define TA_ERROR_LOG_MULTI __BIT(31) /* write to clear */
511 512
512/* 513/*
513 * L4 Interconnect CORE address space 514 * L4 Interconnect CORE address space
514 */ 515 */
515#define OMAP2430_L4_S3220_2430_WATCHDOGOCP24 0x48027000 516#define OMAP2430_L4_S3220_2430_WATCHDOGOCP24 0x48027000
516#define OMAP2430_L4_S3220_2430_DMTIMER_DMC2 0x4802B000 517#define OMAP2430_L4_S3220_2430_DMTIMER_DMC2 0x4802B000
517#define OMAP2430_L4_S3220_2430_AP 0x48040000 518#define OMAP2430_L4_S3220_2430_AP 0x48040000
518#define OMAP2430_L4_S3220_2430_IA 0x48040800 519#define OMAP2430_L4_S3220_2430_IA 0x48040800
519#define OMAP2430_L4_S3220_2430_LA 0x48041000 520#define OMAP2430_L4_S3220_2430_LA 0x48041000
520#define OMAP2430_L4_S3220_2430_MPU_SS 0x4804A000 521#define OMAP2430_L4_S3220_2430_MPU_SS 0x4804A000
521#define OMAP2430_L4_S3220_2430_DISPLAY_SUBS 0x48051000 522#define OMAP2430_L4_S3220_2430_DISPLAY_SUBS 0x48051000
522#define OMAP2430_L4_S3220_2430_CAMERA_CORE 0x48053000 523#define OMAP2430_L4_S3220_2430_CAMERA_CORE 0x48053000
523#define OMAP2430_L4_S3220_2430_SDMA 0x48057000 524#define OMAP2430_L4_S3220_2430_SDMA 0x48057000
524#define OMAP2430_L4_S3220_2430_SSI 0x4805C000 525#define OMAP2430_L4_S3220_2430_SSI 0x4805C000
525#define OMAP2430_L4_S3220_2430_USB_OTG_FS 0x4805F000 526#define OMAP2430_L4_S3220_2430_USB_OTG_FS 0x4805F000
526#define OMAP2430_L4_S3220_2430_XTI 0x48069000 527#define OMAP2430_L4_S3220_2430_XTI 0x48069000
527#define OMAP2430_L4_S3220_2430_UART1 0x4806B000 528#define OMAP2430_L4_S3220_2430_UART1 0x4806B000
528#define OMAP2430_L4_S3220_2430_UART2 0x4806D000 529#define OMAP2430_L4_S3220_2430_UART2 0x4806D000
529#define OMAP2430_L4_S3220_2430_UART3 0x4806F000 530#define OMAP2430_L4_S3220_2430_UART3 0x4806F000
530#define OMAP2430_L4_S3220_2430_MSHSI2C1 0x48071000 531#define OMAP2430_L4_S3220_2430_MSHSI2C1 0x48071000
531#define OMAP2430_L4_S3220_2430_MSHSI2C2 0x48073000 532#define OMAP2430_L4_S3220_2430_MSHSI2C2 0x48073000
532#define OMAP2430_L4_S3220_2430_MCBSP1 0x48075000 533#define OMAP2430_L4_S3220_2430_MCBSP1 0x48075000
533#define OMAP2430_L4_S3220_2430_MCBSP2 0x48077000 534#define OMAP2430_L4_S3220_2430_MCBSP2 0x48077000
534#define OMAP2430_L4_S3220_2430_DMTIMER_DMC3 0x48079000 535#define OMAP2430_L4_S3220_2430_DMTIMER_DMC3 0x48079000
535#define OMAP2430_L4_S3220_2430_DMTIMER_DMC4 0x4807B000 536#define OMAP2430_L4_S3220_2430_DMTIMER_DMC4 0x4807B000
536#define OMAP2430_L4_S3220_2430_DMTIMER_DMC5 0x4807D000 537#define OMAP2430_L4_S3220_2430_DMTIMER_DMC5 0x4807D000
537#define OMAP2430_L4_S3220_2430_DMTIMER_DMC6 0x4807F000 538#define OMAP2430_L4_S3220_2430_DMTIMER_DMC6 0x4807F000
538#define OMAP2430_L4_S3220_2430_DMTIMER_DMC7 0x48081000 539#define OMAP2430_L4_S3220_2430_DMTIMER_DMC7 0x48081000
539#define OMAP2430_L4_S3220_2430_DMTIMER_DMC8 0x48083000 540#define OMAP2430_L4_S3220_2430_DMTIMER_DMC8 0x48083000
540#define OMAP2430_L4_S3220_2430_DMTIMER_DMC9 0x48085000 541#define OMAP2430_L4_S3220_2430_DMTIMER_DMC9 0x48085000
541#define OMAP2430_L4_S3220_2430_DMTIMER_DMC10 0x48087000 542#define OMAP2430_L4_S3220_2430_DMTIMER_DMC10 0x48087000
542#define OMAP2430_L4_S3220_2430_DMTIMER_DMC11 0x48089000 543#define OMAP2430_L4_S3220_2430_DMTIMER_DMC11 0x48089000
543#define OMAP2430_L4_S3220_2430_DMTIMER_DMC12 0x4808B000 544#define OMAP2430_L4_S3220_2430_DMTIMER_DMC12 0x4808B000
544#define OMAP2430_L4_S3220_2430_MCBSP3 0x4808D000 545#define OMAP2430_L4_S3220_2430_MCBSP3 0x4808D000
545#define OMAP2430_L4_S3220_2430_MCBSP4 0x4808F000 546#define OMAP2430_L4_S3220_2430_MCBSP4 0x4808F000
546#define OMAP2430_L4_S3220_2430_FAC 0x48093000 547#define OMAP2430_L4_S3220_2430_FAC 0x48093000
547#define OMAP2430_L4_S3220_2430_MAILBOX1 0x48095000 548#define OMAP2430_L4_S3220_2430_MAILBOX1 0x48095000
548#define OMAP2430_L4_S3220_2430_MCBSP5 0x48097000 549#define OMAP2430_L4_S3220_2430_MCBSP5 0x48097000
549#define OMAP2430_L4_S3220_2430_MCSPI1 0x48099000 550#define OMAP2430_L4_S3220_2430_MCSPI1 0x48099000
550#define OMAP2430_L4_S3220_2430_MCSPI2 0x4809B000 551#define OMAP2430_L4_S3220_2430_MCSPI2 0x4809B000
551#define OMAP2430_L4_S3220_2430_MMCHS1 0x4809D000 552#define OMAP2430_L4_S3220_2430_MMCHS1 0x4809D000
552#define OMAP2430_L4_S3220_2430_MSPRO 0x4809F000 553#define OMAP2430_L4_S3220_2430_MSPRO 0x4809F000
553#define OMAP2430_L4_S3220_2430_RNG 0x480A1000 554#define OMAP2430_L4_S3220_2430_RNG 0x480A1000
554#define OMAP2430_L4_S3220_2430_DESOCP 0x480A3000 555#define OMAP2430_L4_S3220_2430_DESOCP 0x480A3000
555#define OMAP2430_L4_S3220_2430_SHA1MD5OCP 0x480A5000 556#define OMAP2430_L4_S3220_2430_SHA1MD5OCP 0x480A5000
556#define OMAP2430_L4_S3220_2430_AESOCP 0x480A7000 557#define OMAP2430_L4_S3220_2430_AESOCP 0x480A7000
557#define OMAP2430_L4_S3220_2430_PKA 0x480AA000 558#define OMAP2430_L4_S3220_2430_PKA 0x480AA000
558#define OMAP2430_L4_S3220_2430_USBHHCOCP 0x480AE000 559#define OMAP2430_L4_S3220_2430_USBHHCOCP 0x480AE000
559#define OMAP2430_L4_S3220_2430_MGATE 0x480B1000 560#define OMAP2430_L4_S3220_2430_MGATE 0x480B1000
560#define OMAP2430_L4_S3220_2430_HDQ1WOCP 0x480B3000 561#define OMAP2430_L4_S3220_2430_HDQ1WOCP 0x480B3000
561#define OMAP2430_L4_S3220_2430_MMCHS2 0x480B5000 562#define OMAP2430_L4_S3220_2430_MMCHS2 0x480B5000
562#define OMAP2430_L4_S3220_2430_GPIO 0x480B7000 563#define OMAP2430_L4_S3220_2430_GPIO 0x480B7000
563#define OMAP2430_L4_S3220_2430_MCSPI3 0x480B9000 564#define OMAP2430_L4_S3220_2430_MCSPI3 0x480B9000
564#define OMAP2430_L4_S3220_2430_MODEM_INTH 0x480C3000 565#define OMAP2430_L4_S3220_2430_MODEM_INTH 0x480C3000
565 566
566/* 567/*
567 * L3 Interconnect Sideband Interconnect register base 568 * L3 Interconnect Sideband Interconnect register base
568 */ 569 */
569#define OMAP2_SI_BASE 0x68000400 570#define OMAP2_SI_BASE 0x68000400
570 571
571/* 572/*
572 * L3 Interconnect Sideband Interconnect register offsets 573 * L3 Interconnect Sideband Interconnect register offsets
573 */ 574 */
574#define OMAP2_SI_CONTOL 0x0020 575#define OMAP2_SI_CONTOL 0x0020
575#define OMAP2_SI_FLAG_STATUS_0 0x0110 /* APE_app */ 576#define OMAP2_SI_FLAG_STATUS_0 0x0110 /* APE_app */
576#define OMAP2_SI_FLAG_STATUS_1 0x0130 /* APE_dbg */ 577#define OMAP2_SI_FLAG_STATUS_1 0x0130 /* APE_dbg */
577#define OMAP2_SI_FLAG_STATUS_2 0x0150 /* MODEM_app */ 578#define OMAP2_SI_FLAG_STATUS_2 0x0150 /* MODEM_app */
578#define OMAP2_SI_FLAG_STATUS_3 0x0170 /* MODEM_dbg */ 579#define OMAP2_SI_FLAG_STATUS_3 0x0170 /* MODEM_dbg */
579 580
580/* 581/*
581 * Interrupts 582 * Interrupts
582 */ 583 */
583#define INTC_BASE 0x480FE000 584#define INTC_BASE 0x480FE000
584#define INTC_BASE_3430 0x48200000 585#define INTC_BASE_3430 0x48200000
585#define INTC_BASE_3530 0x48200000 /* Also TI_AM335X and TI_DM37XX */ 586#define INTC_BASE_3530 0x48200000 /* Also TI_AM335X and TI_DM37XX */
586#define INTC_REVISISON 0x0000 587#define INTC_REVISISON 0x0000
587#define INTC_SYSCONFIG 0x0010 588#define INTC_SYSCONFIG 0x0010
588#define INTC_SYSSTATUS 0x0014 589#define INTC_SYSSTATUS 0x0014
589#define INTC_SIR_IRQ 0x0040 /* active IRQ */ 590#define INTC_SIR_IRQ 0x0040 /* active IRQ */
590#define INTC_SIR_FIQ 0x0044 /* active FIQ */ 591#define INTC_SIR_FIQ 0x0044 /* active FIQ */
591#define INTC_CONTROL 0x0048 592#define INTC_CONTROL 0x0048
592#define INTC_PROTECTION 0x004c 593#define INTC_PROTECTION 0x004c
593#define INTC_IDLE 0x0050 594#define INTC_IDLE 0x0050
594 595
595#define INTC_ITR 0x0080 /* unmask intr state */ 596#define INTC_ITR 0x0080 /* unmask intr state */
596#define INTC_MIR 0x0084 /* intr mask */ 597#define INTC_MIR 0x0084 /* intr mask */
597#define INTC_MIR_CLEAR 0x0088 /* clr intr mask bits */ 598#define INTC_MIR_CLEAR 0x0088 /* clr intr mask bits */
598#define INTC_MIR_SET 0x008c /* set intr mask bits */ 599#define INTC_MIR_SET 0x008c /* set intr mask bits */
599#define INTC_ISR_SET 0x0090 /* r/w soft intr mask */ 600#define INTC_ISR_SET 0x0090 /* r/w soft intr mask */
600#define INTC_ISR_CLEAR 0x0094 /* clr soft intr mask */ 601#define INTC_ISR_CLEAR 0x0094 /* clr soft intr mask */
601#define INTC_PENDING_IRQ 0x0098 /* masked irq state */ 602#define INTC_PENDING_IRQ 0x0098 /* masked irq state */
602#define INTC_PENDING_FIQ 0x009c /* masked fiq state */ 603#define INTC_PENDING_FIQ 0x009c /* masked fiq state */
603 604
604#define INTC_ILR 0x0100  605#define INTC_ILR 0x0100
605 606
606#define INTC_SYSCONFIG_SOFTRESET 0x2 607#define INTC_SYSCONFIG_SOFTRESET 0x2
607#define INTC_SYSCONFIG_AUTOIDLE 0x1 608#define INTC_SYSCONFIG_AUTOIDLE 0x1
608 609
609#define INTC_SYSSTATUS_RESETDONE 0x1 610#define INTC_SYSSTATUS_RESETDONE 0x1
610 611
611#define INTC_CONTROL_GLOBALMASK 0x4 /* All IRQ & FIQ are masked */ 612#define INTC_CONTROL_GLOBALMASK 0x4 /* All IRQ & FIQ are masked */
612#define INTC_CONTROL_NEWFIQAGR 0x2 613#define INTC_CONTROL_NEWFIQAGR 0x2
613#define INTC_CONTROL_NEWIRQAGR 0x1 614#define INTC_CONTROL_NEWIRQAGR 0x1
614 615
615#define INTC_PROTECTION_ENABLED 0x1 /* only diddle if prived */ 616#define INTC_PROTECTION_ENABLED 0x1 /* only diddle if prived */
616 617
617#define INTC_IDLE_TURBO 0x2 618#define INTC_IDLE_TURBO 0x2
618#define INTC_IDLE_FUNCIDLE 0x1 619#define INTC_IDLE_FUNCIDLE 0x1
619 620
620#define INTC_ILR_PRIORTY_SHFT 2 621#define INTC_ILR_PRIORTY_SHFT 2
621#define INTC_ILR_FIQNIRQ 0x1 /* intr is a FIQ */ 622#define INTC_ILR_FIQNIRQ 0x1 /* intr is a FIQ */
622 623
623/* 624/*
624 * GPT - General Purpose Timers 625 * GPT - General Purpose Timers
625 */ 626 */
626#if defined(OMAP_3430) || defined(OMAP_3530) || defined(TI_DM37XX) 627#if defined(OMAP_3430) || defined(OMAP_3530) || defined(TI_DM37XX)
627#define GPT1_BASE 0x48318000 628#define GPT1_BASE 0x48318000
628#define GPT2_BASE 0x49032000 629#define GPT2_BASE 0x49032000
629#define GPT3_BASE 0x49034000 630#define GPT3_BASE 0x49034000
630#define GPT4_BASE 0x49036000 631#define GPT4_BASE 0x49036000
631#define GPT5_BASE 0x49038000 632#define GPT5_BASE 0x49038000
632#define GPT6_BASE 0x4903A000 633#define GPT6_BASE 0x4903A000
633#define GPT7_BASE 0x4903C000 634#define GPT7_BASE 0x4903C000
634#define GPT8_BASE 0x4903E000 635#define GPT8_BASE 0x4903E000
635#define GPT9_BASE 0x49040000 636#define GPT9_BASE 0x49040000
636#define GPT10_BASE 0x48086000 637#define GPT10_BASE 0x48086000
637#define GPT11_BASE 0x48088000 638#define GPT11_BASE 0x48088000
638#if defined(OMAP_3430) 639#if defined(OMAP_3430)
639#define GPT12_BASE 0x48304000 640#define GPT12_BASE 0x48304000
640#endif 641#endif
641#if defined(OMAP_3530) 642#if defined(OMAP_3530)
642#define GPT12_BASE 0x48304000 643#define GPT12_BASE 0x48304000
643#endif 644#endif
644#elif defined(TI_AM33XX) 645#elif defined(TI_AM33XX)
645#if 0 646#if 0
646#define GPT0_BASE 0x44e05000 647#define GPT0_BASE 0x44e05000
647#define GPT1_BASE 0x44e31000 /* 1ms */ 648#define GPT1_BASE 0x44e31000 /* 1ms */
648#define GPT2_BASE 0x48040000 649#define GPT2_BASE 0x48040000
649#define GPT3_BASE 0x48042000 650#define GPT3_BASE 0x48042000
650#define GPT4_BASE 0x48044000 651#define GPT4_BASE 0x48044000
651#define GPT5_BASE 0x48048000 652#define GPT5_BASE 0x48048000
652#define GPT6_BASE 0x4804A000 653#define GPT6_BASE 0x4804A000
653#define GPT7_BASE 0x4804C000 654#define GPT7_BASE 0x4804C000
654#endif 655#endif
655#else 656#else
656#define GPT1_BASE 0x48028000 657#define GPT1_BASE 0x48028000
657#define GPT2_BASE 0x4802a000 658#define GPT2_BASE 0x4802a000
658#define GPT3_BASE 0x48078000 659#define GPT3_BASE 0x48078000
659#define GPT4_BASE 0x4807a000 660#define GPT4_BASE 0x4807a000
660#define GPT5_BASE 0x4807c000 661#define GPT5_BASE 0x4807c000
661#define GPT6_BASE 0x4807e000 662#define GPT6_BASE 0x4807e000
662#define GPT7_BASE 0x48080000 663#define GPT7_BASE 0x48080000
663#define GPT8_BASE 0x48082000 664#define GPT8_BASE 0x48082000
664#define GPT9_BASE 0x48084000 665#define GPT9_BASE 0x48084000
665#define GPT10_BASE 0x48086000 666#define GPT10_BASE 0x48086000
666#define GPT11_BASE 0x48088000 667#define GPT11_BASE 0x48088000
667#define GPT12_BASE 0x4808a000 668#define GPT12_BASE 0x4808a000
668#endif 669#endif
669 670
670/* 671/*
671 * GPIO 672 * GPIO
672 */ 673 */
673#define GPIO1_BASE_2430 0x4900c000 674#define GPIO1_BASE_2430 0x4900c000
674#define GPIO2_BASE_2430 0x4900e000 675#define GPIO2_BASE_2430 0x4900e000
675#define GPIO3_BASE_2430 0x49010000 676#define GPIO3_BASE_2430 0x49010000
676#define GPIO4_BASE_2430 0x49012000 677#define GPIO4_BASE_2430 0x49012000
677#define GPIO5_BASE_2430 0x480b6000 678#define GPIO5_BASE_2430 0x480b6000
678 679
679#define GPIO1_BASE_2420 0x48018000 680#define GPIO1_BASE_2420 0x48018000
680#define GPIO2_BASE_2420 0x4801a000 681#define GPIO2_BASE_2420 0x4801a000
681#define GPIO3_BASE_2420 0x4801c000 682#define GPIO3_BASE_2420 0x4801c000
682#define GPIO4_BASE_2420 0x4801e000 683#define GPIO4_BASE_2420 0x4801e000
683 684
684#define GPIO1_BASE_3430 0x48310000 685#define GPIO1_BASE_3430 0x48310000
685#define GPIO2_BASE_3430 0x49050000 686#define GPIO2_BASE_3430 0x49050000
686#define GPIO3_BASE_3430 0x49052000 687#define GPIO3_BASE_3430 0x49052000
687#define GPIO4_BASE_3430 0x49054000 688#define GPIO4_BASE_3430 0x49054000
688#define GPIO5_BASE_3430 0x49056000 689#define GPIO5_BASE_3430 0x49056000
689#define GPIO6_BASE_3430 0x49058000 690#define GPIO6_BASE_3430 0x49058000
690 691
691#define GPIO1_BASE_3530 0x48310000 692#define GPIO1_BASE_3530 0x48310000
692#define GPIO2_BASE_3530 0x49050000 693#define GPIO2_BASE_3530 0x49050000
693#define GPIO3_BASE_3530 0x49052000 694#define GPIO3_BASE_3530 0x49052000
694#define GPIO4_BASE_3530 0x49054000 695#define GPIO4_BASE_3530 0x49054000
695#define GPIO5_BASE_3530 0x49056000 696#define GPIO5_BASE_3530 0x49056000
696#define GPIO6_BASE_3530 0x49058000 697#define GPIO6_BASE_3530 0x49058000
697 698
698#define GPIO1_BASE_4430 0x4a310000 699#define GPIO1_BASE_4430 0x4a310000
699#define GPIO2_BASE_4430 0x48055000 700#define GPIO2_BASE_4430 0x48055000
700#define GPIO3_BASE_4430 0x48057000 701#define GPIO3_BASE_4430 0x48057000
701#define GPIO4_BASE_4430 0x48059000 702#define GPIO4_BASE_4430 0x48059000
702#define GPIO5_BASE_4430 0x4805b000 703#define GPIO5_BASE_4430 0x4805b000
703#define GPIO6_BASE_4430 0x4805d000 704#define GPIO6_BASE_4430 0x4805d000
704 705
705#define GPIO1_BASE_5430 0x4ae10000 706#define GPIO1_BASE_5430 0x4ae10000
706#define GPIO2_BASE_5430 0x48055000 707#define GPIO2_BASE_5430 0x48055000
707#define GPIO3_BASE_5430 0x48057000 708#define GPIO3_BASE_5430 0x48057000
708#define GPIO4_BASE_5430 0x48059000 709#define GPIO4_BASE_5430 0x48059000
709#define GPIO5_BASE_5430 0x4805b000 710#define GPIO5_BASE_5430 0x4805b000
710#define GPIO6_BASE_5430 0x4805d000 711#define GPIO6_BASE_5430 0x4805d000
711#define GPIO7_BASE_5430 0x48051000 712#define GPIO7_BASE_5430 0x48051000
712#define GPIO8_BASE_5430 0x48053000 713#define GPIO8_BASE_5430 0x48053000
713 714
714#define GPIO0_BASE_TI_AM335X 0x44e07000 715#define GPIO0_BASE_TI_AM335X 0x44e07000
715#define GPIO1_BASE_TI_AM335X 0x4804c000 716#define GPIO1_BASE_TI_AM335X 0x4804c000
716#define GPIO2_BASE_TI_AM335X 0x481ac000 717#define GPIO2_BASE_TI_AM335X 0x481ac000
717#define GPIO3_BASE_TI_AM335X 0x481ae000 718#define GPIO3_BASE_TI_AM335X 0x481ae000
718 719
719#define GPIO1_BASE_TI_DM37XX 0x48310000 720#define GPIO1_BASE_TI_DM37XX 0x48310000
720#define GPIO2_BASE_TI_DM37XX 0x49050000 721#define GPIO2_BASE_TI_DM37XX 0x49050000
721#define GPIO3_BASE_TI_DM37XX 0x49052000 722#define GPIO3_BASE_TI_DM37XX 0x49052000
722#define GPIO4_BASE_TI_DM37XX 0x49054000 723#define GPIO4_BASE_TI_DM37XX 0x49054000
723#define GPIO5_BASE_TI_DM37XX 0x49056000 724#define GPIO5_BASE_TI_DM37XX 0x49056000
724#define GPIO6_BASE_TI_DM37XX 0x49058000 725#define GPIO6_BASE_TI_DM37XX 0x49058000
725 726
726#define GPIO_IRQSTATUS1 0x018 727#define GPIO_IRQSTATUS1 0x018
727#define GPIO_IRQENABLE1 0x01c 728#define GPIO_IRQENABLE1 0x01c
728#define GPIO_WAKEUPENABLE 0x020 729#define GPIO_WAKEUPENABLE 0x020
729#define GPIO_IRQSTATUS2 0x028 730#define GPIO_IRQSTATUS2 0x028
730#define GPIO_IRQENABLE2 0x02c 731#define GPIO_IRQENABLE2 0x02c
731#define GPIO_CTRL 0x030 732#define GPIO_CTRL 0x030
732#define GPIO_OE 0x034 733#define GPIO_OE 0x034
733#define GPIO_DATAIN 0x038 734#define GPIO_DATAIN 0x038
734#define GPIO_DATAOUT 0x03c 735#define GPIO_DATAOUT 0x03c
735#define GPIO_LEVELDETECT0 0x040 736#define GPIO_LEVELDETECT0 0x040
736#define GPIO_LEVELDETECT1 0x044 737#define GPIO_LEVELDETECT1 0x044
737#define GPIO_RISINGDETECT 0x048 738#define GPIO_RISINGDETECT 0x048
738#define GPIO_FALLINGDETECT 0x04c 739#define GPIO_FALLINGDETECT 0x04c
739#define GPIO_DEBOUNCENABLE 0x050 740#define GPIO_DEBOUNCENABLE 0x050
740#define GPIO_DEBOUNINGTIME 0x054 741#define GPIO_DEBOUNINGTIME 0x054
741#define GPIO_CLEARIRQENABLE1 0x060 742#define GPIO_CLEARIRQENABLE1 0x060
742#define GPIO_SETIRQENABLE1 0x064 743#define GPIO_SETIRQENABLE1 0x064
743#define GPIO_CLEARIRQENABLE2 0x070 744#define GPIO_CLEARIRQENABLE2 0x070
744#define GPIO_SETIRQENABLE2 0x074 745#define GPIO_SETIRQENABLE2 0x074
745#define GPIO_CLEANWKUENA 0x080 746#define GPIO_CLEANWKUENA 0x080
746#define GPIO_SETWKUENA 0x084 747#define GPIO_SETWKUENA 0x084
747#define GPIO_CLEARDATAOUT 0x090 748#define GPIO_CLEARDATAOUT 0x090
748#define GPIO_SETDATAOUT 0x094 749#define GPIO_SETDATAOUT 0x094
749 750
750/* 751/*
751 * I2C 752 * I2C
752 */ 753 */
753#define I2C1_BASE_3530 0x48070000 754#define I2C1_BASE_3530 0x48070000
754#define I2C2_BASE_3530 0x48072000 755#define I2C2_BASE_3530 0x48072000
755#define I2C3_BASE_3530 0x48060000 756#define I2C3_BASE_3530 0x48060000
756 757
757/* 758/*
758 * USB Host 759 * USB Host
759 */ 760 */
760#define OHCI1_BASE_2430 0x4805e000 761#define OHCI1_BASE_2430 0x4805e000
761 762
762#define OHCI1_BASE_OMAP3 0x48064400 763#define OHCI1_BASE_OMAP3 0x48064400
763#define EHCI1_BASE_OMAP3 0x48064800 764#define EHCI1_BASE_OMAP3 0x48064800
764 765
765#define OHCI1_BASE_OMAP4 0x4A064800 766#define OHCI1_BASE_OMAP4 0x4A064800
766#define EHCI1_BASE_OMAP4 0x4A064C00 767#define EHCI1_BASE_OMAP4 0x4A064C00
767 768
768/* 769/*
769 * SDRC 770 * SDRC
770 */ 771 */
771#define OMAP3530_SDRC_BASE 0x6d000000 772#define OMAP3530_SDRC_BASE 0x6d000000
772#define OMAP3530_SDRC_SIZE 0x00010000 /* 16KB */ 773#define OMAP3530_SDRC_SIZE 0x00010000 /* 16KB */
773 774
774/* 775/*
775 * DMA 776 * DMA
776 */ 777 */
777#define OMAP3530_SDMA_BASE 0x48056000 778#define OMAP3530_SDMA_BASE 0x48056000
778#define OMAP3530_SDMA_SIZE 0x00001000 /* 4KB */ 779#define OMAP3530_SDMA_SIZE 0x00001000 /* 4KB */
779 780
780/* 781/*
781 * PL310 L2CC (44xx) 782 * PL310 L2CC (44xx)
782 */ 783 */
783#define OMAP4_L2CC_BASE 0x48242000 784#define OMAP4_L2CC_BASE 0x48242000
784#define OMAP4_L2CC_SIZE 0x00001000 /* 4KB */ 785#define OMAP4_L2CC_SIZE 0x00001000 /* 4KB */
785 786
786#define OMAP4_CONTROL_ID_CODE 0x4a002204 787#define OMAP4_CONTROL_ID_CODE 0x4a002204
787 788
788#define AHCI1_BASE_OMAP5 0x4a140000 789#define AHCI1_BASE_OMAP5 0x4a140000
789 790
790#ifdef TI_AM335X 791#ifdef TI_AM335X
791#define TI_AM335X_CTLMOD_BASE 0x44e10000 792#define TI_AM335X_CTLMOD_BASE 0x44e10000
792#define CTLMOD_CONTROL_STATUS 0x40 793#define CTLMOD_CONTROL_STATUS 0x40
793#define CTLMOD_CONTROL_STATUS_SYSBOOT1 __BITS(23,22) 794#define CTLMOD_CONTROL_STATUS_SYSBOOT1 __BITS(23,22)
794#endif 795#endif
795#if defined(OMAP4) || defined(TI_AM335X) 796#if defined(OMAP4) || defined(TI_AM335X)
796#define EMIF_SDRAM_CONFIG 8 797#define EMIF_SDRAM_CONFIG 8
797#define SDRAM_CONFIG_WIDTH __BITS(15,14) 798#define SDRAM_CONFIG_WIDTH __BITS(15,14)
798#define SDRAM_CONFIG_RSIZE __BITS(9,7) 799#define SDRAM_CONFIG_RSIZE __BITS(9,7)
799#define SDRAM_CONFIG_IBANK __BITS(6,4) 800#define SDRAM_CONFIG_IBANK __BITS(6,4)
800#define SDRAM_CONFIG_EBANK __BIT(3) 801#define SDRAM_CONFIG_EBANK __BIT(3)
801#define SDRAM_CONFIG_PAGESIZE __BITS(2,0) 802#define SDRAM_CONFIG_PAGESIZE __BITS(2,0)
802#endif 803#endif
803  804
804#endif /* _ARM_OMAP_OMAP2_REG_H_ */ 805#endif /* _ARM_OMAP_OMAP2_REG_H_ */