aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Brown <davidb@codeaurora.org>2011-01-04 20:02:48 -0500
committerDavid Brown <davidb@codeaurora.org>2011-01-21 18:27:49 -0500
commit87fa28e972c223f69c1315a1b2ddb2a11d33ad0e (patch)
treed97b3b6e152dc35269414f96a73996bbf31bd102
parentc56eb8fb6dccb83d9fe62fd4dc00c834de9bc470 (diff)
msm: Add CPU queries
Create runtime queries to distinguish the various MSM targets. Although these would probably be better named soc_is..., use cpu_is... to match convention in the rest of the kernel. Hard code the tests based on config options for now. When runtime device detection is implemented, these can be made dynamic. Signed-off-by: David Brown <davidb@codeaurora.org>
-rw-r--r--arch/arm/mach-msm/include/mach/cpu.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/include/mach/cpu.h b/arch/arm/mach-msm/include/mach/cpu.h
new file mode 100644
index 000000000000..e1ba9db37144
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/cpu.h
@@ -0,0 +1,48 @@
1/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17
18#ifndef __ARCH_ARM_MACH_MSM_CPU_H__
19#define __ARCH_ARM_MACH_MSM_CPU_H__
20
21/* TODO: For now, only one CPU can be compiled at a time. */
22
23#define cpu_is_msm7x01() 0
24#define cpu_is_msm7x30() 0
25#define cpu_is_qsd8x50() 0
26#define cpu_is_msm8x60() 0
27
28#ifdef CONFIG_ARCH_MSM7X00A
29# undef cpu_is_msm7x01
30# define cpu_is_msm7x01() 1
31#endif
32
33#ifdef CONFIG_ARCH_MSM7X30
34# undef cpu_is_msm7x30
35# define cpu_is_msm7x30() 1
36#endif
37
38#ifdef CONFIG_ARCH_QSD8X50
39# undef cpu_is_qsd8x50
40# define cpu_is_qsd8x50() 1
41#endif
42
43#ifdef CONFIG_ARCH_MSM8X60
44# undef cpu_is_msm8x60
45# define cpu_is_msm8x60() 1
46#endif
47
48#endif