浏览代码

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>
Rabin Vincent 15 年之前
父节点
当前提交
f38406bbfc
共有 2 个文件被更改,包括 29 次插入6 次删除
  1. 18 4
      arch/arm/mach-ux500/Kconfig
  2. 11 2
      arch/arm/mach-ux500/include/mach/hardware.h

+ 18 - 4
arch/arm/mach-ux500/Kconfig

@@ -1,16 +1,30 @@
+if ARCH_U8500
+
+config UX500_SOC_COMMON
+	bool
+	default y
+	select ARM_GIC
+	select HAS_MTU
+	select NOMADIK_GPIO
+
+config UX500_SOC_DB8500
+	bool
+
+config UX500_SOC_DB5500
+	bool
+
 menu "ST-Ericsson platform type"
 menu "ST-Ericsson platform type"
-	depends on ARCH_U8500
 
 
 comment "ST-Ericsson Multicore Mobile Platforms"
 comment "ST-Ericsson Multicore Mobile Platforms"
 
 
 config MACH_U8500_MOP
 config MACH_U8500_MOP
 	bool "U8500 Early Development platform"
 	bool "U8500 Early Development platform"
 	default y
 	default y
-	select ARM_GIC
-	select HAS_MTU
-	select NOMADIK_GPIO
+	select UX500_SOC_DB8500
 	help
 	help
 	  Include support for mop500 development platform
 	  Include support for mop500 development platform
 	  based on U8500 architecture. The platform is based
 	  based on U8500 architecture. The platform is based
 	  on early drop silicon version of 8500.
 	  on early drop silicon version of 8500.
 endmenu
 endmenu
+
+endif

+ 11 - 2
arch/arm/mach-ux500/include/mach/hardware.h

@@ -147,14 +147,23 @@
 
 
 #include <asm/cputype.h>
 #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)
 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)
 static inline bool cpu_is_u8500v1(void)
 {
 {
-	return (read_cpuid_id() & 15) == 1;
+	return cpu_is_u8500() && (read_cpuid_id() & 15) == 1;
 }
 }
 
 
 #endif
 #endif