All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Further cleanup and enable multiplat build
@ 2014-04-10  8:24 ` Sachin Kamat
  0 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: linux-arm-kernel, arnd, kgene.kim, sachin.kamat

This series is based on latest linux-next and depends on the
following patches:
ARM: EXYNOS: Consolidate Kconfig entries
http://article.gmane.org/gmane.linux.kernel.samsung-soc/28642

Currently cpufreq driver build support has been disabled for
multiplatform for Exynos until the generic CPUfreq driver support
for Exynos gets merged. This (disabling) patch is available in PM tree.
http://www.spinics.net/lists/cpufreq/msg09693.html

Tested on Exynos4210, 4412, 5250 and 5420 based boards.

Arnd Bergmann (1):
  ARM: EXYNOS: Enable multi-platform build support

Sachin Kamat (5):
  ARM: EXYNOS: Remove duplicate lines in Makefile
  ARM: EXYNOS: Staticize exynos_subsys
  ARM: EXYNOS: Migrate Exynos specific macros from plat to mach
  ARM: EXYNOS: Remove unnecessary inclusion of cpu.h
  ARM: multi_v7_defconfig: Enable Exynos platform

 arch/arm/Kconfig                         |   27 ++---------
 arch/arm/configs/exynos_defconfig        |    2 +-
 arch/arm/configs/multi_v7_defconfig      |   10 +++++
 arch/arm/mach-exynos/Kconfig             |   27 +++++++++++
 arch/arm/mach-exynos/Makefile            |    9 ++--
 arch/arm/mach-exynos/common.h            |   72 ++++++++++++++++++++++++++++++
 arch/arm/mach-exynos/cpuidle.c           |    1 -
 arch/arm/mach-exynos/exynos.c            |    4 +-
 arch/arm/mach-exynos/hotplug.c           |    2 -
 arch/arm/mach-exynos/platsmp.c           |    2 -
 arch/arm/mach-exynos/pm.c                |    1 -
 arch/arm/mach-exynos/pmu.c               |    2 -
 arch/arm/plat-samsung/Makefile           |    3 ++
 arch/arm/plat-samsung/include/plat/cpu.h |   61 -------------------------
 14 files changed, 120 insertions(+), 103 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 0/6] Further cleanup and enable multiplat build
@ 2014-04-10  8:24 ` Sachin Kamat
  0 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-arm-kernel

This series is based on latest linux-next and depends on the
following patches:
ARM: EXYNOS: Consolidate Kconfig entries
http://article.gmane.org/gmane.linux.kernel.samsung-soc/28642

Currently cpufreq driver build support has been disabled for
multiplatform for Exynos until the generic CPUfreq driver support
for Exynos gets merged. This (disabling) patch is available in PM tree.
http://www.spinics.net/lists/cpufreq/msg09693.html

Tested on Exynos4210, 4412, 5250 and 5420 based boards.

Arnd Bergmann (1):
  ARM: EXYNOS: Enable multi-platform build support

Sachin Kamat (5):
  ARM: EXYNOS: Remove duplicate lines in Makefile
  ARM: EXYNOS: Staticize exynos_subsys
  ARM: EXYNOS: Migrate Exynos specific macros from plat to mach
  ARM: EXYNOS: Remove unnecessary inclusion of cpu.h
  ARM: multi_v7_defconfig: Enable Exynos platform

 arch/arm/Kconfig                         |   27 ++---------
 arch/arm/configs/exynos_defconfig        |    2 +-
 arch/arm/configs/multi_v7_defconfig      |   10 +++++
 arch/arm/mach-exynos/Kconfig             |   27 +++++++++++
 arch/arm/mach-exynos/Makefile            |    9 ++--
 arch/arm/mach-exynos/common.h            |   72 ++++++++++++++++++++++++++++++
 arch/arm/mach-exynos/cpuidle.c           |    1 -
 arch/arm/mach-exynos/exynos.c            |    4 +-
 arch/arm/mach-exynos/hotplug.c           |    2 -
 arch/arm/mach-exynos/platsmp.c           |    2 -
 arch/arm/mach-exynos/pm.c                |    1 -
 arch/arm/mach-exynos/pmu.c               |    2 -
 arch/arm/plat-samsung/Makefile           |    3 ++
 arch/arm/plat-samsung/include/plat/cpu.h |   61 -------------------------
 14 files changed, 120 insertions(+), 103 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/6] ARM: EXYNOS: Remove duplicate lines in Makefile
  2014-04-10  8:24 ` Sachin Kamat
@ 2014-04-10  8:24   ` Sachin Kamat
  -1 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: linux-arm-kernel, arnd, kgene.kim, sachin.kamat

Group all files compiled under common config option together.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/Makefile |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index a656dbe3b78c..f6dcc256db56 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -12,20 +12,15 @@ obj-				:=
 
 # Core
 
-obj-$(CONFIG_ARCH_EXYNOS)	+= exynos.o
+obj-$(CONFIG_ARCH_EXYNOS)	+= exynos.o pmu.o exynos-smc.o firmware.o
 
 obj-$(CONFIG_PM_SLEEP)		+= pm.o sleep.o
 obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
 obj-$(CONFIG_CPU_IDLE)		+= cpuidle.o
 
-obj-$(CONFIG_ARCH_EXYNOS)	+= pmu.o
-
 obj-$(CONFIG_SMP)		+= platsmp.o headsmp.o
 
 obj-$(CONFIG_HOTPLUG_CPU)	+= hotplug.o
 
-obj-$(CONFIG_ARCH_EXYNOS)	+= exynos-smc.o
-obj-$(CONFIG_ARCH_EXYNOS)	+= firmware.o
-
 plus_sec := $(call as-instr,.arch_extension sec,+sec)
 AFLAGS_exynos-smc.o		:=-Wa,-march=armv7-a$(plus_sec)
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 1/6] ARM: EXYNOS: Remove duplicate lines in Makefile
@ 2014-04-10  8:24   ` Sachin Kamat
  0 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-arm-kernel

Group all files compiled under common config option together.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/Makefile |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index a656dbe3b78c..f6dcc256db56 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -12,20 +12,15 @@ obj-				:=
 
 # Core
 
-obj-$(CONFIG_ARCH_EXYNOS)	+= exynos.o
+obj-$(CONFIG_ARCH_EXYNOS)	+= exynos.o pmu.o exynos-smc.o firmware.o
 
 obj-$(CONFIG_PM_SLEEP)		+= pm.o sleep.o
 obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
 obj-$(CONFIG_CPU_IDLE)		+= cpuidle.o
 
-obj-$(CONFIG_ARCH_EXYNOS)	+= pmu.o
-
 obj-$(CONFIG_SMP)		+= platsmp.o headsmp.o
 
 obj-$(CONFIG_HOTPLUG_CPU)	+= hotplug.o
 
-obj-$(CONFIG_ARCH_EXYNOS)	+= exynos-smc.o
-obj-$(CONFIG_ARCH_EXYNOS)	+= firmware.o
-
 plus_sec := $(call as-instr,.arch_extension sec,+sec)
 AFLAGS_exynos-smc.o		:=-Wa,-march=armv7-a$(plus_sec)
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/6] ARM: EXYNOS: Staticize exynos_subsys
  2014-04-10  8:24 ` Sachin Kamat
@ 2014-04-10  8:24   ` Sachin Kamat
  -1 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: linux-arm-kernel, arnd, kgene.kim, sachin.kamat

'exynos_subsys' is now local to this file. Make it static
and remove the declaration from header file.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/exynos.c            |    2 +-
 arch/arm/plat-samsung/include/plat/cpu.h |    1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 6a5fe18ec9b1..0ef42b9efd36 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -284,7 +284,7 @@ void __init exynos_init_io(void)
 	of_scan_flat_dt(exynos_fdt_map_sysram, NULL);
 }
 
-struct bus_type exynos_subsys = {
+static struct bus_type exynos_subsys = {
 	.name		= "exynos-core",
 	.dev_name	= "exynos-core",
 };
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index 5992b8dd9b89..930b4be832cd 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -239,7 +239,6 @@ extern struct bus_type s3c2443_subsys;
 extern struct bus_type s3c6410_subsys;
 extern struct bus_type s5p64x0_subsys;
 extern struct bus_type s5pv210_subsys;
-extern struct bus_type exynos_subsys;
 
 extern void (*s5pc1xx_idle)(void);
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/6] ARM: EXYNOS: Staticize exynos_subsys
@ 2014-04-10  8:24   ` Sachin Kamat
  0 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-arm-kernel

'exynos_subsys' is now local to this file. Make it static
and remove the declaration from header file.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/exynos.c            |    2 +-
 arch/arm/plat-samsung/include/plat/cpu.h |    1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 6a5fe18ec9b1..0ef42b9efd36 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -284,7 +284,7 @@ void __init exynos_init_io(void)
 	of_scan_flat_dt(exynos_fdt_map_sysram, NULL);
 }
 
