aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-10-01 11:22:24 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-10-15 13:53:45 -0400
commit36d8b17b4364915615aff312ba20a1b90e22b963 (patch)
tree4dd7275b0384522a3e3cb919731c7d058ad46468
parent2c8086a5d073e8e72122a5b84febde236a39845b (diff)
[ARM] pxa: Make cpu_is_pxaXXX dependent on configuration symbols
Make the cpu_is_pxaXXX() macros define to zero when support for a particular CPU is disabled. This allows us to eliminate code for CPUs which aren't enabled. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--include/asm-arm/arch-pxa/hardware.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h
index fc20d72d4844..89df077a7e24 100644
--- a/include/asm-arm/arch-pxa/hardware.h
+++ b/include/asm-arm/arch-pxa/hardware.h
@@ -62,6 +62,7 @@
62 62
63#ifndef __ASSEMBLY__ 63#ifndef __ASSEMBLY__
64 64
65#ifdef CONFIG_PXA25x
65#define __cpu_is_pxa21x(id) \ 66#define __cpu_is_pxa21x(id) \
66 ({ \ 67 ({ \
67 unsigned int _id = (id) >> 4 & 0xf3f; \ 68 unsigned int _id = (id) >> 4 & 0xf3f; \
@@ -73,30 +74,50 @@
73 unsigned int _id = (id) >> 4 & 0xfff; \ 74 unsigned int _id = (id) >> 4 & 0xfff; \
74 _id == 0x2d0 || _id == 0x290; \ 75 _id == 0x2d0 || _id == 0x290; \
75 }) 76 })
77#else
78#define __cpu_is_pxa21x(id) (0)
79#define __cpu_is_pxa25x(id) (0)
80#endif
76 81
82#ifdef CONFIG_PXA27x
77#define __cpu_is_pxa27x(id) \ 83#define __cpu_is_pxa27x(id) \
78 ({ \ 84 ({ \
79 unsigned int _id = (id) >> 4 & 0xfff; \ 85 unsigned int _id = (id) >> 4 & 0xfff; \
80 _id == 0x411; \ 86 _id == 0x411; \
81 }) 87 })
88#else
89#define __cpu_is_pxa27x(id) (0)
90#endif
82 91
92#ifdef CONFIG_CPU_PXA300
83#define __cpu_is_pxa300(id) \ 93#define __cpu_is_pxa300(id) \
84 ({ \ 94 ({ \
85 unsigned int _id = (id) >> 4 & 0xfff; \ 95 unsigned int _id = (id) >> 4 & 0xfff; \
86 _id == 0x688; \ 96 _id == 0x688; \
87 }) 97 })
98#else
99#define __cpu_is_pxa300(id) (0)
100#endif
88 101
102#ifdef CONFIG_CPU_PXA310
89#define __cpu_is_pxa310(id) \ 103#define __cpu_is_pxa310(id) \
90 ({ \ 104 ({ \
91 unsigned int _id = (id) >> 4 & 0xfff; \ 105 unsigned int _id = (id) >> 4 & 0xfff; \
92 _id == 0x689; \ 106 _id == 0x689; \
93 }) 107 })
108#else
109#define __cpu_is_pxa310(id) (0)
110#endif
94 111
112#ifdef CONFIG_CPU_PXA320
95#define __cpu_is_pxa320(id) \ 113#define __cpu_is_pxa320(id) \
96 ({ \ 114 ({ \
97 unsigned int _id = (id) >> 4 & 0xfff; \ 115 unsigned int _id = (id) >> 4 & 0xfff; \
98 _id == 0x603 || _id == 0x682; \ 116 _id == 0x603 || _id == 0x682; \
99 }) 117 })
118#else
119#define __cpu_is_pxa320(id) (0)
120#endif
100 121
101#define cpu_is_pxa21x() \ 122#define cpu_is_pxa21x() \
102 ({ \ 123 ({ \