summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ux500/include')
-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 99ca89fe9b30..d86b3543dd23 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