-struct bus_type exynos_subsys = {
+static struct bus_type exynos_subsys = {
 	.name		= "exynos-core",
 	.dev_name	= "exynos-core",
 };
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index 5992b8dd9b89..930b4be832cd 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -239,7 +239,6 @@ extern struct bus_type s3c2443_subsys;
 extern struct bus_type s3c6410_subsys;
 extern struct bus_type s5p64x0_subsys;
 extern struct bus_type s5pv210_subsys;
-extern struct bus_type exynos_subsys;
 
 extern void (*s5pc1xx_idle)(void);
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/6] ARM: EXYNOS: Migrate Exynos specific macros from plat to mach
  2014-04-10  8:24 ` Sachin Kamat
@ 2014-04-10  8:24   ` Sachin Kamat
  -1 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: linux-arm-kernel, arnd, kgene.kim, sachin.kamat

Move Exynos specific macros to mach-exynos from plat-samsung to avoid
unnecessary dependency on plat based header files.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/common.h            |   72 ++++++++++++++++++++++++++++++
 arch/arm/plat-samsung/include/plat/cpu.h |   60 -------------------------
 2 files changed, 72 insertions(+), 60 deletions(-)

diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 9ef3f83efaff..c1a2f2207af0 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -15,6 +15,75 @@
 #include <linux/reboot.h>
 #include <linux/of.h>
 
+#define EXYNOS4210_CPU_ID	0x43210000
+#define EXYNOS4212_CPU_ID	0x43220000
+#define EXYNOS4412_CPU_ID	0xE4412200
+#define EXYNOS4_CPU_MASK	0xFFFE0000
+
+#define EXYNOS5250_SOC_ID	0x43520000
+#define EXYNOS5420_SOC_ID	0xE5420000
+#define EXYNOS5440_SOC_ID	0xE5440000
+#define EXYNOS5_SOC_MASK	0xFFFFF000
+
+extern unsigned long samsung_cpu_id;
+
+#define IS_SAMSUNG_CPU(name, id, mask)		\
+static inline int is_samsung_##name(void)	\
+{						\
+	return ((samsung_cpu_id & mask) == (id & mask));	\
+}
+
+IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK)
+IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK)
+IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK)
+IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK)
+IS_SAMSUNG_CPU(exynos5420, EXYNOS5420_SOC_ID, EXYNOS5_SOC_MASK)
+IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
+
+#if defined(CONFIG_CPU_EXYNOS4210)
+# define soc_is_exynos4210()	is_samsung_exynos4210()
+#else
+# define soc_is_exynos4210()	0
+#endif
+
+#if defined(CONFIG_SOC_EXYNOS4212)
+# define soc_is_exynos4212()	is_samsung_exynos4212()
+#else
+# define soc_is_exynos4212()	0
+#endif
+
+#if defined(CONFIG_SOC_EXYNOS4412)
+# define soc_is_exynos4412()	is_samsung_exynos4412()
+#else
+# define soc_is_exynos4412()	0
+#endif
+
+#define EXYNOS4210_REV_0	(0x0)
+#define EXYNOS4210_REV_1_0	(0x10)
+#define EXYNOS4210_REV_1_1	(0x11)
+
+#if defined(CONFIG_SOC_EXYNOS5250)
+# define soc_is_exynos5250()	is_samsung_exynos5250()
+#else
+# define soc_is_exynos5250()	0
+#endif
+
+#if defined(CONFIG_SOC_EXYNOS5420)
+# define soc_is_exynos5420()	is_samsung_exynos5420()
+#else
+# define soc_is_exynos5420()	0
+#endif
+
+#if defined(CONFIG_SOC_EXYNOS5440)
+# define soc_is_exynos5440()	is_samsung_exynos5440()
+#else
+# define soc_is_exynos5440()	0
+#endif
+
+#define soc_is_exynos4() (soc_is_exynos4210() || soc_is_exynos4212() || \
+			  soc_is_exynos4412())
+#define soc_is_exynos5() (soc_is_exynos5250() || soc_is_exynos5420())
+
 void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
 
 struct map_desc;
@@ -63,4 +132,7 @@ struct exynos_pmu_conf {
 
 extern void exynos_sys_powerdown_conf(enum sys_powerdown mode);
 
+extern void s5p_init_cpu(void __iomem *cpuid_addr);
+extern unsigned int samsung_rev(void);
+
 #endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index 930b4be832cd..5a237db9f9eb 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -43,16 +43,6 @@ extern unsigned long samsung_cpu_id;
 #define S5PV210_CPU_ID		0x43110000
 #define S5PV210_CPU_MASK	0xFFFFF000
 
-#define EXYNOS4210_CPU_ID	0x43210000
-#define EXYNOS4212_CPU_ID	0x43220000
-#define EXYNOS4412_CPU_ID	0xE4412200
-#define EXYNOS4_CPU_MASK	0xFFFE0000
-
-#define EXYNOS5250_SOC_ID	0x43520000
-#define EXYNOS5420_SOC_ID	0xE5420000
-#define EXYNOS5440_SOC_ID	0xE5440000
-#define EXYNOS5_SOC_MASK	0xFFFFF000
-
 #define IS_SAMSUNG_CPU(name, id, mask)		\
 static inline int is_samsung_##name(void)	\
 {						\
@@ -68,12 +58,6 @@ IS_SAMSUNG_CPU(s5p6440, S5P6440_CPU_ID, S5P64XX_CPU_MASK)
 IS_SAMSUNG_CPU(s5p6450, S5P6450_CPU_ID, S5P64XX_CPU_MASK)
 IS_SAMSUNG_CPU(s5pc100, S5PC100_CPU_ID, S5PC100_CPU_MASK)
 IS_SAMSUNG_CPU(s5pv210, S5PV210_CPU_ID, S5PV210_CPU_MASK)
-IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK)
-IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK)
-IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK)
-IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK)
-IS_SAMSUNG_CPU(exynos5420, EXYNOS5420_SOC_ID, EXYNOS5_SOC_MASK)
-IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
 
 #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \
     defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \
@@ -126,50 +110,6 @@ IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
 # define soc_is_s5pv210()	0
 #endif
 
