summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/include/mach
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2010-05-03 07:27:31 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-05-04 17:50:00 +0100
commitf38406bbfc5e1d4bd9726454ecb60ba52aa9da11 (patch)
treef2586f252296df9d0500e0e2a9eb672815a7c0f3 /arch/arm/mach-ux500/include/mach
parent72638ddd1422df38d1b1b269038cfc8d66152c10 (diff)
ARM: 6077/1: ux500: add SOC Kconfig variables
This adds the different config options for SoCs DB8500 and DB5500 and refines the SoC/CPU detection code to support the DB5500 as well via these. The selection between DB5500 and DB8500 is currently a simple compile-time choice. Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ux500/include/mach')
-rw-r--r--arch/arm/mach-ux500/include/mach/hardware.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h
index 99ca89fe9b3..d86b3543dd2 100644
--- a/arch/arm/mach-ux500/include/mach/hardware.h
+++ b/arch/arm/mach-ux500/include/mach/hardware.h
@@ -147,14 +147,23 @@
#include <asm/cputype.h>
+static inline bool cpu_is_u8500(void)
+{
+#ifdef CONFIG_UX500_SOC_DB8500
+ return 1;
+#else
+ return 0;
+#endif
+}
+
static inline bool cpu_is_u8500ed(void)
{
- return (read_cpuid_id() & 15) == 0;
+ return cpu_is_u8500() && (read_cpuid_id() & 15) == 0;
}
static inline bool cpu_is_u8500v1(void)
{
- return (read_cpuid_id() & 15) == 1;
+ return cpu_is_u8500() && (read_cpuid_id() & 15) == 1;
}
#endif