aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-02-15 12:27:24 -0500
committerTony Lindgren <tony@atomide.com>2010-02-15 12:27:24 -0500
commit1cf9d079637e1479842dad0b25f445b5ceec0bab (patch)
tree97f4f20583431781b60924bda1683e38c9a797a3 /arch/arm/plat-omap
parent78aee23f32447bff0ef8dd012d9b0eaf1e3a79a1 (diff)
omap: Move multi-omap ifdeffery into it's own header file
This way we can include it easily as needed also for .S files. Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h70
-rw-r--r--arch/arm/plat-omap/include/plat/multi.h94
2 files changed, 95 insertions, 69 deletions
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 995466d0432a..b80151c1ee61 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -31,6 +31,7 @@
31#define __ASM_ARCH_OMAP_CPU_H 31#define __ASM_ARCH_OMAP_CPU_H
32 32
33#include <linux/bitops.h> 33#include <linux/bitops.h>
34#include <plat/multi.h>
34 35
35/* 36/*
36 * Omap device type i.e. EMU/HS/TST/GP/BAD 37 * Omap device type i.e. EMU/HS/TST/GP/BAD
@@ -76,75 +77,6 @@ unsigned int omap_rev(void);
76#define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) 77#define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff)
77 78
78/* 79/*
79 * Test if multicore OMAP support is needed
80 */
81#undef MULTI_OMAP1
82#undef MULTI_OMAP2
83#undef OMAP_NAME
84
85#ifdef CONFIG_ARCH_OMAP730
86# ifdef OMAP_NAME
87# undef MULTI_OMAP1
88# define MULTI_OMAP1
89# else
90# define OMAP_NAME omap730
91# endif
92#endif
93#ifdef CONFIG_ARCH_OMAP850
94# ifdef OMAP_NAME
95# undef MULTI_OMAP1
96# define MULTI_OMAP1
97# else
98# define OMAP_NAME omap850
99# endif
100#endif
101#ifdef CONFIG_ARCH_OMAP15XX
102# ifdef OMAP_NAME
103# undef MULTI_OMAP1
104# define MULTI_OMAP1
105# else
106# define OMAP_NAME omap1510
107# endif
108#endif
109#ifdef CONFIG_ARCH_OMAP16XX
110# ifdef OMAP_NAME
111# undef MULTI_OMAP1
112# define MULTI_OMAP1
113# else
114# define OMAP_NAME omap16xx
115# endif
116#endif
117#if (defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3))
118# if (defined(OMAP_NAME) || defined(MULTI_OMAP1))
119# error "OMAP1 and OMAP2 can't be selected at the same time"
120# endif
121#endif
122#ifdef CONFIG_ARCH_OMAP2420
123# ifdef OMAP_NAME
124# undef MULTI_OMAP2
125# define MULTI_OMAP2
126# else
127# define OMAP_NAME omap2420
128# endif
129#endif
130#ifdef CONFIG_ARCH_OMAP2430
131# ifdef OMAP_NAME
132# undef MULTI_OMAP2
133# define MULTI_OMAP2
134# else
135# define OMAP_NAME omap2430
136# endif
137#endif
138#ifdef CONFIG_ARCH_OMAP3430
139# ifdef OMAP_NAME
140# undef MULTI_OMAP2
141# define MULTI_OMAP2
142# else
143# define OMAP_NAME omap3430
144# endif
145#endif
146
147/*
148 * Macros to group OMAP into cpu classes. 80 * Macros to group OMAP into cpu classes.
149 * These can be used in most places. 81 * These can be used in most places.
150 * cpu_is_omap7xx(): True for OMAP730, OMAP850 82 * cpu_is_omap7xx(): True for OMAP730, OMAP850
diff --git a/arch/arm/plat-omap/include/plat/multi.h b/arch/arm/plat-omap/include/plat/multi.h
new file mode 100644
index 000000000000..f235d32cd942
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/multi.h
@@ -0,0 +1,94 @@
1/*
2 * Support for compiling in multiple OMAP processors
3 *
4 * Copyright (C) 2010 Nokia Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 */
21
22#ifndef __PLAT_OMAP_MULTI_H
23#define __PLAT_OMAP_MULTI_H
24
25/*
26 * Test if multicore OMAP support is needed
27 */
28#undef MULTI_OMAP1
29#undef MULTI_OMAP2
30#undef OMAP_NAME
31
32#ifdef CONFIG_ARCH_OMAP730
33# ifdef OMAP_NAME
34# undef MULTI_OMAP1
35# define MULTI_OMAP1
36# else
37# define OMAP_NAME omap730
38# endif
39#endif
40#ifdef CONFIG_ARCH_OMAP850
41# ifdef OMAP_NAME
42# undef MULTI_OMAP1
43# define MULTI_OMAP1
44# else
45# define OMAP_NAME omap850
46# endif
47#endif
48#ifdef CONFIG_ARCH_OMAP15XX
49# ifdef OMAP_NAME
50# undef MULTI_OMAP1
51# define MULTI_OMAP1
52# else
53# define OMAP_NAME omap1510
54# endif
55#endif
56#ifdef CONFIG_ARCH_OMAP16XX
57# ifdef OMAP_NAME
58# undef MULTI_OMAP1
59# define MULTI_OMAP1
60# else
61# define OMAP_NAME omap16xx
62# endif
63#endif
64#if (defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3))
65# if (defined(OMAP_NAME) || defined(MULTI_OMAP1))
66# error "OMAP1 and OMAP2 can't be selected at the same time"
67# endif
68#endif
69#ifdef CONFIG_ARCH_OMAP2420
70# ifdef OMAP_NAME
71# undef MULTI_OMAP2
72# define MULTI_OMAP2
73# else
74# define OMAP_NAME omap2420
75# endif
76#endif
77#ifdef CONFIG_ARCH_OMAP2430
78# ifdef OMAP_NAME
79# undef MULTI_OMAP2
80# define MULTI_OMAP2
81# else
82# define OMAP_NAME omap2430
83# endif
84#endif
85#ifdef CONFIG_ARCH_OMAP3430
86# ifdef OMAP_NAME
87# undef MULTI_OMAP2
88# define MULTI_OMAP2
89# else
90# define OMAP_NAME omap3430
91# endif
92#endif
93
94#endif /* __PLAT_OMAP_MULTI_H */