-#if defined(CONFIG_CPU_EXYNOS4210)
-# define soc_is_exynos4210()	is_samsung_exynos4210()
-#else
-# define soc_is_exynos4210()	0
-#endif
-
-#if defined(CONFIG_SOC_EXYNOS4212)
-# define soc_is_exynos4212()	is_samsung_exynos4212()
-#else
-# define soc_is_exynos4212()	0
-#endif
-
-#if defined(CONFIG_SOC_EXYNOS4412)
-# define soc_is_exynos4412()	is_samsung_exynos4412()
-#else
-# define soc_is_exynos4412()	0
-#endif
-
-#define EXYNOS4210_REV_0	(0x0)
-#define EXYNOS4210_REV_1_0	(0x10)
-#define EXYNOS4210_REV_1_1	(0x11)
-
-#if defined(CONFIG_SOC_EXYNOS5250)
-# define soc_is_exynos5250()	is_samsung_exynos5250()
-#else
-# define soc_is_exynos5250()	0
-#endif
-
-#if defined(CONFIG_SOC_EXYNOS5420)
-# define soc_is_exynos5420()	is_samsung_exynos5420()
-#else
-# define soc_is_exynos5420()	0
-#endif
-
-#if defined(CONFIG_SOC_EXYNOS5440)
-# define soc_is_exynos5440()	is_samsung_exynos5440()
-#else
-# define soc_is_exynos5440()	0
-#endif
-
-#define soc_is_exynos4() (soc_is_exynos4210() || soc_is_exynos4212() || \
-			  soc_is_exynos4412())
-#define soc_is_exynos5() (soc_is_exynos5250() || soc_is_exynos5420())
-
 #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
 
 #ifndef KHZ
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/6] ARM: EXYNOS: Migrate Exynos specific macros from plat to mach
@ 2014-04-10  8:24   ` Sachin Kamat
  0 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-arm-kernel

Move Exynos specific macros to mach-exynos from plat-samsung to avoid
unnecessary dependency on plat based header files.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/common.h            |   72 ++++++++++++++++++++++++++++++
 arch/arm/plat-samsung/include/plat/cpu.h |   60 -------------------------
 2 files changed, 72 insertions(+), 60 deletions(-)

diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 9ef3f83efaff..c1a2f2207af0 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -15,6 +15,75 @@
 #include <linux/reboot.h>
 #include <linux/of.h>
 
+#define EXYNOS4210_CPU_ID	0x43210000
+#define EXYNOS4212_CPU_ID	0x43220000
+#define EXYNOS4412_CPU_ID	0xE4412200
+#define EXYNOS4_CPU_MASK	0xFFFE0000
+
+#define EXYNOS5250_SOC_ID	0x43520000
+#define EXYNOS5420_SOC_ID	0xE5420000
+#define EXYNOS5440_SOC_ID	0xE5440000
+#define EXYNOS5_SOC_MASK	0xFFFFF000
+
+extern unsigned long samsung_cpu_id;
+
+#define IS_SAMSUNG_CPU(name, id, mask)		\
+static inline int is_samsung_##name(void)	\
+{						\
+	return ((samsung_cpu_id & mask) == (id & mask));	\
+}
+
+IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK)
+IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK)
+IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK)
+IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK)
+IS_SAMSUNG_CPU(exynos5420, EXYNOS5420_SOC_ID, EXYNOS5_SOC_MASK)
+IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
+
+#if defined(CONFIG_CPU_EXYNOS4210)
+# define soc_is_exynos4210()	is_samsung_exynos4210()
+#else
+# define soc_is_exynos4210()	0
+#endif
+
+#if defined(CONFIG_SOC_EXYNOS4212)
+# define soc_is_exynos4212()	is_samsung_exynos4212()
+#else
+# define soc_is_exynos4212()	0
+#endif
+
+#if defined(CONFIG_SOC_EXYNOS4412)
+# define soc_is_exynos4412()	is_samsung_exynos4412()
+#else
+# define soc_is_exynos4412()	0
+#endif
+
+#define EXYNOS4210_REV_0	(0x0)
+#define EXYNOS4210_REV_1_0	(0x10)
+#define EXYNOS4210_REV_1_1	(0x11)
+
+#if defined(CONFIG_SOC_EXYNOS5250)
+# define soc_is_exynos5250()	is_samsung_exynos5250()
+#else
+# define soc_is_exynos5250()	0
+#endif
+
+#if defined(CONFIG_SOC_EXYNOS5420)
+# define soc_is_exynos5420()	is_samsung_exynos5420()
+#else
+# define soc_is_exynos5420()	0
+#endif
+
+#if defined(CONFIG_SOC_EXYNOS5440)
+# define soc_is_exynos5440()	is_samsung_exynos5440()
+#else
+# define soc_is_exynos5440()	0
+#endif
+
+#define soc_is_exynos4() (soc_is_exynos4210() || soc_is_exynos4212() || \
+			  soc_is_exynos4412())
+#define soc_is_exynos5() (soc_is_exynos5250() || soc_is_exynos5420())
+
 void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
 
 struct map_desc;
@@ -63,4 +132,7 @@ struct exynos_pmu_conf {
 
 extern void exynos_sys_powerdown_conf(enum sys_powerdown mode);
 
+extern void s5p_init_cpu(void __iomem *cpuid_addr);
+extern unsigned int samsung_rev(void);
+
 #endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index 930b4be832cd..5a237db9f9eb 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -43,16 +43,6 @@ extern unsigned long samsung_cpu_id;
 #define S5PV210_CPU_ID		0x43110000
 #define S5PV210_CPU_MASK	0xFFFFF000
 
-#define EXYNOS4210_CPU_ID	0x43210000
-#define EXYNOS4212_CPU_ID	0x43220000
-#define EXYNOS4412_CPU_ID	0xE4412200
-#define EXYNOS4_CPU_MASK	0xFFFE0000
-
-#define EXYNOS5250_SOC_ID	0x43520000
-#define EXYNOS5420_SOC_ID	0xE5420000
-#define EXYNOS5440_SOC_ID	0xE5440000
-#define EXYNOS5_SOC_MASK	0xFFFFF000
-
 #define IS_SAMSUNG_CPU(name, id, mask)		\
 static inline int is_samsung_##name(void)	\
 {						\
@@ -68,12 +58,6 @@ IS_SAMSUNG_CPU(s5p6440, S5P6440_CPU_ID, S5P64XX_CPU_MASK)
 IS_SAMSUNG_CPU(s5p6450, S5P6450_CPU_ID, S5P64XX_CPU_MASK)
 IS_SAMSUNG_CPU(s5pc100, S5PC100_CPU_ID, S5PC100_CPU_MASK)
 IS_SAMSUNG_CPU(s5pv210, S5PV210_CPU_ID, S5PV210_CPU_MASK)
-IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK)
-IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK)
-IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK)
-IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK)
-IS_SAMSUNG_CPU(exynos5420, EXYNOS5420_SOC_ID, EXYNOS5_SOC_MASK)
-IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
 
 #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \
     defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \
@@ -126,50 +110,6 @@ IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
 # define soc_is_s5pv210()	0
 #endif
 
-#if defined(CONFIG_CPU_EXYNOS4210)
-# define soc_is_exynos4210()	is_samsung_exynos4210()
-#else
-# define soc_is_exynos4210()	0
-#endif
-
-#if defined(CONFIG_SOC_EXYNOS4212)
-# define soc_is_exynos4212()	is_samsung_exynos4212()
-#else
-# define soc_is_exynos4212()	0
-#endif
-
-#if defined(CONFIG_SOC_EXYNOS4412)
-# define soc_is_exynos4412()	is_samsung_exynos4412()
-#else
-# define soc_is_exynos4412()	0
-#endif
-
-#define EXYNOS4210_REV_0	(0x0)
-#define EXYNOS4210_REV_1_0	(0x10)
-#define EXYNOS4210_REV_1_1	(0x11)
-
-#if defined(CONFIG_SOC_EXYNOS5250)
-# define soc_is_exynos5250()	is_samsung_exynos5250()
-#else
-# define soc_is_exynos5250()	0
-#endif
-
-#if defined(CONFIG_SOC_EXYNOS5420)
-# define soc_is_exynos5420()	is_samsung_exynos5420()
-#else
-# define soc_is_exynos5420()	0
-#endif
-
-#if defined(CONFIG_SOC_EXYNOS5440)
-# define soc_is_exynos5440()	is_samsung_exynos5440()
-#else
-# define soc_is_exynos5440()	0
-#endif
-
-#define soc_is_exynos4() (soc_is_exynos4210() || soc_is_exynos4212() || \
-			  soc_is_exynos4412())
-#define soc_is_exynos5() (soc_is_exynos5250() || soc_is_exynos5420())
-
 #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
 
 #ifndef KHZ
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 4/6] ARM: EXYNOS: Remove unnecessary inclusion of cpu.h
  2014-04-10  8:24 ` Sachin Kamat
@ 2014-04-10  8:24   ` Sachin Kamat
  -1 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: linux-arm-kernel, arnd, kgene.kim, sachin.kamat

Exynos specific macros and declarations have been moved to
mach-exynos. Inclusion of plat/cpu.h is no more necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/cpuidle.c |    1 -
 arch/arm/mach-exynos/exynos.c  |    2 --
 arch/arm/mach-exynos/hotplug.c |    2 --
 arch/arm/mach-exynos/platsmp.c |    2 --
 arch/arm/mach-exynos/pm.c      |    1 -
 arch/arm/mach-exynos/pmu.c     |    2 --
 6 files changed, 10 deletions(-)

diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index c57cae0e8779..3dd385ebf195 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -24,7 +24,6 @@
 #include <asm/unified.h>
 #include <asm/cpuidle.h>
 
-#include <plat/cpu.h>
 #include <plat/pm.h>
 
 #include <mach/map.h>
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 0ef42b9efd36..63a0ef714c70 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -26,8 +26,6 @@
 #include <asm/mach/map.h>
 #include <asm/memory.h>
 
-#include <plat/cpu.h>
-
 #include "common.h"
 #include "mfc.h"
 #include "regs-pmu.h"
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
index 5eead530c6f8..884e83cfbfbb 100644
--- a/arch/arm/mach-exynos/hotplug.c
+++ b/arch/arm/mach-exynos/hotplug.c
@@ -19,8 +19,6 @@
 #include <asm/cp15.h>
 #include <asm/smp_plat.h>
 
-#include <plat/cpu.h>
-
 #include "common.h"
 #include "regs-pmu.h"
 
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 03e5e9f94705..c28cdb1c82cd 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -26,8 +26,6 @@
 #include <asm/smp_scu.h>
 #include <asm/firmware.h>
 
-#include <plat/cpu.h>
-
 #include "common.h"
 #include "regs-pmu.h"
 
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index 15af0ceb0a66..ca672e24b5cd 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -26,7 +26,6 @@
 #include <asm/smp_scu.h>
 #include <asm/suspend.h>
 
-#include <plat/cpu.h>
 #include <plat/pm-common.h>
 #include <plat/pll.h>
 #include <plat/regs-srom.h>
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index 05c7ce15322a..fb0deda3b3a4 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -13,8 +13,6 @@
 #include <linux/kernel.h>
 #include <linux/bug.h>
 
-#include <plat/cpu.h>
-
 #include "common.h"
 #include "regs-pmu.h"
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 4/6] ARM: EXYNOS: Remove unnecessary inclusion of cpu.h
@ 2014-04-10  8:24   ` Sachin Kamat
  0 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-arm-kernel

