summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Szyszuk <pawel.szyszuk@stericsson.com>2011-11-15 13:45:08 +0000
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:02:33 +0200
commit76f377bd4a4189929b0322e018c21073c364fea2 (patch)
treebfacbdfcfa0bcdc01c3587a1f35263de91691169
parent77de497ea2b7b1c31cb4dffbd191d8e5f590ffea (diff)
U9500: Add function cpu_is_u9500()
ST-Ericsson Linux next: NA ST-Ericsson ID: 365660 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I5bb0cc9f4721a9b3b46334913609d5a301cbb9e0 Signed-off-by: Pawel Szyszuk <pawel.szyszuk@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/37834 Reviewed-by: Derek MORTON <derek.morton@stericsson.com> Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/Makefile2
-rw-r--r--arch/arm/mach-ux500/cpu-db9500.c28
-rw-r--r--arch/arm/mach-ux500/include/mach/id.h9
3 files changed, 38 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index 7aa0c6837d1..ea88a4142bb 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -17,7 +17,7 @@ board-mcde-objs += board-u5500-mcde.o
endif
ifeq ($(CONFIG_UX500_SOC_DB8500), y)
obj-$(CONFIG_UX500_SOC_DBX500) += cpu-db8500.o devices-db8500.o \
- clock-db8500.o dma-db8500.o
+ clock-db8500.o dma-db8500.o cpu-db9500.o
board-mcde-objs += board-mop500-mcde.o
endif
obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \
diff --git a/arch/arm/mach-ux500/cpu-db9500.c b/arch/arm/mach-ux500/cpu-db9500.c
new file mode 100644
index 00000000000..1bbc9b40c1b
--- /dev/null
+++ b/arch/arm/mach-ux500/cpu-db9500.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2011 ST-Ericsson SA
+ *
+ * Author: Pawel SZYSZUK <pawel.szyszuk@stericsson.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ */
+#include <linux/types.h>
+#include <linux/init.h>
+
+#include <mach/id.h>
+
+#include "pins.h"
+
+/*
+ * U9500 is currently using U8500v2 HW. Therefore, the platform detection
+ * is based on the kernel cmd line setting (early_param "pinsfor").
+ */
+inline bool cpu_is_u9500()
+{
+ if (pins_for_u9500())
+ return true;
+ else
+ return false;
+}
diff --git a/arch/arm/mach-ux500/include/mach/id.h b/arch/arm/mach-ux500/include/mach/id.h
index 8017e318480..e888929d43d 100644
--- a/arch/arm/mach-ux500/include/mach/id.h
+++ b/arch/arm/mach-ux500/include/mach/id.h
@@ -64,6 +64,15 @@ static inline bool __attribute_const__ cpu_is_u5500(void)
#endif
}
+#ifdef CONFIG_UX500_SOC_DB8500
+inline bool cpu_is_u9500(void);
+#else
+static inline bool cpu_is_u9500(void)
+{
+ return false;
+}
+#endif
+
/*
* 5500 revisions
*/