diff options
author | Tony Lindgren <tony@atomide.com> | 2012-10-05 16:25:59 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-10-18 19:23:46 -0400 |
commit | e4c060db2c13f10de09101afc564763f9fd0019a (patch) | |
tree | 48a3ea5484e3fc9e485d7bb1b0e3d8795c67d368 /arch/arm | |
parent | e10dd62ffcb2953f80a4ea6ac53cb489ebfe0a79 (diff) |
ARM: OMAP: Split plat/cpu.h into local soc.h for mach-omap1 and mach-omap2
We want to remove plat/cpu.h. To do this, let's first split
it to private soc.h to mach-omap1 and mach-omap2. We have to
keep plat/cpu.h around until the remaining drivers are fixed,
so let's include the local soc.h in plat/cpu.h and for drivers
still including plat/cpu.h.
Once the drivers are fixed not to include plat/cpu.h, we
can remove the file.
This is needed for the ARM common zImage support.
[tony@atomide.com: updated to not print a warning]
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
51 files changed, 748 insertions, 584 deletions
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 4c895ef1d40f..9e74aa664acb 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | 24 | ||
25 | #include <plat/cpu.h> | 25 | #include "soc.h" |
26 | #include <plat/usb.h> | 26 | #include <plat/usb.h> |
27 | 27 | ||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c index c78fb913ee64..28aea55a412e 100644 --- a/arch/arm/mach-omap1/clock_data.c +++ b/arch/arm/mach-omap1/clock_data.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #include <asm/mach-types.h> /* for machine_is_* */ | 23 | #include <asm/mach-types.h> /* for machine_is_* */ |
24 | 24 | ||
25 | #include <plat/cpu.h> | 25 | #include "soc.h" |
26 | 26 | ||
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | #include <mach/usb.h> /* for OTG_BASE */ | 28 | #include <mach/usb.h> /* for OTG_BASE */ |
diff --git a/arch/arm/mach-omap1/i2c.c b/arch/arm/mach-omap1/i2c.c index a6f465a44642..32bcbb8d6c73 100644 --- a/arch/arm/mach-omap1/i2c.c +++ b/arch/arm/mach-omap1/i2c.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/i2c-omap.h> | 22 | #include <linux/i2c-omap.h> |
23 | #include <mach/mux.h> | 23 | #include <mach/mux.h> |
24 | #include <plat/cpu.h> | 24 | #include "soc.h" |
25 | 25 | ||
26 | #include "../plat-omap/i2c.h" | 26 | #include "../plat-omap/i2c.h" |
27 | 27 | ||
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c index a1b846aacdaf..52de382fc804 100644 --- a/arch/arm/mach-omap1/id.c +++ b/arch/arm/mach-omap1/id.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <asm/system_info.h> | 18 | #include <asm/system_info.h> |
19 | 19 | ||
20 | #include <plat/cpu.h> | 20 | #include "soc.h" |
21 | 21 | ||
22 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
23 | 23 | ||
diff --git a/arch/arm/mach-omap1/include/mach/hardware.h b/arch/arm/mach-omap1/include/mach/hardware.h index 2e60265779c8..f9989d38c464 100644 --- a/arch/arm/mach-omap1/include/mach/hardware.h +++ b/arch/arm/mach-omap1/include/mach/hardware.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/sizes.h> | 39 | #include <asm/sizes.h> |
40 | #ifndef __ASSEMBLER__ | 40 | #ifndef __ASSEMBLER__ |
41 | #include <asm/types.h> | 41 | #include <asm/types.h> |
42 | #include <plat/cpu.h> | 42 | #include "../../mach-omap1/soc.h" |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | 45 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these |
diff --git a/arch/arm/mach-omap1/include/mach/memory.h b/arch/arm/mach-omap1/include/mach/memory.h index 901082def9bd..351ae4f2c514 100644 --- a/arch/arm/mach-omap1/include/mach/memory.h +++ b/arch/arm/mach-omap1/include/mach/memory.h | |||
@@ -19,7 +19,7 @@ | |||
19 | * because of the strncmp(). | 19 | * because of the strncmp(). |
20 | */ | 20 | */ |
21 | #if defined(CONFIG_ARCH_OMAP15XX) && !defined(__ASSEMBLER__) | 21 | #if defined(CONFIG_ARCH_OMAP15XX) && !defined(__ASSEMBLER__) |
22 | #include <plat/cpu.h> | 22 | #include "../../mach-omap1/soc.h" |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * OMAP-1510 Local Bus address offset | 25 | * OMAP-1510 Local Bus address offset |
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c index 6995fb6a3345..122ef67939a2 100644 --- a/arch/arm/mach-omap1/irq.c +++ b/arch/arm/mach-omap1/irq.c | |||
@@ -45,7 +45,7 @@ | |||
45 | #include <asm/irq.h> | 45 | #include <asm/irq.h> |
46 | #include <asm/mach/irq.h> | 46 | #include <asm/mach/irq.h> |
47 | 47 | ||
48 | #include <plat/cpu.h> | 48 | #include "soc.h" |
49 | 49 | ||
50 | #include <mach/hardware.h> | 50 | #include <mach/hardware.h> |
51 | 51 | ||
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c index 3d461e1b8577..c6d8fdf92e9c 100644 --- a/arch/arm/mach-omap1/mcbsp.c +++ b/arch/arm/mach-omap1/mcbsp.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #include <plat-omap/dma-omap.h> | 22 | #include <plat-omap/dma-omap.h> |
23 | #include <mach/mux.h> | 23 | #include <mach/mux.h> |
24 | #include <plat/cpu.h> | 24 | #include "soc.h" |
25 | #include <linux/platform_data/asoc-ti-mcbsp.h> | 25 | #include <linux/platform_data/asoc-ti-mcbsp.h> |
26 | 26 | ||
27 | #include <mach/irqs.h> | 27 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-omap1/soc.h b/arch/arm/mach-omap1/soc.h new file mode 100644 index 000000000000..6cf9c1cc2bef --- /dev/null +++ b/arch/arm/mach-omap1/soc.h | |||
@@ -0,0 +1,229 @@ | |||
1 | /* | ||
2 | * OMAP cpu type detection | ||
3 | * | ||
4 | * Copyright (C) 2004, 2008 Nokia Corporation | ||
5 | * | ||
6 | * Copyright (C) 2009-11 Texas Instruments. | ||
7 | * | ||
8 | * Written by Tony Lindgren <tony.lindgren@nokia.com> | ||
9 | * | ||
10 | * Added OMAP4/5 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com> | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation; either version 2 of the License, or | ||
15 | * (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | * | ||
26 | */ | ||
27 | |||
28 | #ifndef __ASM_ARCH_OMAP_CPU_H | ||
29 | #define __ASM_ARCH_OMAP_CPU_H | ||
30 | |||
31 | #ifndef __ASSEMBLY__ | ||
32 | |||
33 | #include <linux/bitops.h> | ||
34 | |||
35 | /* | ||
36 | * Test if multicore OMAP support is needed | ||
37 | */ | ||
38 | #undef MULTI_OMAP1 | ||
39 | #undef OMAP_NAME | ||
40 | |||
41 | #ifdef CONFIG_ARCH_OMAP730 | ||
42 | # ifdef OMAP_NAME | ||
43 | # undef MULTI_OMAP1 | ||
44 | # define MULTI_OMAP1 | ||
45 | # else | ||
46 | # define OMAP_NAME omap730 | ||
47 | # endif | ||
48 | #endif | ||
49 | #ifdef CONFIG_ARCH_OMAP850 | ||
50 | # ifdef OMAP_NAME | ||
51 | # undef MULTI_OMAP1 | ||
52 | # define MULTI_OMAP1 | ||
53 | # else | ||
54 | # define OMAP_NAME omap850 | ||
55 | # endif | ||
56 | #endif | ||
57 | #ifdef CONFIG_ARCH_OMAP15XX | ||
58 | # ifdef OMAP_NAME | ||
59 | # undef MULTI_OMAP1 | ||
60 | # define MULTI_OMAP1 | ||
61 | # else | ||
62 | # define OMAP_NAME omap1510 | ||
63 | # endif | ||
64 | #endif | ||
65 | #ifdef CONFIG_ARCH_OMAP16XX | ||
66 | # ifdef OMAP_NAME | ||
67 | # undef MULTI_OMAP1 | ||
68 | # define MULTI_OMAP1 | ||
69 | # else | ||
70 | # define OMAP_NAME omap16xx | ||
71 | # endif | ||
72 | #endif | ||
73 | |||
74 | /* | ||
75 | * omap_rev bits: | ||
76 | * CPU id bits (0730, 1510, 1710, 2422...) [31:16] | ||
77 | * CPU revision (See _REV_ defined in cpu.h) [15:08] | ||
78 | * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00] | ||
79 | */ | ||
80 | unsigned int omap_rev(void); | ||
81 | |||
82 | /* | ||
83 | * Get the CPU revision for OMAP devices | ||
84 | */ | ||
85 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) | ||
86 | |||
87 | /* | ||
88 | * Macros to group OMAP into cpu classes. | ||
89 | * These can be used in most places. | ||
90 | * cpu_is_omap7xx(): True for OMAP730, OMAP850 | ||
91 | * cpu_is_omap15xx(): True for OMAP1510, OMAP5910 and OMAP310 | ||
92 | * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710 | ||
93 | */ | ||
94 | #define GET_OMAP_CLASS (omap_rev() & 0xff) | ||
95 | |||
96 | #define IS_OMAP_CLASS(class, id) \ | ||
97 | static inline int is_omap ##class (void) \ | ||
98 | { \ | ||
99 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ | ||
100 | } | ||
101 | |||
102 | #define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff) | ||
103 | |||
104 | #define IS_OMAP_SUBCLASS(subclass, id) \ | ||
105 | static inline int is_omap ##subclass (void) \ | ||
106 | { \ | ||
107 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | ||
108 | } | ||
109 | |||
110 | IS_OMAP_CLASS(7xx, 0x07) | ||
111 | IS_OMAP_CLASS(15xx, 0x15) | ||
112 | IS_OMAP_CLASS(16xx, 0x16) | ||
113 | |||
114 | #define cpu_is_omap7xx() 0 | ||
115 | #define cpu_is_omap15xx() 0 | ||
116 | #define cpu_is_omap16xx() 0 | ||
117 | |||
118 | #if defined(MULTI_OMAP1) | ||
119 | # if defined(CONFIG_ARCH_OMAP730) | ||
120 | # undef cpu_is_omap7xx | ||
121 | # define cpu_is_omap7xx() is_omap7xx() | ||
122 | # endif | ||
123 | # if defined(CONFIG_ARCH_OMAP850) | ||
124 | # undef cpu_is_omap7xx | ||
125 | # define cpu_is_omap7xx() is_omap7xx() | ||
126 | # endif | ||
127 | # if defined(CONFIG_ARCH_OMAP15XX) | ||
128 | # undef cpu_is_omap15xx | ||
129 | # define cpu_is_omap15xx() is_omap15xx() | ||
130 | # endif | ||
131 | # if defined(CONFIG_ARCH_OMAP16XX) | ||
132 | # undef cpu_is_omap16xx | ||
133 | # define cpu_is_omap16xx() is_omap16xx() | ||
134 | # endif | ||
135 | #else | ||
136 | # if defined(CONFIG_ARCH_OMAP730) | ||
137 | # undef cpu_is_omap7xx | ||
138 | # define cpu_is_omap7xx() 1 | ||
139 | # endif | ||
140 | # if defined(CONFIG_ARCH_OMAP850) | ||
141 | # undef cpu_is_omap7xx | ||
142 | # define cpu_is_omap7xx() 1 | ||
143 | # endif | ||
144 | # if defined(CONFIG_ARCH_OMAP15XX) | ||
145 | # undef cpu_is_omap15xx | ||
146 | # define cpu_is_omap15xx() 1 | ||
147 | # endif | ||
148 | # if defined(CONFIG_ARCH_OMAP16XX) | ||
149 | # undef cpu_is_omap16xx | ||
150 | # define cpu_is_omap16xx() 1 | ||
151 | # endif | ||
152 | #endif | ||
153 | |||
154 | /* | ||
155 | * Macros to detect individual cpu types. | ||
156 | * These are only rarely needed. | ||
157 | * cpu_is_omap310(): True for OMAP310 | ||
158 | * cpu_is_omap1510(): True for OMAP1510 | ||
159 | * cpu_is_omap1610(): True for OMAP1610 | ||
160 | * cpu_is_omap1611(): True for OMAP1611 | ||
161 | * cpu_is_omap5912(): True for OMAP5912 | ||
162 | * cpu_is_omap1621(): True for OMAP1621 | ||
163 | * cpu_is_omap1710(): True for OMAP1710 | ||
164 | */ | ||
165 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) | ||
166 | |||
167 | #define IS_OMAP_TYPE(type, id) \ | ||
168 | static inline int is_omap ##type (void) \ | ||
169 | { \ | ||
170 | return (GET_OMAP_TYPE == (id)) ? 1 : 0; \ | ||
171 | } | ||
172 | |||
173 | IS_OMAP_TYPE(310, 0x0310) | ||
174 | IS_OMAP_TYPE(1510, 0x1510) | ||
175 | IS_OMAP_TYPE(1610, 0x1610) | ||
176 | IS_OMAP_TYPE(1611, 0x1611) | ||
177 | IS_OMAP_TYPE(5912, 0x1611) | ||
178 | IS_OMAP_TYPE(1621, 0x1621) | ||
179 | IS_OMAP_TYPE(1710, 0x1710) | ||
180 | |||
181 | #define cpu_is_omap310() 0 | ||
182 | #define cpu_is_omap1510() 0 | ||
183 | #define cpu_is_omap1610() 0 | ||
184 | #define cpu_is_omap5912() 0 | ||
185 | #define cpu_is_omap1611() 0 | ||
186 | #define cpu_is_omap1621() 0 | ||
187 | #define cpu_is_omap1710() 0 | ||
188 | |||
189 | /* These are needed to compile common code */ | ||
190 | #ifdef CONFIG_ARCH_OMAP1 | ||
191 | #define cpu_is_omap242x() 0 | ||
192 | #define cpu_is_omap2430() 0 | ||
193 | #define cpu_is_omap243x() 0 | ||
194 | #define cpu_is_omap24xx() 0 | ||
195 | #define cpu_is_omap34xx() 0 | ||
196 | #define cpu_is_omap44xx() 0 | ||
197 | #define soc_is_omap54xx() 0 | ||
198 | #define soc_is_am33xx() 0 | ||
199 | #define cpu_class_is_omap1() 1 | ||
200 | #define cpu_class_is_omap2() 0 | ||
201 | #endif | ||
202 | |||
203 | /* | ||
204 | * Whether we have MULTI_OMAP1 or not, we still need to distinguish | ||
205 | * between 310 vs. 1510 and 1611B/5912 vs. 1710. | ||
206 | */ | ||
207 | |||
208 | #if defined(CONFIG_ARCH_OMAP15XX) | ||
209 | # undef cpu_is_omap310 | ||
210 | # undef cpu_is_omap1510 | ||
211 | # define cpu_is_omap310() is_omap310() | ||
212 | # define cpu_is_omap1510() is_omap1510() | ||
213 | #endif | ||
214 | |||
215 | #if defined(CONFIG_ARCH_OMAP16XX) | ||
216 | # undef cpu_is_omap1610 | ||
217 | # undef cpu_is_omap1611 | ||
218 | # undef cpu_is_omap5912 | ||
219 | # undef cpu_is_omap1621 | ||
220 | # undef cpu_is_omap1710 | ||
221 | # define cpu_is_omap1610() is_omap1610() | ||
222 | # define cpu_is_omap1611() is_omap1611() | ||
223 | # define cpu_is_omap5912() is_omap5912() | ||
224 | # define cpu_is_omap1621() is_omap1621() | ||
225 | # define cpu_is_omap1710() is_omap1710() | ||
226 | #endif | ||
227 | |||
228 | #endif /* __ASSEMBLY__ */ | ||
229 | #endif | ||
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 3e8725b73161..d2a419fcfce3 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include "gpmc.h" | 39 | #include "gpmc.h" |
40 | #include "gpmc-smc91x.h" | 40 | #include "gpmc-smc91x.h" |
41 | 41 | ||
42 | #include "soc.h" | ||
42 | #include "board-flash.h" | 43 | #include "board-flash.h" |
43 | #include "mux.h" | 44 | #include "mux.h" |
44 | #include "sdram-qimonda-hyb18m512160af-6.h" | 45 | #include "sdram-qimonda-hyb18m512160af-6.h" |
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c index d3b6155b9e29..c33adea0247c 100644 --- a/arch/arm/mach-omap2/board-flash.c +++ b/arch/arm/mach-omap2/board-flash.c | |||
@@ -17,11 +17,10 @@ | |||
17 | #include <linux/mtd/physmap.h> | 17 | #include <linux/mtd/physmap.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | 19 | ||
20 | #include <plat/cpu.h> | ||
21 | #include "gpmc.h" | ||
22 | #include <linux/platform_data/mtd-nand-omap2.h> | 20 | #include <linux/platform_data/mtd-nand-omap2.h> |
23 | #include <linux/platform_data/mtd-onenand-omap2.h> | 21 | #include <linux/platform_data/mtd-onenand-omap2.h> |
24 | 22 | ||
23 | #include "soc.h" | ||
25 | #include "common.h" | 24 | #include "common.h" |
26 | #include "board-flash.h" | 25 | #include "board-flash.h" |
27 | #include "gpmc-onenand.h" | 26 | #include "gpmc-onenand.h" |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 2064917874a7..a5497ce0a6c8 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <plat/usb.h> | 46 | #include <plat/usb.h> |
47 | #include "omap_device.h" | 47 | #include "omap_device.h" |
48 | 48 | ||
49 | #include "soc.h" | ||
49 | #include "mux.h" | 50 | #include "mux.h" |
50 | #include "hsmmc.h" | 51 | #include "hsmmc.h" |
51 | #include "pm.h" | 52 | #include "pm.h" |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 1d8e926b52fe..8479779fd346 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <video/omapdss.h> | 52 | #include <video/omapdss.h> |
53 | #include <video/omap-panel-tfp410.h> | 53 | #include <video/omap-panel-tfp410.h> |
54 | 54 | ||
55 | #include "soc.h" | ||
55 | #include "mux.h" | 56 | #include "mux.h" |
56 | #include "sdram-micron-mt46h32m32lf-6.h" | 57 | #include "sdram-micron-mt46h32m32lf-6.h" |
57 | #include "hsmmc.h" | 58 | #include "hsmmc.h" |
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c index 230cb33b33ee..1c7c834a5b5f 100644 --- a/arch/arm/mach-omap2/board-zoom-display.c +++ b/arch/arm/mach-omap2/board-zoom-display.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <video/omapdss.h> | 18 | #include <video/omapdss.h> |
19 | #include "board-zoom.h" | 19 | #include "board-zoom.h" |
20 | 20 | ||
21 | #include "soc.h" | ||
21 | #include "common.h" | 22 | #include "common.h" |
22 | 23 | ||
23 | #define LCD_PANEL_RESET_GPIO_PROD 96 | 24 | #define LCD_PANEL_RESET_GPIO_PROD 96 |
diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c index 26b06a90820c..1cb79cc58089 100644 --- a/arch/arm/mach-omap2/clock33xx_data.c +++ b/arch/arm/mach-omap2/clock33xx_data.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | 20 | ||
21 | #include "am33xx.h" | 21 | #include "soc.h" |
22 | #include "iomap.h" | 22 | #include "iomap.h" |
23 | #include "control.h" | 23 | #include "control.h" |
24 | #include "clock.h" | 24 | #include "clock.h" |
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index 32dbcbc3ee6d..467567ad526a 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/bitops.h> | 28 | #include <linux/bitops.h> |
29 | 29 | ||
30 | #include "soc.h" | ||
30 | #include "clock.h" | 31 | #include "clock.h" |
31 | #include "clockdomain.h" | 32 | #include "clockdomain.h" |
32 | 33 | ||
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index 53e8ba06620b..bc42446e23ab 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h | |||
@@ -20,7 +20,6 @@ | |||
20 | #include "powerdomain.h" | 20 | #include "powerdomain.h" |
21 | #include "clock.h" | 21 | #include "clock.h" |
22 | #include "omap_hwmod.h" | 22 | #include "omap_hwmod.h" |
23 | #include <plat/cpu.h> | ||
24 | 23 | ||
25 | /* | 24 | /* |
26 | * Clockdomain flags | 25 | * Clockdomain flags |
diff --git a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c index 70294f54e35a..3e4e9209b2df 100644 --- a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c +++ b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c | |||
@@ -14,6 +14,8 @@ | |||
14 | 14 | ||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <plat/prcm.h> | 16 | #include <plat/prcm.h> |
17 | |||
18 | #include "soc.h" | ||
17 | #include "prm.h" | 19 | #include "prm.h" |
18 | #include "prm2xxx_3xxx.h" | 20 | #include "prm2xxx_3xxx.h" |
19 | #include "cm.h" | 21 | #include "cm.h" |
diff --git a/arch/arm/mach-omap2/clockdomains2420_data.c b/arch/arm/mach-omap2/clockdomains2420_data.c index 5c741852fac0..7e76becf3a4a 100644 --- a/arch/arm/mach-omap2/clockdomains2420_data.c +++ b/arch/arm/mach-omap2/clockdomains2420_data.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/io.h> | 36 | #include <linux/io.h> |
37 | 37 | ||
38 | #include "soc.h" | ||
38 | #include "clockdomain.h" | 39 | #include "clockdomain.h" |
39 | #include "prm2xxx_3xxx.h" | 40 | #include "prm2xxx_3xxx.h" |
40 | #include "cm2xxx_3xxx.h" | 41 | #include "cm2xxx_3xxx.h" |
diff --git a/arch/arm/mach-omap2/clockdomains2430_data.c b/arch/arm/mach-omap2/clockdomains2430_data.c index f09617555e15..b923007e45d0 100644 --- a/arch/arm/mach-omap2/clockdomains2430_data.c +++ b/arch/arm/mach-omap2/clockdomains2430_data.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/io.h> | 36 | #include <linux/io.h> |
37 | 37 | ||
38 | #include "soc.h" | ||
38 | #include "clockdomain.h" | 39 | #include "clockdomain.h" |
39 | #include "prm2xxx_3xxx.h" | 40 | #include "prm2xxx_3xxx.h" |
40 | #include "cm2xxx_3xxx.h" | 41 | #include "cm2xxx_3xxx.h" |
diff --git a/arch/arm/mach-omap2/clockdomains3xxx_data.c b/arch/arm/mach-omap2/clockdomains3xxx_data.c index 933a35cd124a..e6b91e552d3d 100644 --- a/arch/arm/mach-omap2/clockdomains3xxx_data.c +++ b/arch/arm/mach-omap2/clockdomains3xxx_data.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/io.h> | 34 | #include <linux/io.h> |
35 | 35 | ||
36 | #include "soc.h" | ||
36 | #include "clockdomain.h" | 37 | #include "clockdomain.h" |
37 | #include "prm2xxx_3xxx.h" | 38 | #include "prm2xxx_3xxx.h" |
38 | #include "cm2xxx_3xxx.h" | 39 | #include "cm2xxx_3xxx.h" |
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 42b1b2e009d3..d135d551d124 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -34,7 +34,6 @@ | |||
34 | 34 | ||
35 | #include <asm/proc-fns.h> | 35 | #include <asm/proc-fns.h> |
36 | 36 | ||
37 | #include <plat/cpu.h> | ||
38 | #include <plat/serial.h> | 37 | #include <plat/serial.h> |
39 | 38 | ||
40 | #include "../plat-omap/common.h" | 39 | #include "../plat-omap/common.h" |
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index 9aaaf4e03ca3..89c57129357a 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include "omap-pm.h" | 30 | #include "omap-pm.h" |
31 | #include "common.h" | 31 | #include "common.h" |
32 | 32 | ||
33 | #include "soc.h" | ||
33 | #include "iomap.h" | 34 | #include "iomap.h" |
34 | #include "mux.h" | 35 | #include "mux.h" |
35 | #include "control.h" | 36 | #include "control.h" |
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c index bc9a4e941e59..b1926cd70468 100644 --- a/arch/arm/mach-omap2/dma.c +++ b/arch/arm/mach-omap2/dma.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <plat-omap/dma-omap.h> | 31 | #include <plat-omap/dma-omap.h> |
32 | 32 | ||
33 | #include "soc.h" | ||
33 | #include "omap_hwmod.h" | 34 | #include "omap_hwmod.h" |
34 | #include "omap_device.h" | 35 | #include "omap_device.h" |
35 | 36 | ||
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 7dff7ffcb7ee..6af1a5d98e6f 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -30,8 +30,6 @@ | |||
30 | 30 | ||
31 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
32 | 32 | ||
33 | #include <plat/cpu.h> | ||
34 | |||
35 | #include "soc.h" | 33 | #include "soc.h" |
36 | #include "common.h" | 34 | #include "common.h" |
37 | #include "omap_device.h" | 35 | #include "omap_device.h" |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index ddbf2eb6ba5b..e3406dce59be 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | #include <linux/platform_data/gpio-omap.h> | 18 | #include <linux/platform_data/gpio-omap.h> |
19 | 19 | ||
20 | #include "soc.h" | ||
20 | #include "omap_device.h" | 21 | #include "omap_device.h" |
21 | #include "omap-pm.h" | 22 | #include "omap-pm.h" |
22 | 23 | ||
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c index 8b3993724a1b..ad55b943108f 100644 --- a/arch/arm/mach-omap2/i2c.c +++ b/arch/arm/mach-omap2/i2c.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include "soc.h" | ||
22 | #include "common.h" | 23 | #include "common.h" |
23 | #include "omap_hwmod.h" | 24 | #include "omap_hwmod.h" |
24 | #include "omap_device.h" | 25 | #include "omap_device.h" |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 635d5ef9551c..26126343d6ac 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -38,6 +38,7 @@ | |||
38 | 38 | ||
39 | #include "omap_hwmod.h" | 39 | #include "omap_hwmod.h" |
40 | 40 | ||
41 | #include "soc.h" | ||
41 | #include "control.h" | 42 | #include "control.h" |
42 | #include "mux.h" | 43 | #include "mux.h" |
43 | #include "prm.h" | 44 | #include "prm.h" |
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c index ff4e6a0e9c7c..3f5fd7e3549d 100644 --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <asm/suspend.h> | 50 | #include <asm/suspend.h> |
51 | #include <asm/hardware/cache-l2x0.h> | 51 | #include <asm/hardware/cache-l2x0.h> |
52 | 52 | ||
53 | #include "soc.h" | ||
53 | #include "common.h" | 54 | #include "common.h" |
54 | #include "omap44xx.h" | 55 | #include "omap44xx.h" |
55 | #include "omap4-sar-layout.h" | 56 | #include "omap4-sar-layout.h" |
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h index b3349f7b1a2c..87b59b45c678 100644 --- a/arch/arm/mach-omap2/omap_hwmod.h +++ b/arch/arm/mach-omap2/omap_hwmod.h | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/list.h> | 35 | #include <linux/list.h> |
36 | #include <linux/ioport.h> | 36 | #include <linux/ioport.h> |
37 | #include <linux/spinlock.h> | 37 | #include <linux/spinlock.h> |
38 | #include <plat/cpu.h> | ||
39 | 38 | ||
40 | struct omap_device; | 39 | struct omap_device; |
41 | 40 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c index 60ed43531079..ad8d43b33273 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/i2c-omap.h> | 17 | #include <linux/i2c-omap.h> |
18 | 18 | ||
19 | #include "omap_hwmod.h" | 19 | #include "omap_hwmod.h" |
20 | #include <plat/cpu.h> | ||
21 | #include <linux/platform_data/gpio-omap.h> | 20 | #include <linux/platform_data/gpio-omap.h> |
22 | #include <linux/platform_data/spi-omap2-mcspi.h> | 21 | #include <linux/platform_data/spi-omap2-mcspi.h> |
23 | 22 | ||
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c index f515a1a056d5..2bf35dc091be 100644 --- a/arch/arm/mach-omap2/omap_twl.c +++ b/arch/arm/mach-omap2/omap_twl.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/i2c/twl.h> | 19 | #include <linux/i2c/twl.h> |
20 | 20 | ||
21 | #include "soc.h" | ||
21 | #include "voltage.h" | 22 | #include "voltage.h" |
22 | 23 | ||
23 | #include "pm.h" | 24 | #include "pm.h" |
diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c index 75cef5f67a8a..62772e0e0d69 100644 --- a/arch/arm/mach-omap2/opp3xxx_data.c +++ b/arch/arm/mach-omap2/opp3xxx_data.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | 21 | ||
22 | #include "soc.h" | ||
22 | #include "control.h" | 23 | #include "control.h" |
23 | #include "omap_opp_data.h" | 24 | #include "omap_opp_data.h" |
24 | #include "pm.h" | 25 | #include "pm.h" |
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 140eb7939e60..3cf4fdfd7ab0 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <plat/dmtimer.h> | 33 | #include <plat/dmtimer.h> |
34 | #include "omap-pm.h" | 34 | #include "omap-pm.h" |
35 | 35 | ||
36 | #include "soc.h" | ||
36 | #include "cm2xxx_3xxx.h" | 37 | #include "cm2xxx_3xxx.h" |
37 | #include "prm2xxx_3xxx.h" | 38 | #include "prm2xxx_3xxx.h" |
38 | #include "pm.h" | 39 | #include "pm.h" |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index e66855ef4c78..331478f9b864 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "omap_device.h" | 24 | #include "omap_device.h" |
25 | #include "common.h" | 25 | #include "common.h" |
26 | 26 | ||
27 | #include "soc.h" | ||
27 | #include "prcm-common.h" | 28 | #include "prcm-common.h" |
28 | #include "voltage.h" | 29 | #include "voltage.h" |
29 | #include "powerdomain.h" | 30 | #include "powerdomain.h" |
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index be8989e6d78c..6d17e044ffb8 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | #include "../plat-omap/sram.h" | 41 | #include "../plat-omap/sram.h" |
42 | 42 | ||
43 | #include "soc.h" | ||
43 | #include "common.h" | 44 | #include "common.h" |
44 | #include "clock.h" | 45 | #include "clock.h" |
45 | #include "prm2xxx_3xxx.h" | 46 | #include "prm2xxx_3xxx.h" |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index a08e87eafbeb..160fa250c41e 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -42,6 +42,7 @@ | |||
42 | 42 | ||
43 | #include "../plat-omap/sram.h" | 43 | #include "../plat-omap/sram.h" |
44 | 44 | ||
45 | #include "soc.h" | ||
45 | #include "common.h" | 46 | #include "common.h" |
46 | #include "cm2xxx_3xxx.h" | 47 | #include "cm2xxx_3xxx.h" |
47 | #include "cm-regbits-34xx.h" | 48 | #include "cm-regbits-34xx.h" |
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index 04922d149068..7da75aed1514 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <asm/system_misc.h> | 19 | #include <asm/system_misc.h> |
20 | 20 | ||
21 | #include "soc.h" | ||
21 | #include "common.h" | 22 | #include "common.h" |
22 | #include "clockdomain.h" | 23 | #include "clockdomain.h" |
23 | #include "powerdomain.h" | 24 | #include "powerdomain.h" |
diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c index 98c5969acf6d..3cf79b54ce61 100644 --- a/arch/arm/mach-omap2/pmu.c +++ b/arch/arm/mach-omap2/pmu.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <asm/pmu.h> | 16 | #include <asm/pmu.h> |
17 | 17 | ||
18 | #include "soc.h" | ||
18 | #include "omap_hwmod.h" | 19 | #include "omap_hwmod.h" |
19 | #include "omap_device.h" | 20 | #include "omap_device.h" |
20 | 21 | ||
diff --git a/arch/arm/mach-omap2/powerdomain.h b/arch/arm/mach-omap2/powerdomain.h index baee90608d11..5277d56eb37f 100644 --- a/arch/arm/mach-omap2/powerdomain.h +++ b/arch/arm/mach-omap2/powerdomain.h | |||
@@ -22,8 +22,6 @@ | |||
22 | 22 | ||
23 | #include <linux/atomic.h> | 23 | #include <linux/atomic.h> |
24 | 24 | ||
25 | #include <plat/cpu.h> | ||
26 | |||
27 | #include "voltage.h" | 25 | #include "voltage.h" |
28 | 26 | ||
29 | /* Powerdomain basic power states */ | 27 | /* Powerdomain basic power states */ |
diff --git a/arch/arm/mach-omap2/powerdomains2xxx_data.c b/arch/arm/mach-omap2/powerdomains2xxx_data.c index 2385c1f009ee..ba520d4f7c7b 100644 --- a/arch/arm/mach-omap2/powerdomains2xxx_data.c +++ b/arch/arm/mach-omap2/powerdomains2xxx_data.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | 16 | ||
17 | #include "soc.h" | ||
17 | #include "powerdomain.h" | 18 | #include "powerdomain.h" |
18 | #include "powerdomains2xxx_3xxx_data.h" | 19 | #include "powerdomains2xxx_3xxx_data.h" |
19 | 20 | ||
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index 0f51e034e0aa..cff270a178c5 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "common.h" | 28 | #include "common.h" |
29 | #include <plat/prcm.h> | 29 | #include <plat/prcm.h> |
30 | 30 | ||
31 | #include "soc.h" | ||
31 | #include "clock.h" | 32 | #include "clock.h" |
32 | #include "clock2xxx.h" | 33 | #include "clock2xxx.h" |
33 | #include "cm2xxx_3xxx.h" | 34 | #include "cm2xxx_3xxx.h" |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index a3da4654de97..12363f313f08 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "omap_hwmod.h" | 35 | #include "omap_hwmod.h" |
36 | #include "omap_device.h" | 36 | #include "omap_device.h" |
37 | #include "omap-pm.h" | 37 | #include "omap-pm.h" |
38 | #include "soc.h" | ||
38 | #include "prm2xxx_3xxx.h" | 39 | #include "prm2xxx_3xxx.h" |
39 | #include "pm.h" | 40 | #include "pm.h" |
40 | #include "cm2xxx_3xxx.h" | 41 | #include "cm2xxx_3xxx.h" |
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h index fc9b96daf851..070096496e20 100644 --- a/arch/arm/mach-omap2/soc.h +++ b/arch/arm/mach-omap2/soc.h | |||
@@ -1,7 +1,473 @@ | |||
1 | #include <plat/cpu.h> | 1 | /* |
2 | * OMAP cpu type detection | ||
3 | * | ||
4 | * Copyright (C) 2004, 2008 Nokia Corporation | ||
5 | * | ||
6 | * Copyright (C) 2009-11 Texas Instruments. | ||
7 | * | ||
8 | * Written by Tony Lindgren <tony.lindgren@nokia.com> | ||
9 | * | ||
10 | * Added OMAP4/5 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com> | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation; either version 2 of the License, or | ||
15 | * (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | * | ||
26 | */ | ||
27 | |||
2 | #include "omap24xx.h" | 28 | #include "omap24xx.h" |
3 | #include "omap34xx.h" | 29 | #include "omap34xx.h" |
4 | #include "omap44xx.h" | 30 | #include "omap44xx.h" |
5 | #include "ti81xx.h" | 31 | #include "ti81xx.h" |
6 | #include "am33xx.h" | 32 | #include "am33xx.h" |
7 | #include "omap54xx.h" | 33 | #include "omap54xx.h" |
34 | |||
35 | #ifndef __ASSEMBLY__ | ||
36 | |||
37 | #include <linux/bitops.h> | ||
38 | |||
39 | /* | ||
40 | * Test if multicore OMAP support is needed | ||
41 | */ | ||
42 | #undef MULTI_OMAP2 | ||
43 | #undef OMAP_NAME | ||
44 | |||
45 | #ifdef CONFIG_SOC_OMAP2420 | ||
46 | # ifdef OMAP_NAME | ||
47 | # undef MULTI_OMAP2 | ||
48 | # define MULTI_OMAP2 | ||
49 | # else | ||
50 | # define OMAP_NAME omap2420 | ||
51 | # endif | ||
52 | #endif | ||
53 | #ifdef CONFIG_SOC_OMAP2430 | ||
54 | # ifdef OMAP_NAME | ||
55 | # undef MULTI_OMAP2 | ||
56 | # define MULTI_OMAP2 | ||
57 | # else | ||
58 | # define OMAP_NAME omap2430 | ||
59 | # endif | ||
60 | #endif | ||
61 | #ifdef CONFIG_ARCH_OMAP3 | ||
62 | # ifdef OMAP_NAME | ||
63 | # undef MULTI_OMAP2 | ||
64 | # define MULTI_OMAP2 | ||
65 | # else | ||
66 | # define OMAP_NAME omap3 | ||
67 | # endif | ||
68 | #endif | ||
69 | #ifdef CONFIG_ARCH_OMAP4 | ||
70 | # ifdef OMAP_NAME | ||
71 | # undef MULTI_OMAP2 | ||
72 | # define MULTI_OMAP2 | ||
73 | # else | ||
74 | # define OMAP_NAME omap4 | ||
75 | # endif | ||
76 | #endif | ||
77 | |||
78 | #ifdef CONFIG_SOC_OMAP5 | ||
79 | # ifdef OMAP_NAME | ||
80 | # undef MULTI_OMAP2 | ||
81 | # define MULTI_OMAP2 | ||
82 | # else | ||
83 | # define OMAP_NAME omap5 | ||
84 | # endif | ||
85 | #endif | ||
86 | |||
87 | #ifdef CONFIG_SOC_AM33XX | ||
88 | # ifdef OMAP_NAME | ||
89 | # undef MULTI_OMAP2 | ||
90 | # define MULTI_OMAP2 | ||
91 | # else | ||
92 | # define OMAP_NAME am33xx | ||
93 | # endif | ||
94 | #endif | ||
95 | |||
96 | /* | ||
97 | * Omap device type i.e. EMU/HS/TST/GP/BAD | ||
98 | */ | ||
99 | #define OMAP2_DEVICE_TYPE_TEST 0 | ||
100 | #define OMAP2_DEVICE_TYPE_EMU 1 | ||
101 | #define OMAP2_DEVICE_TYPE_SEC 2 | ||
102 | #define OMAP2_DEVICE_TYPE_GP 3 | ||
103 | #define OMAP2_DEVICE_TYPE_BAD 4 | ||
104 | |||
105 | int omap_type(void); | ||
106 | |||
107 | /* | ||
108 | * omap_rev bits: | ||
109 | * CPU id bits (0730, 1510, 1710, 2422...) [31:16] | ||
110 | * CPU revision (See _REV_ defined in cpu.h) [15:08] | ||
111 | * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00] | ||
112 | */ | ||
113 | unsigned int omap_rev(void); | ||
114 | |||
115 | /* | ||
116 | * Get the CPU revision for OMAP devices | ||
117 | */ | ||
118 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) | ||
119 | |||
120 | /* | ||
121 | * Macros to group OMAP into cpu classes. | ||
122 | * These can be used in most places. | ||
123 | * cpu_is_omap24xx(): True for OMAP2420, OMAP2422, OMAP2423, OMAP2430 | ||
124 | * cpu_is_omap242x(): True for OMAP2420, OMAP2422, OMAP2423 | ||
125 | * cpu_is_omap243x(): True for OMAP2430 | ||
126 | * cpu_is_omap343x(): True for OMAP3430 | ||
127 | * cpu_is_omap443x(): True for OMAP4430 | ||
128 | * cpu_is_omap446x(): True for OMAP4460 | ||
129 | * cpu_is_omap447x(): True for OMAP4470 | ||
130 | * soc_is_omap543x(): True for OMAP5430, OMAP5432 | ||
131 | */ | ||
132 | #define GET_OMAP_CLASS (omap_rev() & 0xff) | ||
133 | |||
134 | #define IS_OMAP_CLASS(class, id) \ | ||
135 | static inline int is_omap ##class (void) \ | ||
136 | { \ | ||
137 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ | ||
138 | } | ||
139 | |||
140 | #define GET_AM_CLASS ((omap_rev() >> 24) & 0xff) | ||
141 | |||
142 | #define IS_AM_CLASS(class, id) \ | ||
143 | static inline int is_am ##class (void) \ | ||
144 | { \ | ||
145 | return (GET_AM_CLASS == (id)) ? 1 : 0; \ | ||
146 | } | ||
147 | |||
148 | #define GET_TI_CLASS ((omap_rev() >> 24) & 0xff) | ||
149 | |||
150 | #define IS_TI_CLASS(class, id) \ | ||
151 | static inline int is_ti ##class (void) \ | ||
152 | { \ | ||
153 | return (GET_TI_CLASS == (id)) ? 1 : 0; \ | ||
154 | } | ||
155 | |||
156 | #define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff) | ||
157 | |||
158 | #define IS_OMAP_SUBCLASS(subclass, id) \ | ||
159 | static inline int is_omap ##subclass (void) \ | ||
160 | { \ | ||
161 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | ||
162 | } | ||
163 | |||
164 | #define IS_TI_SUBCLASS(subclass, id) \ | ||
165 | static inline int is_ti ##subclass (void) \ | ||
166 | { \ | ||
167 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | ||
168 | } | ||
169 | |||
170 | #define IS_AM_SUBCLASS(subclass, id) \ | ||
171 | static inline int is_am ##subclass (void) \ | ||
172 | { \ | ||
173 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | ||
174 | } | ||
175 | |||
176 | IS_OMAP_CLASS(24xx, 0x24) | ||
177 | IS_OMAP_CLASS(34xx, 0x34) | ||
178 | IS_OMAP_CLASS(44xx, 0x44) | ||
179 | IS_AM_CLASS(35xx, 0x35) | ||
180 | IS_OMAP_CLASS(54xx, 0x54) | ||
181 | IS_AM_CLASS(33xx, 0x33) | ||
182 | |||
183 | IS_TI_CLASS(81xx, 0x81) | ||
184 | |||
185 | IS_OMAP_SUBCLASS(242x, 0x242) | ||
186 | IS_OMAP_SUBCLASS(243x, 0x243) | ||
187 | IS_OMAP_SUBCLASS(343x, 0x343) | ||
188 | IS_OMAP_SUBCLASS(363x, 0x363) | ||
189 | IS_OMAP_SUBCLASS(443x, 0x443) | ||
190 | IS_OMAP_SUBCLASS(446x, 0x446) | ||
191 | IS_OMAP_SUBCLASS(447x, 0x447) | ||
192 | IS_OMAP_SUBCLASS(543x, 0x543) | ||
193 | |||
194 | IS_TI_SUBCLASS(816x, 0x816) | ||
195 | IS_TI_SUBCLASS(814x, 0x814) | ||
196 | IS_AM_SUBCLASS(335x, 0x335) | ||
197 | |||
198 | #define cpu_is_omap24xx() 0 | ||
199 | #define cpu_is_omap242x() 0 | ||
200 | #define cpu_is_omap243x() 0 | ||
201 | #define cpu_is_omap34xx() 0 | ||
202 | #define cpu_is_omap343x() 0 | ||
203 | #define cpu_is_ti81xx() 0 | ||
204 | #define cpu_is_ti816x() 0 | ||
205 | #define cpu_is_ti814x() 0 | ||
206 | #define soc_is_am35xx() 0 | ||
207 | #define soc_is_am33xx() 0 | ||
208 | #define soc_is_am335x() 0 | ||
209 | #define cpu_is_omap44xx() 0 | ||
210 | #define cpu_is_omap443x() 0 | ||
211 | #define cpu_is_omap446x() 0 | ||
212 | #define cpu_is_omap447x() 0 | ||
213 | #define soc_is_omap54xx() 0 | ||
214 | #define soc_is_omap543x() 0 | ||
215 | |||
216 | #if defined(MULTI_OMAP2) | ||
217 | # if defined(CONFIG_ARCH_OMAP2) | ||
218 | # undef cpu_is_omap24xx | ||
219 | # define cpu_is_omap24xx() is_omap24xx() | ||
220 | # endif | ||
221 | # if defined (CONFIG_SOC_OMAP2420) | ||
222 | # undef cpu_is_omap242x | ||
223 | # define cpu_is_omap242x() is_omap242x() | ||
224 | # endif | ||
225 | # if defined (CONFIG_SOC_OMAP2430) | ||
226 | # undef cpu_is_omap243x | ||
227 | # define cpu_is_omap243x() is_omap243x() | ||
228 | # endif | ||
229 | # if defined(CONFIG_ARCH_OMAP3) | ||
230 | # undef cpu_is_omap34xx | ||
231 | # undef cpu_is_omap343x | ||
232 | # define cpu_is_omap34xx() is_omap34xx() | ||
233 | # define cpu_is_omap343x() is_omap343x() | ||
234 | # endif | ||
235 | #else | ||
236 | # if defined(CONFIG_ARCH_OMAP2) | ||
237 | # undef cpu_is_omap24xx | ||
238 | # define cpu_is_omap24xx() 1 | ||
239 | # endif | ||
240 | # if defined(CONFIG_SOC_OMAP2420) | ||
241 | # undef cpu_is_omap242x | ||
242 | # define cpu_is_omap242x() 1 | ||
243 | # endif | ||
244 | # if defined(CONFIG_SOC_OMAP2430) | ||
245 | # undef cpu_is_omap243x | ||
246 | # define cpu_is_omap243x() 1 | ||
247 | # endif | ||
248 | # if defined(CONFIG_ARCH_OMAP3) | ||
249 | # undef cpu_is_omap34xx | ||
250 | # define cpu_is_omap34xx() 1 | ||
251 | # endif | ||
252 | # if defined(CONFIG_SOC_OMAP3430) | ||
253 | # undef cpu_is_omap343x | ||
254 | # define cpu_is_omap343x() 1 | ||
255 | # endif | ||
256 | #endif | ||
257 | |||
258 | /* | ||
259 | * Macros to detect individual cpu types. | ||
260 | * These are only rarely needed. | ||
261 | * cpu_is_omap2420(): True for OMAP2420 | ||
262 | * cpu_is_omap2422(): True for OMAP2422 | ||
263 | * cpu_is_omap2423(): True for OMAP2423 | ||
264 | * cpu_is_omap2430(): True for OMAP2430 | ||
265 | * cpu_is_omap3430(): True for OMAP3430 | ||
266 | */ | ||
267 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) | ||
268 | |||
269 | #define IS_OMAP_TYPE(type, id) \ | ||
270 | static inline int is_omap ##type (void) \ | ||
271 | { \ | ||
272 | return (GET_OMAP_TYPE == (id)) ? 1 : 0; \ | ||
273 | } | ||
274 | |||
275 | IS_OMAP_TYPE(2420, 0x2420) | ||
276 | IS_OMAP_TYPE(2422, 0x2422) | ||
277 | IS_OMAP_TYPE(2423, 0x2423) | ||
278 | IS_OMAP_TYPE(2430, 0x2430) | ||
279 | IS_OMAP_TYPE(3430, 0x3430) | ||
280 | |||
281 | #define cpu_is_omap2420() 0 | ||
282 | #define cpu_is_omap2422() 0 | ||
283 | #define cpu_is_omap2423() 0 | ||
284 | #define cpu_is_omap2430() 0 | ||
285 | #define cpu_is_omap3430() 0 | ||
286 | #define cpu_is_omap3630() 0 | ||
287 | #define soc_is_omap5430() 0 | ||
288 | |||
289 | /* These are needed for the common code */ | ||
290 | #ifdef CONFIG_ARCH_OMAP2PLUS | ||
291 | #define cpu_is_omap7xx() 0 | ||
292 | #define cpu_is_omap15xx() 0 | ||
293 | #define cpu_is_omap16xx() 0 | ||
294 | #define cpu_is_omap1510() 0 | ||
295 | #define cpu_is_omap1610() 0 | ||
296 | #define cpu_is_omap1611() 0 | ||
297 | #define cpu_is_omap1621() 0 | ||
298 | #define cpu_is_omap1710() 0 | ||
299 | #define cpu_class_is_omap1() 0 | ||
300 | #define cpu_class_is_omap2() 1 | ||
301 | #endif | ||
302 | |||
303 | #if defined(CONFIG_ARCH_OMAP2) | ||
304 | # undef cpu_is_omap2420 | ||
305 | # undef cpu_is_omap2422 | ||
306 | # undef cpu_is_omap2423 | ||
307 | # undef cpu_is_omap2430 | ||
308 | # define cpu_is_omap2420() is_omap2420() | ||
309 | # define cpu_is_omap2422() is_omap2422() | ||
310 | # define cpu_is_omap2423() is_omap2423() | ||
311 | # define cpu_is_omap2430() is_omap2430() | ||
312 | #endif | ||
313 | |||
314 | #if defined(CONFIG_ARCH_OMAP3) | ||
315 | # undef cpu_is_omap3430 | ||
316 | # undef cpu_is_ti81xx | ||
317 | # undef cpu_is_ti816x | ||
318 | # undef cpu_is_ti814x | ||
319 | # undef soc_is_am35xx | ||
320 | # define cpu_is_omap3430() is_omap3430() | ||
321 | # undef cpu_is_omap3630 | ||
322 | # define cpu_is_omap3630() is_omap363x() | ||
323 | # define cpu_is_ti81xx() is_ti81xx() | ||
324 | # define cpu_is_ti816x() is_ti816x() | ||
325 | # define cpu_is_ti814x() is_ti814x() | ||
326 | # define soc_is_am35xx() is_am35xx() | ||
327 | #endif | ||
328 | |||
329 | # if defined(CONFIG_SOC_AM33XX) | ||
330 | # undef soc_is_am33xx | ||
331 | # undef soc_is_am335x | ||
332 | # define soc_is_am33xx() is_am33xx() | ||
333 | # define soc_is_am335x() is_am335x() | ||
334 | #endif | ||
335 | |||
336 | # if defined(CONFIG_ARCH_OMAP4) | ||
337 | # undef cpu_is_omap44xx | ||
338 | # undef cpu_is_omap443x | ||
339 | # undef cpu_is_omap446x | ||
340 | # undef cpu_is_omap447x | ||
341 | # define cpu_is_omap44xx() is_omap44xx() | ||
342 | # define cpu_is_omap443x() is_omap443x() | ||
343 | # define cpu_is_omap446x() is_omap446x() | ||
344 | # define cpu_is_omap447x() is_omap447x() | ||
345 | # endif | ||
346 | |||
347 | # if defined(CONFIG_SOC_OMAP5) | ||
348 | # undef soc_is_omap54xx | ||
349 | # undef soc_is_omap543x | ||
350 | # define soc_is_omap54xx() is_omap54xx() | ||
351 | # define soc_is_omap543x() is_omap543x() | ||
352 | #endif | ||
353 | |||
354 | /* Various silicon revisions for omap2 */ | ||
355 | #define OMAP242X_CLASS 0x24200024 | ||
356 | #define OMAP2420_REV_ES1_0 OMAP242X_CLASS | ||
357 | #define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (0x1 << 8)) | ||
358 | |||
359 | #define OMAP243X_CLASS 0x24300024 | ||
360 | #define OMAP2430_REV_ES1_0 OMAP243X_CLASS | ||
361 | |||
362 | #define OMAP343X_CLASS 0x34300034 | ||
363 | #define OMAP3430_REV_ES1_0 OMAP343X_CLASS | ||
364 | #define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (0x1 << 8)) | ||
365 | #define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (0x2 << 8)) | ||
366 | #define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (0x3 << 8)) | ||
367 | #define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (0x4 << 8)) | ||
368 | #define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (0x5 << 8)) | ||
369 | |||
370 | #define OMAP363X_CLASS 0x36300034 | ||
371 | #define OMAP3630_REV_ES1_0 OMAP363X_CLASS | ||
372 | #define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (0x1 << 8)) | ||
373 | #define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (0x2 << 8)) | ||
374 | |||
375 | #define TI816X_CLASS 0x81600034 | ||
376 | #define TI8168_REV_ES1_0 TI816X_CLASS | ||
377 | #define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8)) | ||
378 | |||
379 | #define TI814X_CLASS 0x81400034 | ||
380 | #define TI8148_REV_ES1_0 TI814X_CLASS | ||
381 | #define TI8148_REV_ES2_0 (TI814X_CLASS | (0x1 << 8)) | ||
382 | #define TI8148_REV_ES2_1 (TI814X_CLASS | (0x2 << 8)) | ||
383 | |||
384 | #define AM35XX_CLASS 0x35170034 | ||
385 | #define AM35XX_REV_ES1_0 AM35XX_CLASS | ||
386 | #define AM35XX_REV_ES1_1 (AM35XX_CLASS | (0x1 << 8)) | ||
387 | |||
388 | #define AM335X_CLASS 0x33500033 | ||
389 | #define AM335X_REV_ES1_0 AM335X_CLASS | ||
390 | |||
391 | #define OMAP443X_CLASS 0x44300044 | ||
392 | #define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) | ||
393 | #define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8)) | ||
394 | #define OMAP4430_REV_ES2_1 (OMAP443X_CLASS | (0x21 << 8)) | ||
395 | #define OMAP4430_REV_ES2_2 (OMAP443X_CLASS | (0x22 << 8)) | ||
396 | #define OMAP4430_REV_ES2_3 (OMAP443X_CLASS | (0x23 << 8)) | ||
397 | |||
398 | #define OMAP446X_CLASS 0x44600044 | ||
399 | #define OMAP4460_REV_ES1_0 (OMAP446X_CLASS | (0x10 << 8)) | ||
400 | #define OMAP4460_REV_ES1_1 (OMAP446X_CLASS | (0x11 << 8)) | ||
401 | |||
402 | #define OMAP447X_CLASS 0x44700044 | ||
403 | #define OMAP4470_REV_ES1_0 (OMAP447X_CLASS | (0x10 << 8)) | ||
404 | |||
405 | #define OMAP54XX_CLASS 0x54000054 | ||
406 | #define OMAP5430_REV_ES1_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8)) | ||
407 | #define OMAP5432_REV_ES1_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8)) | ||
408 | |||
409 | void omap2xxx_check_revision(void); | ||
410 | void omap3xxx_check_revision(void); | ||
411 | void omap4xxx_check_revision(void); | ||
412 | void omap5xxx_check_revision(void); | ||
413 | void omap3xxx_check_features(void); | ||
414 | void ti81xx_check_features(void); | ||
415 | void omap4xxx_check_features(void); | ||
416 | |||
417 | /* | ||
418 | * Runtime detection of OMAP3 features | ||
419 | * | ||
420 | * OMAP3_HAS_IO_CHAIN_CTRL: Some later members of the OMAP3 chip | ||
421 | * family have OS-level control over the I/O chain clock. This is | ||
422 | * to avoid a window during which wakeups could potentially be lost | ||
423 | * during powerdomain transitions. If this bit is set, it | ||
424 | * indicates that the chip does support OS-level control of this | ||
425 | * feature. | ||
426 | */ | ||
427 | extern u32 omap_features; | ||
428 | |||
429 | #define OMAP3_HAS_L2CACHE BIT(0) | ||
430 | #define OMAP3_HAS_IVA BIT(1) | ||
431 | #define OMAP3_HAS_SGX BIT(2) | ||
432 | #define OMAP3_HAS_NEON BIT(3) | ||
433 | #define OMAP3_HAS_ISP BIT(4) | ||
434 | #define OMAP3_HAS_192MHZ_CLK BIT(5) | ||
435 | #define OMAP3_HAS_IO_WAKEUP BIT(6) | ||
436 | #define OMAP3_HAS_SDRC BIT(7) | ||
437 | #define OMAP3_HAS_IO_CHAIN_CTRL BIT(8) | ||
438 | #define OMAP4_HAS_MPU_1GHZ BIT(9) | ||
439 | #define OMAP4_HAS_MPU_1_2GHZ BIT(10) | ||
440 | #define OMAP4_HAS_MPU_1_5GHZ BIT(11) | ||
441 | |||
442 | |||
443 | #define OMAP3_HAS_FEATURE(feat,flag) \ | ||
444 | static inline unsigned int omap3_has_ ##feat(void) \ | ||
445 | { \ | ||
446 | return omap_features & OMAP3_HAS_ ##flag; \ | ||
447 | } \ | ||
448 | |||
449 | OMAP3_HAS_FEATURE(l2cache, L2CACHE) | ||
450 | OMAP3_HAS_FEATURE(sgx, SGX) | ||
451 | OMAP3_HAS_FEATURE(iva, IVA) | ||
452 | OMAP3_HAS_FEATURE(neon, NEON) | ||
453 | OMAP3_HAS_FEATURE(isp, ISP) | ||
454 | OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) | ||
455 | OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP) | ||
456 | OMAP3_HAS_FEATURE(sdrc, SDRC) | ||
457 | OMAP3_HAS_FEATURE(io_chain_ctrl, IO_CHAIN_CTRL) | ||
458 | |||
459 | /* | ||
460 | * Runtime detection of OMAP4 features | ||
461 | */ | ||
462 | #define OMAP4_HAS_FEATURE(feat, flag) \ | ||
463 | static inline unsigned int omap4_has_ ##feat(void) \ | ||
464 | { \ | ||
465 | return omap_features & OMAP4_HAS_ ##flag; \ | ||
466 | } \ | ||
467 | |||
468 | OMAP4_HAS_FEATURE(mpu_1ghz, MPU_1GHZ) | ||
469 | OMAP4_HAS_FEATURE(mpu_1_2ghz, MPU_1_2GHZ) | ||
470 | OMAP4_HAS_FEATURE(mpu_1_5ghz, MPU_1_5GHZ) | ||
471 | |||
472 | #endif /* __ASSEMBLY__ */ | ||
473 | |||
diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c index 1536aa8fffcf..b0e77a407047 100644 --- a/arch/arm/mach-omap2/sr_device.c +++ b/arch/arm/mach-omap2/sr_device.c | |||
@@ -23,8 +23,8 @@ | |||
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | 25 | ||
26 | #include "soc.h" | ||
26 | #include "omap_device.h" | 27 | #include "omap_device.h" |
27 | |||
28 | #include "voltage.h" | 28 | #include "voltage.h" |
29 | #include "control.h" | 29 | #include "control.h" |
30 | #include "pm.h" | 30 | #include "pm.h" |
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c index 84d82280d291..4fe67129643d 100644 --- a/arch/arm/mach-omap2/usb-host.c +++ b/arch/arm/mach-omap2/usb-host.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
27 | 27 | ||
28 | #include <plat/usb.h> | 28 | #include <plat/usb.h> |
29 | #include "soc.h" | ||
29 | #include "omap_device.h" | 30 | #include "omap_device.h" |
30 | 31 | ||
31 | #include "mux.h" | 32 | #include "mux.h" |
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 24f300a34904..07f385a2900c 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c | |||
@@ -28,8 +28,7 @@ | |||
28 | #include <plat/usb.h> | 28 | #include <plat/usb.h> |
29 | #include "omap_device.h" | 29 | #include "omap_device.h" |
30 | 30 | ||
31 | #include "am35xx.h" | 31 | #include "soc.h" |
32 | |||
33 | #include "mux.h" | 32 | #include "mux.h" |
34 | 33 | ||
35 | static struct musb_hdrc_config musb_config = { | 34 | static struct musb_hdrc_config musb_config = { |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index b4dcd92a5845..49803cc18787 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -36,9 +36,11 @@ | |||
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
38 | 38 | ||
39 | #include <plat/cpu.h> | ||
40 | #include <plat-omap/dma-omap.h> | 39 | #include <plat-omap/dma-omap.h> |
41 | 40 | ||
41 | #include "../mach-omap1/soc.h" | ||
42 | #include "../mach-omap2/soc.h" | ||
43 | |||
42 | /* | 44 | /* |
43 | * MAX_LOGICAL_DMA_CH_COUNT: the maximum number of logical DMA | 45 | * MAX_LOGICAL_DMA_CH_COUNT: the maximum number of logical DMA |
44 | * channels that an instance of the SDMA IP block can support. Used | 46 | * channels that an instance of the SDMA IP block can support. Used |
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index 37597a6bbed2..be6deb7c12ec 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c | |||
@@ -32,7 +32,9 @@ | |||
32 | #include <linux/clk.h> | 32 | #include <linux/clk.h> |
33 | 33 | ||
34 | #include <mach/irqs.h> | 34 | #include <mach/irqs.h> |
35 | #include <plat/cpu.h> | 35 | |
36 | #include "../mach-omap1/soc.h" | ||
37 | #include "../mach-omap2/soc.h" | ||
36 | 38 | ||
37 | #include "i2c.h" | 39 | #include "i2c.h" |
38 | 40 | ||
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index bfd9c5f5ee14..ba542ec8d513 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/plat-omap/include/mach/cpu.h | ||
3 | * | ||
4 | * OMAP cpu type detection | 2 | * OMAP cpu type detection |
5 | * | 3 | * |
6 | * Copyright (C) 2004, 2008 Nokia Corporation | 4 | * Copyright (C) 2004, 2008 Nokia Corporation |
@@ -30,564 +28,12 @@ | |||
30 | #ifndef __ASM_ARCH_OMAP_CPU_H | 28 | #ifndef __ASM_ARCH_OMAP_CPU_H |
31 | #define __ASM_ARCH_OMAP_CPU_H | 29 | #define __ASM_ARCH_OMAP_CPU_H |
32 | 30 | ||
33 | #ifndef __ASSEMBLY__ | 31 | #ifdef CONFIG_ARCH_OMAP1 |
34 | 32 | #include "../../mach-omap1/soc.h" | |
35 | #include <linux/bitops.h> | ||
36 | |||
37 | /* | ||
38 | * Test if multicore OMAP support is needed | ||
39 | */ | ||
40 | #undef MULTI_OMAP1 | ||
41 | #undef MULTI_OMAP2 | ||
42 | #undef OMAP_NAME | ||
43 | |||
44 | #ifdef CONFIG_ARCH_OMAP730 | ||
45 | # ifdef OMAP_NAME | ||
46 | # undef MULTI_OMAP1 | ||
47 | # define MULTI_OMAP1 | ||
48 | # else | ||
49 | # define OMAP_NAME omap730 | ||
50 | # endif | ||
51 | #endif | ||
52 | #ifdef CONFIG_ARCH_OMAP850 | ||
53 | # ifdef OMAP_NAME | ||
54 | # undef MULTI_OMAP1 | ||
55 | # define MULTI_OMAP1 | ||
56 | # else | ||
57 | # define OMAP_NAME omap850 | ||
58 | # endif | ||
59 | #endif | ||
60 | #ifdef CONFIG_ARCH_OMAP15XX | ||
61 | # ifdef OMAP_NAME | ||
62 | # undef MULTI_OMAP1 | ||
63 | # define MULTI_OMAP1 | ||
64 | # else | ||
65 | # define OMAP_NAME omap1510 | ||
66 | # endif | ||
67 | #endif | ||
68 | #ifdef CONFIG_ARCH_OMAP16XX | ||
69 | # ifdef OMAP_NAME | ||
70 | # undef MULTI_OMAP1 | ||
71 | # define MULTI_OMAP1 | ||
72 | # else | ||
73 | # define OMAP_NAME omap16xx | ||
74 | # endif | ||
75 | #endif | ||
76 | #ifdef CONFIG_ARCH_OMAP2PLUS | ||
77 | # if (defined(OMAP_NAME) || defined(MULTI_OMAP1)) | ||
78 | # error "OMAP1 and OMAP2PLUS can't be selected at the same time" | ||
79 | # endif | ||
80 | #endif | ||
81 | #ifdef CONFIG_SOC_OMAP2420 | ||
82 | # ifdef OMAP_NAME | ||
83 | # undef MULTI_OMAP2 | ||
84 | # define MULTI_OMAP2 | ||
85 | # else | ||
86 | # define OMAP_NAME omap2420 | ||
87 | # endif | ||
88 | #endif | ||
89 | #ifdef CONFIG_SOC_OMAP2430 | ||
90 | # ifdef OMAP_NAME | ||
91 | # undef MULTI_OMAP2 | ||
92 | # define MULTI_OMAP2 | ||
93 | # else | ||
94 | # define OMAP_NAME omap2430 | ||
95 | # endif | ||
96 | #endif | ||
97 | #ifdef CONFIG_ARCH_OMAP3 | ||
98 | # ifdef OMAP_NAME | ||
99 | # undef MULTI_OMAP2 | ||
100 | # define MULTI_OMAP2 | ||
101 | # else | ||
102 | # define OMAP_NAME omap3 | ||
103 | # endif | ||
104 | #endif | ||
105 | #ifdef CONFIG_ARCH_OMAP4 | ||
106 | # ifdef OMAP_NAME | ||
107 | # undef MULTI_OMAP2 | ||
108 | # define MULTI_OMAP2 | ||
109 | # else | ||
110 | # define OMAP_NAME omap4 | ||
111 | # endif | ||
112 | #endif | ||
113 | |||
114 | #ifdef CONFIG_SOC_OMAP5 | ||
115 | # ifdef OMAP_NAME | ||
116 | # undef MULTI_OMAP2 | ||
117 | # define MULTI_OMAP2 | ||
118 | # else | ||
119 | # define OMAP_NAME omap5 | ||
120 | # endif | ||
121 | #endif | ||
122 | |||
123 | #ifdef CONFIG_SOC_AM33XX | ||
124 | # ifdef OMAP_NAME | ||
125 | # undef MULTI_OMAP2 | ||
126 | # define MULTI_OMAP2 | ||
127 | # else | ||
128 | # define OMAP_NAME am33xx | ||
129 | # endif | ||
130 | #endif | 33 | #endif |
131 | 34 | ||
132 | /* | 35 | #ifdef CONFIG_ARCH_OMAP2PLUS |
133 | * Omap device type i.e. EMU/HS/TST/GP/BAD | 36 | #include "../../mach-omap2/soc.h" |
134 | */ | ||
135 | #define OMAP2_DEVICE_TYPE_TEST 0 | ||
136 | #define OMAP2_DEVICE_TYPE_EMU 1 | ||
137 | #define OMAP2_DEVICE_TYPE_SEC 2 | ||
138 | #define OMAP2_DEVICE_TYPE_GP 3 | ||
139 | #define OMAP2_DEVICE_TYPE_BAD 4 | ||
140 | |||
141 | int omap_type(void); | ||
142 | |||
143 | /* | ||
144 | * omap_rev bits: | ||
145 | * CPU id bits (0730, 1510, 1710, 2422...) [31:16] | ||
146 | * CPU revision (See _REV_ defined in cpu.h) [15:08] | ||
147 | * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00] | ||
148 | */ | ||
149 | unsigned int omap_rev(void); | ||
150 | |||
151 | /* | ||
152 | * Get the CPU revision for OMAP devices | ||
153 | */ | ||
154 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) | ||
155 | |||
156 | /* | ||
157 | * Macros to group OMAP into cpu classes. | ||
158 | * These can be used in most places. | ||
159 | * cpu_is_omap7xx(): True for OMAP730, OMAP850 | ||
160 | * cpu_is_omap15xx(): True for OMAP1510, OMAP5910 and OMAP310 | ||
161 | * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710 | ||
162 | * cpu_is_omap24xx(): True for OMAP2420, OMAP2422, OMAP2423, OMAP2430 | ||
163 | * cpu_is_omap242x(): True for OMAP2420, OMAP2422, OMAP2423 | ||
164 | * cpu_is_omap243x(): True for OMAP2430 | ||
165 | * cpu_is_omap343x(): True for OMAP3430 | ||
166 | * cpu_is_omap443x(): True for OMAP4430 | ||
167 | * cpu_is_omap446x(): True for OMAP4460 | ||
168 | * cpu_is_omap447x(): True for OMAP4470 | ||
169 | * soc_is_omap543x(): True for OMAP5430, OMAP5432 | ||
170 | */ | ||
171 | #define GET_OMAP_CLASS (omap_rev() & 0xff) | ||
172 | |||
173 | #define IS_OMAP_CLASS(class, id) \ | ||
174 | static inline int is_omap ##class (void) \ | ||
175 | { \ | ||
176 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ | ||
177 | } | ||
178 | |||
179 | #define GET_AM_CLASS ((omap_rev() >> 24) & 0xff) | ||
180 | |||
181 | #define IS_AM_CLASS(class, id) \ | ||
182 | static inline int is_am ##class (void) \ | ||
183 | { \ | ||
184 | return (GET_AM_CLASS == (id)) ? 1 : 0; \ | ||
185 | } | ||
186 | |||
187 | #define GET_TI_CLASS ((omap_rev() >> 24) & 0xff) | ||
188 | |||
189 | #define IS_TI_CLASS(class, id) \ | ||
190 | static inline int is_ti ##class (void) \ | ||
191 | { \ | ||
192 | return (GET_TI_CLASS == (id)) ? 1 : 0; \ | ||
193 | } | ||
194 | |||
195 | #define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff) | ||
196 | |||
197 | #define IS_OMAP_SUBCLASS(subclass, id) \ | ||
198 | static inline int is_omap ##subclass (void) \ | ||
199 | { \ | ||
200 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | ||
201 | } | ||
202 | |||
203 | #define IS_TI_SUBCLASS(subclass, id) \ | ||
204 | static inline int is_ti ##subclass (void) \ | ||
205 | { \ | ||
206 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | ||
207 | } | ||
208 | |||
209 | #define IS_AM_SUBCLASS(subclass, id) \ | ||
210 | static inline int is_am ##subclass (void) \ | ||
211 | { \ | ||
212 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | ||
213 | } | ||
214 | |||
215 | IS_OMAP_CLASS(7xx, 0x07) | ||
216 | IS_OMAP_CLASS(15xx, 0x15) | ||
217 | IS_OMAP_CLASS(16xx, 0x16) | ||
218 | IS_OMAP_CLASS(24xx, 0x24) | ||
219 | IS_OMAP_CLASS(34xx, 0x34) | ||
220 | IS_OMAP_CLASS(44xx, 0x44) | ||
221 | IS_AM_CLASS(35xx, 0x35) | ||
222 | IS_OMAP_CLASS(54xx, 0x54) | ||
223 | IS_AM_CLASS(33xx, 0x33) | ||
224 | |||
225 | IS_TI_CLASS(81xx, 0x81) | ||
226 | |||
227 | IS_OMAP_SUBCLASS(242x, 0x242) | ||
228 | IS_OMAP_SUBCLASS(243x, 0x243) | ||
229 | IS_OMAP_SUBCLASS(343x, 0x343) | ||
230 | IS_OMAP_SUBCLASS(363x, 0x363) | ||
231 | IS_OMAP_SUBCLASS(443x, 0x443) | ||
232 | IS_OMAP_SUBCLASS(446x, 0x446) | ||
233 | IS_OMAP_SUBCLASS(447x, 0x447) | ||
234 | IS_OMAP_SUBCLASS(543x, 0x543) | ||
235 | |||
236 | IS_TI_SUBCLASS(816x, 0x816) | ||
237 | IS_TI_SUBCLASS(814x, 0x814) | ||
238 | IS_AM_SUBCLASS(335x, 0x335) | ||
239 | |||
240 | #define cpu_is_omap7xx() 0 | ||
241 | #define cpu_is_omap15xx() 0 | ||
242 | #define cpu_is_omap16xx() 0 | ||
243 | #define cpu_is_omap24xx() 0 | ||
244 | #define cpu_is_omap242x() 0 | ||
245 | #define cpu_is_omap243x() 0 | ||
246 | #define cpu_is_omap34xx() 0 | ||
247 | #define cpu_is_omap343x() 0 | ||
248 | #define cpu_is_ti81xx() 0 | ||
249 | #define cpu_is_ti816x() 0 | ||
250 | #define cpu_is_ti814x() 0 | ||
251 | #define soc_is_am35xx() 0 | ||
252 | #define soc_is_am33xx() 0 | ||
253 | #define soc_is_am335x() 0 | ||
254 | #define cpu_is_omap44xx() 0 | ||
255 | #define cpu_is_omap443x() 0 | ||
256 | #define cpu_is_omap446x() 0 | ||
257 | #define cpu_is_omap447x() 0 | ||
258 | #define soc_is_omap54xx() 0 | ||
259 | #define soc_is_omap543x() 0 | ||
260 | |||
261 | #if defined(MULTI_OMAP1) | ||
262 | # if defined(CONFIG_ARCH_OMAP730) | ||
263 | # undef cpu_is_omap7xx | ||
264 | # define cpu_is_omap7xx() is_omap7xx() | ||
265 | # endif | ||
266 | # if defined(CONFIG_ARCH_OMAP850) | ||
267 | # undef cpu_is_omap7xx | ||
268 | # define cpu_is_omap7xx() is_omap7xx() | ||
269 | # endif | ||
270 | # if defined(CONFIG_ARCH_OMAP15XX) | ||
271 | # undef cpu_is_omap15xx | ||
272 | # define cpu_is_omap15xx() is_omap15xx() | ||
273 | # endif | ||
274 | # if defined(CONFIG_ARCH_OMAP16XX) | ||
275 | # undef cpu_is_omap16xx | ||
276 | # define cpu_is_omap16xx() is_omap16xx() | ||
277 | # endif | ||
278 | #else | ||
279 | # if defined(CONFIG_ARCH_OMAP730) | ||
280 | # undef cpu_is_omap7xx | ||
281 | # define cpu_is_omap7xx() 1 | ||
282 | # endif | ||
283 | # if defined(CONFIG_ARCH_OMAP850) | ||
284 | # undef cpu_is_omap7xx | ||
285 | # define cpu_is_omap7xx() 1 | ||
286 | # endif | ||
287 | # if defined(CONFIG_ARCH_OMAP15XX) | ||
288 | # undef cpu_is_omap15xx | ||
289 | # define cpu_is_omap15xx() 1 | ||
290 | # endif | ||
291 | # if defined(CONFIG_ARCH_OMAP16XX) | ||
292 | # undef cpu_is_omap16xx | ||
293 | # define cpu_is_omap16xx() 1 | ||
294 | # endif | ||
295 | #endif | ||
296 | |||
297 | #if defined(MULTI_OMAP2) | ||
298 | # if defined(CONFIG_ARCH_OMAP2) | ||
299 | # undef cpu_is_omap24xx | ||
300 | # define cpu_is_omap24xx() is_omap24xx() | ||
301 | # endif | ||
302 | # if defined (CONFIG_SOC_OMAP2420) | ||
303 | # undef cpu_is_omap242x | ||
304 | # define cpu_is_omap242x() is_omap242x() | ||
305 | # endif | ||
306 | # if defined (CONFIG_SOC_OMAP2430) | ||
307 | # undef cpu_is_omap243x | ||
308 | # define cpu_is_omap243x() is_omap243x() | ||
309 | # endif | ||
310 | # if defined(CONFIG_ARCH_OMAP3) | ||
311 | # undef cpu_is_omap34xx | ||
312 | # undef cpu_is_omap343x | ||
313 | # define cpu_is_omap34xx() is_omap34xx() | ||
314 | # define cpu_is_omap343x() is_omap343x() | ||
315 | # endif | ||
316 | #else | ||
317 | # if defined(CONFIG_ARCH_OMAP2) | ||
318 | # undef cpu_is_omap24xx | ||
319 | # define cpu_is_omap24xx() 1 | ||
320 | # endif | ||
321 | # if defined(CONFIG_SOC_OMAP2420) | ||
322 | # undef cpu_is_omap242x | ||
323 | # define cpu_is_omap242x() 1 | ||
324 | # endif | ||
325 | # if defined(CONFIG_SOC_OMAP2430) | ||
326 | # undef cpu_is_omap243x | ||
327 | # define cpu_is_omap243x() 1 | ||
328 | # endif | ||
329 | # if defined(CONFIG_ARCH_OMAP3) | ||
330 | # undef cpu_is_omap34xx | ||
331 | # define cpu_is_omap34xx() 1 | ||
332 | # endif | ||
333 | # if defined(CONFIG_SOC_OMAP3430) | ||
334 | # undef cpu_is_omap343x | ||
335 | # define cpu_is_omap343x() 1 | ||
336 | # endif | ||
337 | #endif | ||
338 | |||
339 | /* | ||
340 | * Macros to detect individual cpu types. | ||
341 | * These are only rarely needed. | ||
342 | * cpu_is_omap310(): True for OMAP310 | ||
343 | * cpu_is_omap1510(): True for OMAP1510 | ||
344 | * cpu_is_omap1610(): True for OMAP1610 | ||
345 | * cpu_is_omap1611(): True for OMAP1611 | ||
346 | * cpu_is_omap5912(): True for OMAP5912 | ||
347 | * cpu_is_omap1621(): True for OMAP1621 | ||
348 | * cpu_is_omap1710(): True for OMAP1710 | ||
349 | * cpu_is_omap2420(): True for OMAP2420 | ||
350 | * cpu_is_omap2422(): True for OMAP2422 | ||
351 | * cpu_is_omap2423(): True for OMAP2423 | ||
352 | * cpu_is_omap2430(): True for OMAP2430 | ||
353 | * cpu_is_omap3430(): True for OMAP3430 | ||
354 | */ | ||
355 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) | ||
356 | |||
357 | #define IS_OMAP_TYPE(type, id) \ | ||
358 | static inline int is_omap ##type (void) \ | ||
359 | { \ | ||
360 | return (GET_OMAP_TYPE == (id)) ? 1 : 0; \ | ||
361 | } | ||
362 | |||
363 | IS_OMAP_TYPE(310, 0x0310) | ||
364 | IS_OMAP_TYPE(1510, 0x1510) | ||
365 | IS_OMAP_TYPE(1610, 0x1610) | ||
366 | IS_OMAP_TYPE(1611, 0x1611) | ||
367 | IS_OMAP_TYPE(5912, 0x1611) | ||
368 | IS_OMAP_TYPE(1621, 0x1621) | ||
369 | IS_OMAP_TYPE(1710, 0x1710) | ||
370 | IS_OMAP_TYPE(2420, 0x2420) | ||
371 | IS_OMAP_TYPE(2422, 0x2422) | ||
372 | IS_OMAP_TYPE(2423, 0x2423) | ||
373 | IS_OMAP_TYPE(2430, 0x2430) | ||
374 | IS_OMAP_TYPE(3430, 0x3430) | ||
375 | |||
376 | #define cpu_is_omap310() 0 | ||
377 | #define cpu_is_omap1510() 0 | ||
378 | #define cpu_is_omap1610() 0 | ||
379 | #define cpu_is_omap5912() 0 | ||
380 | #define cpu_is_omap1611() 0 | ||
381 | #define cpu_is_omap1621() 0 | ||
382 | #define cpu_is_omap1710() 0 | ||
383 | #define cpu_is_omap2420() 0 | ||
384 | #define cpu_is_omap2422() 0 | ||
385 | #define cpu_is_omap2423() 0 | ||
386 | #define cpu_is_omap2430() 0 | ||
387 | #define cpu_is_omap3430() 0 | ||
388 | #define cpu_is_omap3630() 0 | ||
389 | #define soc_is_omap5430() 0 | ||
390 | |||
391 | /* | ||
392 | * Whether we have MULTI_OMAP1 or not, we still need to distinguish | ||
393 | * between 310 vs. 1510 and 1611B/5912 vs. 1710. | ||
394 | */ | ||
395 | |||
396 | #if defined(CONFIG_ARCH_OMAP15XX) | ||
397 | # undef cpu_is_omap310 | ||
398 | # undef cpu_is_omap1510 | ||
399 | # define cpu_is_omap310() is_omap310() | ||
400 | # define cpu_is_omap1510() is_omap1510() | ||
401 | #endif | ||
402 | |||
403 | #if defined(CONFIG_ARCH_OMAP16XX) | ||
404 | # undef cpu_is_omap1610 | ||
405 | # undef cpu_is_omap1611 | ||
406 | # undef cpu_is_omap5912 | ||
407 | # undef cpu_is_omap1621 | ||
408 | # undef cpu_is_omap1710 | ||
409 | # define cpu_is_omap1610() is_omap1610() | ||
410 | # define cpu_is_omap1611() is_omap1611() | ||
411 | # define cpu_is_omap5912() is_omap5912() | ||
412 | # define cpu_is_omap1621() is_omap1621() | ||
413 | # define cpu_is_omap1710() is_omap1710() | ||
414 | #endif | ||
415 | |||
416 | #if defined(CONFIG_ARCH_OMAP2) | ||
417 | # undef cpu_is_omap2420 | ||
418 | # undef cpu_is_omap2422 | ||
419 | # undef cpu_is_omap2423 | ||
420 | # undef cpu_is_omap2430 | ||
421 | # define cpu_is_omap2420() is_omap2420() | ||
422 | # define cpu_is_omap2422() is_omap2422() | ||
423 | # define cpu_is_omap2423() is_omap2423() | ||
424 | # define cpu_is_omap2430() is_omap2430() | ||
425 | #endif | ||
426 | |||
427 | #if defined(CONFIG_ARCH_OMAP3) | ||
428 | # undef cpu_is_omap3430 | ||
429 | # undef cpu_is_ti81xx | ||
430 | # undef cpu_is_ti816x | ||
431 | # undef cpu_is_ti814x | ||
432 | # undef soc_is_am35xx | ||
433 | # define cpu_is_omap3430() is_omap3430() | ||
434 | # undef cpu_is_omap3630 | ||
435 | # define cpu_is_omap3630() is_omap363x() | ||
436 | # define cpu_is_ti81xx() is_ti81xx() | ||
437 | # define cpu_is_ti816x() is_ti816x() | ||
438 | # define cpu_is_ti814x() is_ti814x() | ||
439 | # define soc_is_am35xx() is_am35xx() | ||
440 | #endif | ||
441 | |||
442 | # if defined(CONFIG_SOC_AM33XX) | ||
443 | # undef soc_is_am33xx | ||
444 | # undef soc_is_am335x | ||
445 | # define soc_is_am33xx() is_am33xx() | ||
446 | # define soc_is_am335x() is_am335x() | ||
447 | #endif | ||
448 | |||
449 | # if defined(CONFIG_ARCH_OMAP4) | ||
450 | # undef cpu_is_omap44xx | ||
451 | # undef cpu_is_omap443x | ||
452 | # undef cpu_is_omap446x | ||
453 | # undef cpu_is_omap447x | ||
454 | # define cpu_is_omap44xx() is_omap44xx() | ||
455 | # define cpu_is_omap443x() is_omap443x() | ||
456 | # define cpu_is_omap446x() is_omap446x() | ||
457 | # define cpu_is_omap447x() is_omap447x() | ||
458 | # endif | ||
459 | |||
460 | # if defined(CONFIG_SOC_OMAP5) | ||
461 | # undef soc_is_omap54xx | ||
462 | # undef soc_is_omap543x | ||
463 | # define soc_is_omap54xx() is_omap54xx() | ||
464 | # define soc_is_omap543x() is_omap543x() | ||
465 | #endif | 37 | #endif |
466 | 38 | ||
467 | /* Macros to detect if we have OMAP1 or OMAP2 */ | ||
468 | #define cpu_class_is_omap1() (cpu_is_omap7xx() || cpu_is_omap15xx() || \ | ||
469 | cpu_is_omap16xx()) | ||
470 | #define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \ | ||
471 | cpu_is_omap44xx() || soc_is_omap54xx() || \ | ||
472 | soc_is_am33xx()) | ||
473 | |||
474 | /* Various silicon revisions for omap2 */ | ||
475 | #define OMAP242X_CLASS 0x24200024 | ||
476 | #define OMAP2420_REV_ES1_0 OMAP242X_CLASS | ||
477 | #define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (0x1 << 8)) | ||
478 | |||
479 | #define OMAP243X_CLASS 0x24300024 | ||
480 | #define OMAP2430_REV_ES1_0 OMAP243X_CLASS | ||
481 | |||
482 | #define OMAP343X_CLASS 0x34300034 | ||
483 | #define OMAP3430_REV_ES1_0 OMAP343X_CLASS | ||
484 | #define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (0x1 << 8)) | ||
485 | #define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (0x2 << 8)) | ||
486 | #define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (0x3 << 8)) | ||
487 | #define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (0x4 << 8)) | ||
488 | #define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (0x5 << 8)) | ||
489 | |||
490 | #define OMAP363X_CLASS 0x36300034 | ||
491 | #define OMAP3630_REV_ES1_0 OMAP363X_CLASS | ||
492 | #define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (0x1 << 8)) | ||
493 | #define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (0x2 << 8)) | ||
494 | |||
495 | #define TI816X_CLASS 0x81600034 | ||
496 | #define TI8168_REV_ES1_0 TI816X_CLASS | ||
497 | #define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8)) | ||
498 | |||
499 | #define TI814X_CLASS 0x81400034 | ||
500 | #define TI8148_REV_ES1_0 TI814X_CLASS | ||
501 | #define TI8148_REV_ES2_0 (TI814X_CLASS | (0x1 << 8)) | ||
502 | #define TI8148_REV_ES2_1 (TI814X_CLASS | (0x2 << 8)) | ||
503 | |||
504 | #define AM35XX_CLASS 0x35170034 | ||
505 | #define AM35XX_REV_ES1_0 AM35XX_CLASS | ||
506 | #define AM35XX_REV_ES1_1 (AM35XX_CLASS | (0x1 << 8)) | ||
507 | |||
508 | #define AM335X_CLASS 0x33500033 | ||
509 | #define AM335X_REV_ES1_0 AM335X_CLASS | ||
510 | |||
511 | #define OMAP443X_CLASS 0x44300044 | ||
512 | #define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) | ||
513 | #define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8)) | ||
514 | #define OMAP4430_REV_ES2_1 (OMAP443X_CLASS | (0x21 << 8)) | ||
515 | #define OMAP4430_REV_ES2_2 (OMAP443X_CLASS | (0x22 << 8)) | ||
516 | #define OMAP4430_REV_ES2_3 (OMAP443X_CLASS | (0x23 << 8)) | ||
517 | |||
518 | #define OMAP446X_CLASS 0x44600044 | ||
519 | #define OMAP4460_REV_ES1_0 (OMAP446X_CLASS | (0x10 << 8)) | ||
520 | #define OMAP4460_REV_ES1_1 (OMAP446X_CLASS | (0x11 << 8)) | ||
521 | |||
522 | #define OMAP447X_CLASS 0x44700044 | ||
523 | #define OMAP4470_REV_ES1_0 (OMAP447X_CLASS | (0x10 << 8)) | ||
524 | |||
525 | #define OMAP54XX_CLASS 0x54000054 | ||
526 | #define OMAP5430_REV_ES1_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8)) | ||
527 | #define OMAP5432_REV_ES1_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8)) | ||
528 | |||
529 | void omap2xxx_check_revision(void); | ||
530 | void omap3xxx_check_revision(void); | ||
531 | void omap4xxx_check_revision(void); | ||
532 | void omap5xxx_check_revision(void); | ||
533 | void omap3xxx_check_features(void); | ||
534 | void ti81xx_check_features(void); | ||
535 | void omap4xxx_check_features(void); | ||
536 | |||
537 | /* | ||
538 | * Runtime detection of OMAP3 features | ||
539 | * | ||
540 | * OMAP3_HAS_IO_CHAIN_CTRL: Some later members of the OMAP3 chip | ||
541 | * family have OS-level control over the I/O chain clock. This is | ||
542 | * to avoid a window during which wakeups could potentially be lost | ||
543 | * during powerdomain transitions. If this bit is set, it | ||
544 | * indicates that the chip does support OS-level control of this | ||
545 | * feature. | ||
546 | */ | ||
547 | extern u32 omap_features; | ||
548 | |||
549 | #define OMAP3_HAS_L2CACHE BIT(0) | ||
550 | #define OMAP3_HAS_IVA BIT(1) | ||
551 | #define OMAP3_HAS_SGX BIT(2) | ||
552 | #define OMAP3_HAS_NEON BIT(3) | ||
553 | #define OMAP3_HAS_ISP BIT(4) | ||
554 | #define OMAP3_HAS_192MHZ_CLK BIT(5) | ||
555 | #define OMAP3_HAS_IO_WAKEUP BIT(6) | ||
556 | #define OMAP3_HAS_SDRC BIT(7) | ||
557 | #define OMAP3_HAS_IO_CHAIN_CTRL BIT(8) | ||
558 | #define OMAP4_HAS_MPU_1GHZ BIT(9) | ||
559 | #define OMAP4_HAS_MPU_1_2GHZ BIT(10) | ||
560 | #define OMAP4_HAS_MPU_1_5GHZ BIT(11) | ||
561 | |||
562 | |||
563 | #define OMAP3_HAS_FEATURE(feat,flag) \ | ||
564 | static inline unsigned int omap3_has_ ##feat(void) \ | ||
565 | { \ | ||
566 | return omap_features & OMAP3_HAS_ ##flag; \ | ||
567 | } \ | ||
568 | |||
569 | OMAP3_HAS_FEATURE(l2cache, L2CACHE) | ||
570 | OMAP3_HAS_FEATURE(sgx, SGX) | ||
571 | OMAP3_HAS_FEATURE(iva, IVA) | ||
572 | OMAP3_HAS_FEATURE(neon, NEON) | ||
573 | OMAP3_HAS_FEATURE(isp, ISP) | ||
574 | OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) | ||
575 | OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP) | ||
576 | OMAP3_HAS_FEATURE(sdrc, SDRC) | ||
577 | OMAP3_HAS_FEATURE(io_chain_ctrl, IO_CHAIN_CTRL) | ||
578 | |||
579 | /* | ||
580 | * Runtime detection of OMAP4 features | ||
581 | */ | ||
582 | #define OMAP4_HAS_FEATURE(feat, flag) \ | ||
583 | static inline unsigned int omap4_has_ ##feat(void) \ | ||
584 | { \ | ||
585 | return omap_features & OMAP4_HAS_ ##flag; \ | ||
586 | } \ | ||
587 | |||
588 | OMAP4_HAS_FEATURE(mpu_1ghz, MPU_1GHZ) | ||
589 | OMAP4_HAS_FEATURE(mpu_1_2ghz, MPU_1_2GHZ) | ||
590 | OMAP4_HAS_FEATURE(mpu_1_5ghz, MPU_1_5GHZ) | ||
591 | |||
592 | #endif /* __ASSEMBLY__ */ | ||
593 | #endif | 39 | #endif |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index dc2d800d9598..70dcc225157f 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -25,7 +25,8 @@ | |||
25 | 25 | ||
26 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
27 | 27 | ||
28 | #include <plat/cpu.h> | 28 | #include "../mach-omap1/soc.h" |
29 | #include "../mach-omap2/soc.h" | ||
29 | 30 | ||
30 | #include "sram.h" | 31 | #include "sram.h" |
31 | 32 | ||