Exynos specific macros and declarations have been moved to
mach-exynos. Inclusion of plat/cpu.h is no more necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/cpuidle.c |    1 -
 arch/arm/mach-exynos/exynos.c  |    2 --
 arch/arm/mach-exynos/hotplug.c |    2 --
 arch/arm/mach-exynos/platsmp.c |    2 --
 arch/arm/mach-exynos/pm.c      |    1 -
 arch/arm/mach-exynos/pmu.c     |    2 --
 6 files changed, 10 deletions(-)

diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index c57cae0e8779..3dd385ebf195 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -24,7 +24,6 @@
 #include <asm/unified.h>
 #include <asm/cpuidle.h>
 
-#include <plat/cpu.h>
 #include <plat/pm.h>
 
 #include <mach/map.h>
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 0ef42b9efd36..63a0ef714c70 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -26,8 +26,6 @@
 #include <asm/mach/map.h>
 #include <asm/memory.h>
 
-#include <plat/cpu.h>
-
 #include "common.h"
 #include "mfc.h"
 #include "regs-pmu.h"
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
index 5eead530c6f8..884e83cfbfbb 100644
--- a/arch/arm/mach-exynos/hotplug.c
+++ b/arch/arm/mach-exynos/hotplug.c
@@ -19,8 +19,6 @@
 #include <asm/cp15.h>
 #include <asm/smp_plat.h>
 
-#include <plat/cpu.h>
-
 #include "common.h"
 #include "regs-pmu.h"
 
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 03e5e9f94705..c28cdb1c82cd 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -26,8 +26,6 @@
 #include <asm/smp_scu.h>
 #include <asm/firmware.h>
 
-#include <plat/cpu.h>
-
 #include "common.h"
 #include "regs-pmu.h"
 
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index 15af0ceb0a66..ca672e24b5cd 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -26,7 +26,6 @@
 #include <asm/smp_scu.h>
 #include <asm/suspend.h>
 
-#include <plat/cpu.h>
 #include <plat/pm-common.h>
 #include <plat/pll.h>
 #include <plat/regs-srom.h>
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index 05c7ce15322a..fb0deda3b3a4 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -13,8 +13,6 @@
 #include <linux/kernel.h>
 #include <linux/bug.h>
 
-#include <plat/cpu.h>
-
 #include "common.h"
 #include "regs-pmu.h"
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 5/6] ARM: EXYNOS: Enable multi-platform build support
  2014-04-10  8:24 ` Sachin Kamat
@ 2014-04-10  8:24   ` Sachin Kamat
  -1 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: linux-arm-kernel, arnd, kgene.kim, sachin.kamat

From: Arnd Bergmann <arnd@arndb.de>

This makes it possible to enable the exynos platform as part of a
multiplatform kernel, in addition to keeping the single-platform
Exynos support.
sparsemem is currently not supported in multiplatform.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/Kconfig                  |   27 +++------------------------
 arch/arm/configs/exynos_defconfig |    2 +-
 arch/arm/mach-exynos/Kconfig      |   27 +++++++++++++++++++++++++++
 arch/arm/mach-exynos/Makefile     |    2 ++
 arch/arm/plat-samsung/Makefile    |    3 +++
 5 files changed, 36 insertions(+), 25 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4422601059e8..9d459e9c396b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -828,34 +828,13 @@ config ARCH_S5PV210
 	help
 	  Samsung S5PV210/S5PC110 series based systems
 
-config ARCH_EXYNOS
+config ARCH_EXYNOS_SINGLE
 	bool "Samsung EXYNOS"
-	select ARCH_HAS_BANDGAP
-	select ARCH_HAS_CPUFREQ
-	select ARCH_HAS_HOLES_MEMORYMODEL
-	select ARCH_REQUIRE_GPIOLIB
+	select ARCH_EXYNOS
 	select ARCH_SPARSEMEM_ENABLE
-	select ARM_AMBA
-	select ARM_GIC
-	select CLKSRC_OF
-	select COMMON_CLK
-	select CPU_V7
-	select GENERIC_CLOCKEVENTS
-	select HAVE_ARM_SCU if SMP
-	select HAVE_S3C2410_I2C if I2C
-	select HAVE_S3C2410_WATCHDOG if WATCHDOG
-	select HAVE_S3C_RTC if RTC_CLASS
-	select HAVE_SMP
 	select NEED_MACH_MEMORY_H
-	select PINCTRL
-	select PINCTRL_EXYNOS
-	select PM_GENERIC_DOMAINS if PM_RUNTIME
-	select S5P_DEV_MFC
-	select SAMSUNG_DMADEV
-	select SPARSE_IRQ
-	select USE_OF
 	help
-	  Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
+	  Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)
 
 config ARCH_DAVINCI
 	bool "TI DaVinci"
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index 4ce7b70ea901..103a676256cd 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -7,7 +7,7 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
-CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS_SINGLE=y
 CONFIG_S3C_LOWLEVEL_UART_PORT=3
 CONFIG_S3C24XX_PWM=y
 CONFIG_ARCH_EXYNOS5=y
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 5c34dc26cec6..bc55af76a05f 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -7,6 +7,33 @@
 
 # Configuration options for the EXYNOS4
 
+config ARCH_EXYNOS
+	bool "Samsung EXYNOS" if ARCH_MULTI_V7
+	select ARCH_HAS_BANDGAP
+	select ARCH_HAS_CPUFREQ
+	select ARCH_HAS_HOLES_MEMORYMODEL
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_AMBA
+	select ARM_GIC
+	select CLKSRC_OF
+	select COMMON_CLK
+	select CPU_V7
+	select GENERIC_CLOCKEVENTS
+	select HAVE_ARM_SCU if SMP
+	select HAVE_S3C2410_I2C if I2C
+	select HAVE_S3C2410_WATCHDOG if WATCHDOG
+	select HAVE_S3C_RTC if RTC_CLASS
+	select HAVE_SMP
+	select PINCTRL
+	select PINCTRL_EXYNOS
+	select PM_GENERIC_DOMAINS if PM_RUNTIME
+	select S5P_DEV_MFC
+	select SAMSUNG_DMADEV
+	select SPARSE_IRQ
+	select USE_OF
+	help
+	  Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)
+
 if ARCH_EXYNOS
 
 menu "SAMSUNG EXYNOS SoCs Support"
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index f6dcc256db56..24a8efe3d4bd 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -5,6 +5,8 @@
 #
 # Licensed under GPLv2
 
+ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
+
 obj-y				:=
 obj-m				:=
 obj-n				:=
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 25c826ed3b65..5e5beaa9ae15 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -4,6 +4,9 @@
 #
 # Licensed under GPLv2
 
