aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/include/mach/hardware.h
diff options
context:
space:
mode:
authorEric Miao <eric.miao@canonical.com>2010-09-07 15:10:14 +0800
committerEric Miao <eric.y.miao@gmail.com>2010-09-25 09:47:03 +0800
commitcfc6a554d7a364997a43964b4b1290487f890447 (patch)
treef9e780f3ec8b791f98085ee82832e11a1d0ba0a4 /arch/arm/mach-pxa/include/mach/hardware.h
parentARM: pxa168: fix corrected reset vector (diff)
downloadlinux-dev-cfc6a554d7a364997a43964b4b1290487f890447.tar.xz
linux-dev-cfc6a554d7a364997a43964b4b1290487f890447.zip
ARM: pxa: fix cpu_is_pxa*() not expanding to zero when not configured
When CONFIG_PXA3xx is not selected, cpu_is_pxa3xx() doesn't expand to zero, which in some places doesn't result in correct optimization. Signed-off-by: Eric Miao <eric.y.miao@gmail.com> Reported-and-tested-by: Marek Vasut <marek.vasut@gmail.com>
Diffstat (limited to '')
-rw-r--r--arch/arm/mach-pxa/include/mach/hardware.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h
index 7f64d24cd564..b03650059d15 100644
--- a/arch/arm/mach-pxa/include/mach/hardware.h
+++ b/arch/arm/mach-pxa/include/mach/hardware.h
@@ -264,23 +264,35 @@
* <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
* == 0x3 for pxa300/pxa310/pxa320
*/
+#if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
#define __cpu_is_pxa2xx(id) \
({ \
unsigned int _id = (id) >> 13 & 0x7; \
_id <= 0x2; \
})
+#else
+#define __cpu_is_pxa2xx(id) (0)
+#endif
+#ifdef CONFIG_PXA3xx
#define __cpu_is_pxa3xx(id) \
({ \
unsigned int _id = (id) >> 13 & 0x7; \
_id == 0x3; \
})
+#else
+#define __cpu_is_pxa3xx(id) (0)
+#endif
+#if defined(CONFIG_CPU_PXA930) || defined(CONFIG_CPU_PXA935)
#define __cpu_is_pxa93x(id) \
({ \
unsigned int _id = (id) >> 4 & 0xfff; \
_id == 0x683 || _id == 0x693; \
})
+#else
+#define __cpu_is_pxa93x(id) (0)
+#endif
#define cpu_is_pxa2xx() \
({ \