+ccflags-$(CONFIG_ARCH_MULTI_V7) += -I$(srctree)/$(src)/include
+ccflags-$(CONFIG_ARCH_EXYNOS)	+= -I$(srctree)/arch/arm/mach-exynos/include
+
 obj-y				:=
 obj-m				:=
 obj-n				:= dummy.o
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 5/6] ARM: EXYNOS: Enable multi-platform build support
@ 2014-04-10  8:24   ` Sachin Kamat
  0 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-arm-kernel

From: Arnd Bergmann <arnd@arndb.de>

This makes it possible to enable the exynos platform as part of a
multiplatform kernel, in addition to keeping the single-platform
Exynos support.
sparsemem is currently not supported in multiplatform.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/Kconfig                  |   27 +++------------------------
 arch/arm/configs/exynos_defconfig |    2 +-
 arch/arm/mach-exynos/Kconfig      |   27 +++++++++++++++++++++++++++
 arch/arm/mach-exynos/Makefile     |    2 ++
 arch/arm/plat-samsung/Makefile    |    3 +++
 5 files changed, 36 insertions(+), 25 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4422601059e8..9d459e9c396b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -828,34 +828,13 @@ config ARCH_S5PV210
 	help
 	  Samsung S5PV210/S5PC110 series based systems
 
-config ARCH_EXYNOS
+config ARCH_EXYNOS_SINGLE
 	bool "Samsung EXYNOS"
-	select ARCH_HAS_BANDGAP
-	select ARCH_HAS_CPUFREQ
-	select ARCH_HAS_HOLES_MEMORYMODEL
-	select ARCH_REQUIRE_GPIOLIB
+	select ARCH_EXYNOS
 	select ARCH_SPARSEMEM_ENABLE
-	select ARM_AMBA
-	select ARM_GIC
-	select CLKSRC_OF
-	select COMMON_CLK
-	select CPU_V7
-	select GENERIC_CLOCKEVENTS
-	select HAVE_ARM_SCU if SMP
-	select HAVE_S3C2410_I2C if I2C
-	select HAVE_S3C2410_WATCHDOG if WATCHDOG
-	select HAVE_S3C_RTC if RTC_CLASS
-	select HAVE_SMP
 	select NEED_MACH_MEMORY_H
-	select PINCTRL
-	select PINCTRL_EXYNOS
-	select PM_GENERIC_DOMAINS if PM_RUNTIME
-	select S5P_DEV_MFC
-	select SAMSUNG_DMADEV
-	select SPARSE_IRQ
-	select USE_OF
 	help
-	  Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
+	  Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)
 
 config ARCH_DAVINCI
 	bool "TI DaVinci"
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index 4ce7b70ea901..103a676256cd 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -7,7 +7,7 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
-CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS_SINGLE=y
 CONFIG_S3C_LOWLEVEL_UART_PORT=3
 CONFIG_S3C24XX_PWM=y
 CONFIG_ARCH_EXYNOS5=y
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 5c34dc26cec6..bc55af76a05f 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -7,6 +7,33 @@
 
 # Configuration options for the EXYNOS4
 
+config ARCH_EXYNOS
+	bool "Samsung EXYNOS" if ARCH_MULTI_V7
+	select ARCH_HAS_BANDGAP
+	select ARCH_HAS_CPUFREQ
+	select ARCH_HAS_HOLES_MEMORYMODEL
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_AMBA
+	select ARM_GIC
+	select CLKSRC_OF
+	select COMMON_CLK
+	select CPU_V7
+	select GENERIC_CLOCKEVENTS
+	select HAVE_ARM_SCU if SMP
+	select HAVE_S3C2410_I2C if I2C
+	select HAVE_S3C2410_WATCHDOG if WATCHDOG
+	select HAVE_S3C_RTC if RTC_CLASS
+	select HAVE_SMP
+	select PINCTRL
+	select PINCTRL_EXYNOS
+	select PM_GENERIC_DOMAINS if PM_RUNTIME
+	select S5P_DEV_MFC
+	select SAMSUNG_DMADEV
+	select SPARSE_IRQ
+	select USE_OF
+	help
+	  Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)
+
 if ARCH_EXYNOS
 
 menu "SAMSUNG EXYNOS SoCs Support"
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index f6dcc256db56..24a8efe3d4bd 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -5,6 +5,8 @@
 #
 # Licensed under GPLv2
 
+ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
+
 obj-y				:=
 obj-m				:=
 obj-n				:=
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 25c826ed3b65..5e5beaa9ae15 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -4,6 +4,9 @@
 #
 # Licensed under GPLv2
 
+ccflags-$(CONFIG_ARCH_MULTI_V7) += -I$(srctree)/$(src)/include
+ccflags-$(CONFIG_ARCH_EXYNOS)	+= -I$(srctree)/arch/arm/mach-exynos/include
+
 obj-y				:=
 obj-m				:=
 obj-n				:= dummy.o
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 6/6] ARM: multi_v7_defconfig: Enable Exynos platform
  2014-04-10  8:24 ` Sachin Kamat
@ 2014-04-10  8:24   ` Sachin Kamat
  -1 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: linux-arm-kernel, arnd, kgene.kim, sachin.kamat

Enable Exynos platform and its related IPs.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/configs/multi_v7_defconfig |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index d4e8a47a2f7c..298057a0324c 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -47,6 +47,7 @@ CONFIG_ARCH_SPEAR13XX=y
 CONFIG_MACH_SPEAR1310=y
 CONFIG_MACH_SPEAR1340=y
 CONFIG_ARCH_STI=y
+CONFIG_ARCH_EXYNOS=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_ARCH_SIRF=y
 CONFIG_ARCH_TEGRA=y
@@ -71,6 +72,7 @@ CONFIG_PCI_MSI=y
 CONFIG_PCI_MVEBU=y
 CONFIG_PCI_TEGRA=y
 CONFIG_SMP=y
+CONFIG_NR_CPUS=8
 CONFIG_HIGHPTE=y
 CONFIG_CMA=y
 CONFIG_ARM_APPENDED_DTB=y
@@ -153,6 +155,8 @@ CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_DW=y
 CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_SAMSUNG=y
+CONFIG_SERIAL_SAMSUNG_CONSOLE=y
 CONFIG_SERIAL_SIRFSOC=y
 CONFIG_SERIAL_SIRFSOC_CONSOLE=y
 CONFIG_SERIAL_TEGRA=y
@@ -176,6 +180,7 @@ CONFIG_I2C_MUX=y
 CONFIG_I2C_MUX_PCA954x=y
 CONFIG_I2C_MUX_PINCTRL=y
 CONFIG_I2C_DESIGNWARE_PLATFORM=y
+CONFIG_I2C_EXYNOS5=y
 CONFIG_I2C_MV64XXX=y
 CONFIG_I2C_SIRF=y
 CONFIG_I2C_TEGRA=y
@@ -210,6 +215,7 @@ CONFIG_MFD_AS3722=y
 CONFIG_MFD_CROS_EC=y
 CONFIG_MFD_CROS_EC_SPI=y
 CONFIG_MFD_MAX8907=y
+CONFIG_MFD_SEC_CORE=y
 CONFIG_MFD_PALMAS=y
 CONFIG_MFD_TPS65090=y
 CONFIG_MFD_TPS6586X=y
@@ -220,6 +226,8 @@ CONFIG_REGULATOR_AS3722=y
 CONFIG_REGULATOR_GPIO=y
 CONFIG_REGULATOR_MAX8907=y
 CONFIG_REGULATOR_PALMAS=y
+CONFIG_REGULATOR_S2MPS11=y
+CONFIG_REGULATOR_S5M8767=y
 CONFIG_REGULATOR_TPS51632=y
 CONFIG_REGULATOR_TPS62360=y
 CONFIG_REGULATOR_TPS65090=y
@@ -280,6 +288,8 @@ CONFIG_MMC_SDHCI_BCM_KONA=y
 CONFIG_MMC_OMAP=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MMC_MVSDIO=y
+CONFIG_MMC_DW=y
+CONFIG_MMC_DW_EXYNOS=y
 CONFIG_EDAC=y
 CONFIG_EDAC_MM_EDAC=y
 CONFIG_EDAC_HIGHBANK_MC=y
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 6/6] ARM: multi_v7_defconfig: Enable Exynos platform
@ 2014-04-10  8:24   ` Sachin Kamat
  0 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  8:24 UTC (permalink / raw)
  To: linux-arm-kernel

Enable Exynos platform and its related IPs.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/configs/multi_v7_defconfig |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index d4e8a47a2f7c..298057a0324c 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -47,6 +47,7 @@ CONFIG_ARCH_SPEAR13XX=y
 CONFIG_MACH_SPEAR1310=y
 CONFIG_MACH_SPEAR1340=y
 CONFIG_ARCH_STI=y
+CONFIG_ARCH_EXYNOS=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_ARCH_SIRF=y
 CONFIG_ARCH_TEGRA=y
@@ -71,6 +72,7 @@ CONFIG_PCI_MSI=y
 CONFIG_PCI_MVEBU=y
 CONFIG_PCI_TEGRA=y
 CONFIG_SMP=y
+CONFIG_NR_CPUS=8
 CONFIG_HIGHPTE=y
 CONFIG_CMA=y
 CONFIG_ARM_APPENDED_DTB=y
@@ -153,6 +155,8 @@ CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_DW=y
 CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_SAMSUNG=y
+CONFIG_SERIAL_SAMSUNG_CONSOLE=y
 CONFIG_SERIAL_SIRFSOC=y
 CONFIG_SERIAL_SIRFSOC_CONSOLE=y
 CONFIG_SERIAL_TEGRA=y
@@ -176,6 +180,7 @@ CONFIG_I2C_MUX=y
 CONFIG_I2C_MUX_PCA954x=y
 CONFIG_I2C_MUX_PINCTRL=y
 CONFIG_I2C_DESIGNWARE_PLATFORM=y
+CONFIG_I2C_EXYNOS5=y
 CONFIG_I2C_MV64XXX=y
 CONFIG_I2C_SIRF=y
 CONFIG_I2C_TEGRA=y
@@ -210,6 +215,7 @@ CONFIG_MFD_AS3722=y
 CONFIG_MFD_CROS_EC=y
 CONFIG_MFD_CROS_EC_SPI=y
 CONFIG_MFD_MAX8907=y
+CONFIG_MFD_SEC_CORE=y
 CONFIG_MFD_PALMAS=y
 CONFIG_MFD_TPS65090=y
 CONFIG_MFD_TPS6586X=y
@@ -220,6 +226,8 @@ CONFIG_REGULATOR_AS3722=y
 CONFIG_REGULATOR_GPIO=y
 CONFIG_REGULATOR_MAX8907=y
 CONFIG_REGULATOR_PALMAS=y
+CONFIG_REGULATOR_S2MPS11=y
+CONFIG_REGULATOR_S5M8767=y
 CONFIG_REGULATOR_TPS51632=y
 CONFIG_REGULATOR_TPS62360=y
 CONFIG_REGULATOR_TPS65090=y
@@ -280,6 +288,8 @@ CONFIG_MMC_SDHCI_BCM_KONA=y
 CONFIG_MMC_OMAP=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MMC_MVSDIO=y
+CONFIG_MMC_DW=y
+CONFIG_MMC_DW_EXYNOS=y
 CONFIG_EDAC=y
 CONFIG_EDAC_MM_EDAC=y
 CONFIG_EDAC_HIGHBANK_MC=y
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/6] ARM: EXYNOS: Staticize exynos_subsys
  2014-04-10  8:24   ` Sachin Kamat
@ 2014-04-10  9:17     ` Tomasz Figa
  -1 siblings, 0 replies; 24+ messages in thread
From: Tomasz Figa @ 2014-04-10  9:17 UTC (permalink / raw)
  To: Sachin Kamat, linux-samsung-soc; +Cc: linux-arm-kernel, arnd, kgene.kim

Hi Sachin,

On 10.04.2014 10:24, Sachin Kamat wrote:
> 'exynos_subsys' is now local to this file. Make it static
> and remove the declaration from header file.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>   arch/arm/mach-exynos/exynos.c            |    2 +-
>   arch/arm/plat-samsung/include/plat/cpu.h |    1 -
>   2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
> index 6a5fe18ec9b1..0ef42b9efd36 100644
> --- a/arch/arm/mach-exynos/exynos.c
> +++ b/arch/arm/mach-exynos/exynos.c
> @@ -284,7 +284,7 @@ void __init exynos_init_io(void)
>   	of_scan_flat_dt(exynos_fdt_map_sysram, NULL);
>   }
>
> -struct bus_type exynos_subsys = {
> +static struct bus_type exynos_subsys = {
>   	.name		= "exynos-core",
>   	.dev_name	= "exynos-core",
>   };
> diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
> index 5992b8dd9b89..930b4be832cd 100644
> --- a/arch/arm/plat-samsung/include/plat/cpu.h
> +++ b/arch/arm/plat-samsung/include/plat/cpu.h
> @@ -239,7 +239,6 @@ extern struct bus_type s3c2443_subsys;
>   extern struct bus_type s3c6410_subsys;
>   extern struct bus_type s5p64x0_subsys;
>   extern struct bus_type s5pv210_subsys;
> -extern struct bus_type exynos_subsys;
>
>   extern void (*s5pc1xx_idle)(void);
>
>

This struct and registration of it do not seem to be needed for anything 
anymore. Would you consider removing it instead?

Best regards,
Tomasz

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 2/6] ARM: EXYNOS: Staticize exynos_subsys
@ 2014-04-10  9:17     ` Tomasz Figa
  0 siblings, 0 replies; 24+ messages in thread
From: Tomasz Figa @ 2014-04-10  9:17 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sachin,

On 10.04.2014 10:24, Sachin Kamat wrote:
> 'exynos_subsys' is now local to this file. Make it static
> and remove the declaration from header file.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>   arch/arm/mach-exynos/exynos.c            |    2 +-
>   arch/arm/plat-samsung/include/plat/cpu.h |    1 -
>   2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
> index 6a5fe18ec9b1..0ef42b9efd36 100644
> --- a/arch/arm/mach-exynos/exynos.c
> +++ b/arch/arm/mach-exynos/exynos.c
> @@ -284,7 +284,7 @@ void __init exynos_init_io(void)
>   	of_scan_flat_dt(exynos_fdt_map_sysram, NULL);
>   }
>
> -struct bus_type exynos_subsys = {
> +static struct bus_type exynos_subsys = {
>   	.name		= "exynos-core",
>   	.dev_name	= "exynos-core",
>   };
> diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
> index 5992b8dd9b89..930b4be832cd 100644
> --- a/arch/arm/plat-samsung/include/plat/cpu.h
> +++ b/arch/arm/plat-samsung/include/plat/cpu.h
> @@ -239,7 +239,6 @@ extern struct bus_type s3c2443_subsys;
>   extern struct bus_type s3c6410_subsys;
>   extern struct bus_type s5p64x0_subsys;
>   extern struct bus_type s5pv210_subsys;
> -extern struct bus_type exynos_subsys;
>
>   extern void (*s5pc1xx_idle)(void);
>
>

This struct and registration of it do not seem to be needed for anything 
anymore. Would you consider removing it instead?

Best regards,
Tomasz

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/6] ARM: EXYNOS: Staticize exynos_subsys
  2014-04-10  9:17     ` Tomasz Figa
@ 2014-04-10  9:22       ` Sachin Kamat
  -1 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  9:22 UTC (permalink / raw)
  To: Tomasz Figa
  Cc: linux-samsung-soc, linux-arm-kernel, Arnd Bergmann, Kukjin Kim

Hi Tomasz,

On 10 April 2014 14:47, Tomasz Figa <t.figa@samsung.com> wrote:
> Hi Sachin,
>
>
> On 10.04.2014 10:24, Sachin Kamat wrote:
>>
>> 'exynos_subsys' is now local to this file. Make it static
>> and remove the declaration from header file.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> ---
>>   arch/arm/mach-exynos/exynos.c            |    2 +-
>>   arch/arm/plat-samsung/include/plat/cpu.h |    1 -
>>   2 files changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
>> index 6a5fe18ec9b1..0ef42b9efd36 100644
>> --- a/arch/arm/mach-exynos/exynos.c
>> +++ b/arch/arm/mach-exynos/exynos.c
>> @@ -284,7 +284,7 @@ void __init exynos_init_io(void)
>>         of_scan_flat_dt(exynos_fdt_map_sysram, NULL);
>>   }
>>
>> -struct bus_type exynos_subsys = {
>> +static struct bus_type exynos_subsys = {
>>         .name           = "exynos-core",
>>         .dev_name       = "exynos-core",
>>   };
>> diff --git a/arch/arm/plat-samsung/include/plat/cpu.h
>> b/arch/arm/plat-samsung/include/plat/cpu.h
>> index 5992b8dd9b89..930b4be832cd 100644
>> --- a/arch/arm/plat-samsung/include/plat/cpu.h
>> +++ b/arch/arm/plat-samsung/include/plat/cpu.h
>> @@ -239,7 +239,6 @@ extern struct bus_type s3c2443_subsys;
>>   extern struct bus_type s3c6410_subsys;
>>   extern struct bus_type s5p64x0_subsys;
>>   extern struct bus_type s5pv210_subsys;
>> -extern struct bus_type exynos_subsys;
>>
>>   extern void (*s5pc1xx_idle)(void);
>>
>>
>
> This struct and registration of it do not seem to be needed for anything
> anymore. Would you consider removing it instead?

I had considered removing that while I was doing other code consolidation
of this file. However I found that without this, the system failed to boot. I
did not look much into it then. Probably I can revisit it and if it
doesn't cause
any boot issue, will remove it.

-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 2/6] ARM: EXYNOS: Staticize exynos_subsys
@ 2014-04-10  9:22       ` Sachin Kamat
  0 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10  9:22 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tomasz,

On 10 April 2014 14:47, Tomasz Figa <t.figa@samsung.com> wrote:
> Hi Sachin,
>
>
> On 10.04.2014 10:24, Sachin Kamat wrote:
>>
>> 'exynos_subsys' is now local to this file. Make it static
>> and remove the declaration from header file.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> ---
>>   arch/arm/mach-exynos/exynos.c            |    2 +-
>>   arch/arm/plat-samsung/include/plat/cpu.h |    1 -
>>   2 files changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
>> index 6a5fe18ec9b1..0ef42b9efd36 100644
>> --- a/arch/arm/mach-exynos/exynos.c
>> +++ b/arch/arm/mach-exynos/exynos.c
>> @@ -284,7 +284,7 @@ void __init exynos_init_io(void)
>>         of_scan_flat_dt(exynos_fdt_map_sysram, NULL);
>>   }
>>
>> -struct bus_type exynos_subsys = {
>> +static struct bus_type exynos_subsys = {
>>         .name           = "exynos-core",
>>         .dev_name       = "exynos-core",
>>   };
>> diff --git a/arch/arm/plat-samsung/include/plat/cpu.h
>> b/arch/arm/plat-samsung/include/plat/cpu.h
>> index 5992b8dd9b89..930b4be832cd 100644
>> --- a/arch/arm/plat-samsung/include/plat/cpu.h
>> +++ b/arch/arm/plat-samsung/include/plat/cpu.h
>> @@ -239,7 +239,6 @@ extern struct bus_type s3c2443_subsys;
>>   extern struct bus_type s3c6410_subsys;
>>   extern struct bus_type s5p64x0_subsys;
>>   extern struct bus_type s5pv210_subsys;
>> -extern struct bus_type exynos_subsys;
>>
>>   extern void (*s5pc1xx_idle)(void);
>>
>>
>
> This struct and registration of it do not seem to be needed for anything
> anymore. Would you consider removing it instead?

I had considered removing that while I was doing other code consolidation
of this file. However I found that without this, the system failed to boot. I
did not look much into it then. Probably I can revisit it and if it
doesn't cause
any boot issue, will remove it.

-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/6] ARM: EXYNOS: Staticize exynos_subsys
  2014-04-10  9:22       ` Sachin Kamat
@ 2014-04-10 12:32         ` Tomasz Figa
  -1 siblings, 0 replies; 24+ messages in thread
From: Tomasz Figa @ 2014-04-10 12:32 UTC (permalink / raw)
  To: Sachin Kamat
  Cc: linux-samsung-soc, linux-arm-kernel, Arnd Bergmann, Kukjin Kim

On 10.04.2014 11:22, Sachin Kamat wrote:
> Hi Tomasz,
>
> On 10 April 2014 14:47, Tomasz Figa <t.figa@samsung.com> wrote:
>> Hi Sachin,
>>
>>
>> On 10.04.2014 10:24, Sachin Kamat wrote:
>>>
>>> 'exynos_subsys' is now local to this file. Make it static
>>> and remove the declaration from header file.
>>>
>>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>>> ---
>>>    arch/arm/mach-exynos/exynos.c            |    2 +-
>>>    arch/arm/plat-samsung/include/plat/cpu.h |    1 -
>>>    2 files changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
>>> index 6a5fe18ec9b1..0ef42b9efd36 100644
>>> --- a/arch/arm/mach-exynos/exynos.c
>>> +++ b/arch/arm/mach-exynos/exynos.c
>>> @@ -284,7 +284,7 @@ void __init exynos_init_io(void)
>>>          of_scan_flat_dt(exynos_fdt_map_sysram, NULL);
>>>    }
>>>
>>> -struct bus_type exynos_subsys = {
>>> +static struct bus_type exynos_subsys = {
>>>          .name           = "exynos-core",
>>>          .dev_name       = "exynos-core",
>>>    };
>>> diff --git a/arch/arm/plat-samsung/include/plat/cpu.h
>>> b/arch/arm/plat-samsung/include/plat/cpu.h
>>> index 5992b8dd9b89..930b4be832cd 100644
>>> --- a/arch/arm/plat-samsung/include/plat/cpu.h
>>> +++ b/arch/arm/plat-samsung/include/plat/cpu.h
>>> @@ -239,7 +239,6 @@ extern struct bus_type s3c2443_subsys;
>>>    extern struct bus_type s3c6410_subsys;
>>>    extern struct bus_type s5p64x0_subsys;
>>>    extern struct bus_type s5pv210_subsys;
>>> -extern struct bus_type exynos_subsys;
>>>
>>>    extern void (*s5pc1xx_idle)(void);
>>>
>>>
>>
>> This struct and registration of it do not seem to be needed for anything
>> anymore. Would you consider removing it instead?
>
> I had considered removing that while I was doing other code consolidation
> of this file. However I found that without this, the system failed to boot. I
> did not look much into it then. Probably I can revisit it and if it
> doesn't cause
> any boot issue, will remove it.
>

Hmm, I don't see why it could break anything as I can't find any users 
of it. Anyway I just tested removing this code on Exynos4412-trats2 
board and didn't find any problems.

Best regards,
Tomasz

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 2/6] ARM: EXYNOS: Staticize exynos_subsys
@ 2014-04-10 12:32         ` Tomasz Figa
  0 siblings, 0 replies; 24+ messages in thread
From: Tomasz Figa @ 2014-04-10 12:32 UTC (permalink / raw)
  To: linux-arm-kernel

On 10.04.2014 11:22, Sachin Kamat wrote:
> Hi Tomasz,
>
> On 10 April 2014 14:47, Tomasz Figa <t.figa@samsung.com> wrote:
>> Hi Sachin,
>>
>>
>> On 10.04.2014 10:24, Sachin Kamat wrote:
>>>
>>> 'exynos_subsys' is now local to this file. Make it static
>>> and remove the declaration from header file.
>>>
>>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>>> ---
>>>    arch/arm/mach-exynos/exynos.c            |    2 +-
>>>    arch/arm/plat-samsung/include/plat/cpu.h |    1 -
>>>    2 files changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
>>> index 6a5fe18ec9b1..0ef42b9efd36 100644
>>> --- a/arch/arm/mach-exynos/exynos.c
>>> +++ b/arch/arm/mach-exynos/exynos.c
>>> @@ -284,7 +284,7 @@ void __init exynos_init_io(void)
>>>          of_scan_flat_dt(exynos_fdt_map_sysram, NULL);
>>>    }
>>>
>>> -struct bus_type exynos_subsys = {
>>> +static struct bus_type exynos_subsys = {
>>>          .name           = "exynos-core",
>>>          .dev_name       = "exynos-core",
>>>    };
>>> diff --git a/arch/arm/plat-samsung/include/plat/cpu.h
>>> b/arch/arm/plat-samsung/include/plat/cpu.h
>>> index 5992b8dd9b89..930b4be832cd 100644
>>> --- a/arch/arm/plat-samsung/include/plat/cpu.h
>>> +++ b/arch/arm/plat-samsung/include/plat/cpu.h
>>> @@ -239,7 +239,6 @@ extern struct bus_type s3c2443_subsys;
>>>    extern struct bus_type s3c6410_subsys;
>>>    extern struct bus_type s5p64x0_subsys;
>>>    extern struct bus_type s5pv210_subsys;
>>> -extern struct bus_type exynos_subsys;
>>>
>>>    extern void (*s5pc1xx_idle)(void);
>>>
>>>
>>
>> This struct and registration of it do not seem to be needed for anything
>> anymore. Would you consider removing it instead?
>
> I had considered removing that while I was doing other code consolidation
> of this file. However I found that without this, the system failed to boot. I
> did not look much into it then. Probably I can revisit it and if it
> doesn't cause
> any boot issue, will remove it.
>

Hmm, I don't see why it could break anything as I can't find any users 
of it. Anyway I just tested removing this code on Exynos4412-trats2 
board and didn't find any problems.

Best regards,
Tomasz

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/6] ARM: EXYNOS: Staticize exynos_subsys
  2014-04-10 12:32         ` Tomasz Figa
@ 2014-04-10 12:35           ` Sachin Kamat
  -1 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10 12:35 UTC (permalink / raw)
  To: Tomasz Figa
  Cc: linux-samsung-soc, linux-arm-kernel, Arnd Bergmann, Kukjin Kim

On 10 April 2014 18:02, Tomasz Figa <t.figa@samsung.com> wrote:
> On 10.04.2014 11:22, Sachin Kamat wrote:
>>
>> Hi Tomasz,
>>
>> On 10 April 2014 14:47, Tomasz Figa <t.figa@samsung.com> wrote:
>>>
>>> Hi Sachin,
>>>
>>>
>>> On 10.04.2014 10:24, Sachin Kamat wrote:
>>>>
>>>>
>>>> 'exynos_subsys' is now local to this file. Make it static
>>>> and remove the declaration from header file.
>>>>
>>>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>>>> ---
>>>>    arch/arm/mach-exynos/exynos.c            |    2 +-
>>>>    arch/arm/plat-samsung/include/plat/cpu.h |    1 -
>>>>    2 files changed, 1 insertion(+), 2 deletions(-)
>>>>
>>>> diff --git a/arch/arm/mach-exynos/exynos.c
>>>> b/arch/arm/mach-exynos/exynos.c
>>>> index 6a5fe18ec9b1..0ef42b9efd36 100644
>>>> --- a/arch/arm/mach-exynos/exynos.c
>>>> +++ b/arch/arm/mach-exynos/exynos.c
>>>> @@ -284,7 +284,7 @@ void __init exynos_init_io(void)
>>>>          of_scan_flat_dt(exynos_fdt_map_sysram, NULL);
>>>>    }
>>>>
>>>> -struct bus_type exynos_subsys = {
>>>> +static struct bus_type exynos_subsys = {
>>>>          .name           = "exynos-core",
>>>>          .dev_name       = "exynos-core",
>>>>    };
>>>> diff --git a/arch/arm/plat-samsung/include/plat/cpu.h
>>>> b/arch/arm/plat-samsung/include/plat/cpu.h
>>>> index 5992b8dd9b89..930b4be832cd 100644
>>>> --- a/arch/arm/plat-samsung/include/plat/cpu.h
>>>> +++ b/arch/arm/plat-samsung/include/plat/cpu.h
>>>> @@ -239,7 +239,6 @@ extern struct bus_type s3c2443_subsys;
>>>>    extern struct bus_type s3c6410_subsys;
>>>>    extern struct bus_type s5p64x0_subsys;
>>>>    extern struct bus_type s5pv210_subsys;
>>>> -extern struct bus_type exynos_subsys;
>>>>
>>>>    extern void (*s5pc1xx_idle)(void);
>>>>
>>>>
>>>
>>> This struct and registration of it do not seem to be needed for anything
>>> anymore. Would you consider removing it instead?
>>
>>
>> I had considered removing that while I was doing other code consolidation
>> of this file. However I found that without this, the system failed to
>> boot. I
>> did not look much into it then. Probably I can revisit it and if it
>> doesn't cause
>> any boot issue, will remove it.
>>
>
> Hmm, I don't see why it could break anything as I can't find any users of
> it. Anyway I just tested removing this code on Exynos4412-trats2 board and
> didn't find any problems.

Thanks for testing. Let me check at my end on other boards and if it
doesn't cause
any problem, will remove this.

-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 2/6] ARM: EXYNOS: Staticize exynos_subsys
@ 2014-04-10 12:35           ` Sachin Kamat
  0 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-10 12:35 UTC (permalink / raw)
  To: linux-arm-kernel

On 10 April 2014 18:02, Tomasz Figa <t.figa@samsung.com> wrote:
> On 10.04.2014 11:22, Sachin Kamat wrote:
>>
>> Hi Tomasz,
>>
>> On 10 April 2014 14:47, Tomasz Figa <t.figa@samsung.com> wrote:
>>>
>>> Hi Sachin,
>>>
>>>
>>> On 10.04.2014 10:24, Sachin Kamat wrote:
>>>>
>>>>
>>>> 'exynos_subsys' is now local to this file. Make it static
>>>> and remove the declaration from header file.
>>>>
>>>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>>>> ---
>>>>    arch/arm/mach-exynos/exynos.c            |    2 +-
>>>>    arch/arm/plat-samsung/include/plat/cpu.h |    1 -
>>>>    2 files changed, 1 insertion(+), 2 deletions(-)
>>>>
>>>> diff --git a/arch/arm/mach-exynos/exynos.c
>>>> b/arch/arm/mach-exynos/exynos.c
>>>> index 6a5fe18ec9b1..0ef42b9efd36 100644
>>>> --- a/arch/arm/mach-exynos/exynos.c
>>>> +++ b/arch/arm/mach-exynos/exynos.c
>>>> @@ -284,7 +284,7 @@ void __init exynos_init_io(void)
>>>>          of_scan_flat_dt(exynos_fdt_map_sysram, NULL);
>>>>    }
>>>>
>>>> -struct bus_type exynos_subsys = {
>>>> +static struct bus_type exynos_subsys = {
>>>>          .name           = "exynos-core",
>>>>          .dev_name       = "exynos-core",
>>>>    };
>>>> diff --git a/arch/arm/plat-samsung/include/plat/cpu.h
>>>> b/arch/arm/plat-samsung/include/plat/cpu.h
>>>> index 5992b8dd9b89..930b4be832cd 100644
>>>> --- a/arch/arm/plat-samsung/include/plat/cpu.h
>>>> +++ b/arch/arm/plat-samsung/include/plat/cpu.h
>>>> @@ -239,7 +239,6 @@ extern struct bus_type s3c2443_subsys;
>>>>    extern struct bus_type s3c6410_subsys;
>>>>    extern struct bus_type s5p64x0_subsys;
>>>>    extern struct bus_type s5pv210_subsys;
>>>> -extern struct bus_type exynos_subsys;
>>>>
>>>>    extern void (*s5pc1xx_idle)(void);
>>>>
>>>>
>>>
>>> This struct and registration of it do not seem to be needed for anything
>>> anymore. Would you consider removing it instead?
>>
>>
>> I had considered removing that while I was doing other code consolidation
>> of this file. However I found that without this, the system failed to
>> boot. I
>> did not look much into it then. Probably I can revisit it and if it
>> doesn't cause
>> any boot issue, will remove it.
>>
>
> Hmm, I don't see why it could break anything as I can't find any users of
> it. Anyway I just tested removing this code on Exynos4412-trats2 board and
> didn't find any problems.

Thanks for testing. Let me check at my end on other boards and if it
doesn't cause
any problem, will remove this.

-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/6] ARM: EXYNOS: Staticize exynos_subsys
  2014-04-10 12:35           ` Sachin Kamat
@ 2014-04-15  9:06             ` Sachin Kamat
  -1 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-15  9:06 UTC (permalink / raw)
  To: Tomasz Figa
  Cc: linux-samsung-soc, linux-arm-kernel, Arnd Bergmann, Kukjin Kim

Hi Tomasz,

On 10 April 2014 18:05, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> On 10 April 2014 18:02, Tomasz Figa <t.figa@samsung.com> wrote:
>> On 10.04.2014 11:22, Sachin Kamat wrote:
>>>
>>> Hi Tomasz,
>>>
>>> On 10 April 2014 14:47, Tomasz Figa <t.figa@samsung.com> wrote:
<snip>
>> Hmm, I don't see why it could break anything as I can't find any users of
>> it. Anyway I just tested removing this code on Exynos4412-trats2 board and
>> didn't find any problems.
>
> Thanks for testing. Let me check at my end on other boards and if it
> doesn't cause
> any problem, will remove this.

Tested after removing this code on various boards and there doesn't
seem to be any
problems. Will re-send with this change.

-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 2/6] ARM: EXYNOS: Staticize exynos_subsys
@ 2014-04-15  9:06             ` Sachin Kamat
  0 siblings, 0 replies; 24+ messages in thread
From: Sachin Kamat @ 2014-04-15  9:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tomasz,

On 10 April 2014 18:05, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> On 10 April 2014 18:02, Tomasz Figa <t.figa@samsung.com> wrote:
>> On 10.04.2014 11:22, Sachin Kamat wrote:
>>>
>>> Hi Tomasz,
>>>
>>> On 10 April 2014 14:47, Tomasz Figa <t.figa@samsung.com> wrote:
<snip>
>> Hmm, I don't see why it could break anything as I can't find any users of
>> it. Anyway I just tested removing this code on Exynos4412-trats2 board and
>> didn't find any problems.
>
> Thanks for testing. Let me check at my end on other boards and if it
> doesn't cause
> any problem, will remove this.

Tested after removing this code on various boards and there doesn't
seem to be any
problems. Will re-send with this change.

-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2014-04-15  9:06 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-10  8:24 [PATCH 0/6] Further cleanup and enable multiplat build Sachin Kamat
2014-04-10  8:24 ` Sachin Kamat
2014-04-10  8:24 ` [PATCH 1/6] ARM: EXYNOS: Remove duplicate lines in Makefile Sachin Kamat
2014-04-10  8:24   ` Sachin Kamat
2014-04-10  8:24 ` [PATCH 2/6] ARM: EXYNOS: Staticize exynos_subsys Sachin Kamat
2014-04-10  8:24   ` Sachin Kamat
2014-04-10  9:17   ` Tomasz Figa
2014-04-10  9:17     ` Tomasz Figa
2014-04-10  9:22     ` Sachin Kamat
2014-04-10  9:22       ` Sachin Kamat
2014-04-10 12:32       ` Tomasz Figa
2014-04-10 12:32         ` Tomasz Figa
2014-04-10 12:35         ` Sachin Kamat
2014-04-10 12:35           ` Sachin Kamat
2014-04-15  9:06           ` Sachin Kamat
2014-04-15  9:06             ` Sachin Kamat
2014-04-10  8:24 ` [PATCH 3/6] ARM: EXYNOS: Migrate Exynos specific macros from plat to mach Sachin Kamat
2014-04-10  8:24   ` Sachin Kamat
2014-04-10  8:24 ` [PATCH 4/6] ARM: EXYNOS: Remove unnecessary inclusion of cpu.h Sachin Kamat
2014-04-10  8:24   ` Sachin Kamat
2014-04-10  8:24 ` [PATCH 5/6] ARM: EXYNOS: Enable multi-platform build support Sachin Kamat
2014-04-10  8:24   ` Sachin Kamat
2014-04-10  8:24 ` [PATCH 6/6] ARM: multi_v7_defconfig: Enable Exynos platform Sachin Kamat
2014-04-10  8:24   ` Sachin Kamat

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.