All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Kukjin Kim <kgene.kim@samsung.com>
Cc: 'Ben Dooks' <ben-linux@fluff.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org
Subject: [PATCH 7/8] S3C2412: move io-init to SoC specific files
Date: Tue, 17 Jan 2012 22:16:06 +0100	[thread overview]
Message-ID: <201201172216.06542.heiko@sntech.de> (raw)
In-Reply-To: <201201172210.51953.heiko@sntech.de>

Move s3c2412 specific code from s3c24xx_init_io to s3c2412.c
and make the s3c2412.h header obsolete.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-s3c2412/clock.c                |    3 +-
 arch/arm/mach-s3c2412/mach-jive.c            |    5 ++-
 arch/arm/mach-s3c2412/mach-smdk2413.c        |    6 ++--
 arch/arm/mach-s3c2412/mach-vstms.c           |    5 +--
 arch/arm/mach-s3c2412/pm.c                   |    2 +-
 arch/arm/mach-s3c2412/s3c2412.c              |   49 +++++++++++++++++++++++++-
 arch/arm/mach-s3c2412/s3c2412.h              |   30 ++++++++++++++++
 arch/arm/plat-s3c24xx/cpu.c                  |   35 +------------------
 arch/arm/plat-samsung/include/plat/s3c2412.h |   32 -----------------
 9 files changed, 90 insertions(+), 77 deletions(-)
 create mode 100644 arch/arm/mach-s3c2412/s3c2412.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/s3c2412.h

diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c
index d10b695..408207d 100644
--- a/arch/arm/mach-s3c2412/clock.c
+++ b/arch/arm/mach-s3c2412/clock.c
@@ -41,10 +41,11 @@
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 
-#include <plat/s3c2412.h>
 #include <plat/clock.h>
 #include <plat/cpu.h>
 
+#include "s3c2412.h"
+
 /* We currently have to assume that the system is running
  * from the XTPll input, and that all ***REFCLKs are being
  * fed from it, as we cannot read the state of OM[4] from
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c
index ae73ba3..ad63ba5 100644
--- a/arch/arm/mach-s3c2412/mach-jive.c
+++ b/arch/arm/mach-s3c2412/mach-jive.c
@@ -48,7 +48,6 @@
 #include <linux/mtd/nand_ecc.h>
 #include <linux/mtd/partitions.h>
 
-#include <plat/s3c2412.h>
 #include <plat/gpio-cfg.h>
 #include <plat/clock.h>
 #include <plat/devs.h>
@@ -56,6 +55,8 @@
 #include <plat/pm.h>
 #include <plat/udc.h>
 
+#include "s3c2412.h"
+
 static struct map_desc jive_iodesc[] __initdata = {
 };
 
@@ -503,7 +504,7 @@ static struct syscore_ops jive_pm_syscore_ops = {
 
 static void __init jive_map_io(void)
 {
-	s3c24xx_init_io(jive_iodesc, ARRAY_SIZE(jive_iodesc));
+	s3c2412_init_io(jive_iodesc, ARRAY_SIZE(jive_iodesc));
 	s3c24xx_init_clocks(12000000);
 	s3c24xx_init_uarts(jive_uartcfgs, ARRAY_SIZE(jive_uartcfgs));
 }
diff --git a/arch/arm/mach-s3c2412/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c
index b11451b..a2804ab 100644
--- a/arch/arm/mach-s3c2412/mach-smdk2413.c
+++ b/arch/arm/mach-s3c2412/mach-smdk2413.c
@@ -42,14 +42,14 @@
 #include <plat/iic.h>
 #include <mach/fb.h>
 
-#include <plat/s3c2410.h>
-#include <plat/s3c2412.h>
 #include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 
 #include <plat/common-smdk.h>
 
+#include "s3c2412.h"
+
 static struct map_desc smdk2413_iodesc[] __initdata = {
 };
 
@@ -104,7 +104,7 @@ static void __init smdk2413_fixup(struct tag *tags, char **cmdline,
 
 static void __init smdk2413_map_io(void)
 {
-	s3c24xx_init_io(smdk2413_iodesc, ARRAY_SIZE(smdk2413_iodesc));
+	s3c2412_init_io(smdk2413_iodesc, ARRAY_SIZE(smdk2413_iodesc));
 	s3c24xx_init_clocks(12000000);
 	s3c24xx_init_uarts(smdk2413_uartcfgs, ARRAY_SIZE(smdk2413_uartcfgs));
 }
diff --git a/arch/arm/mach-s3c2412/mach-vstms.c b/arch/arm/mach-s3c2412/mach-vstms.c
index 94bfaa1..b4cb265 100644
--- a/arch/arm/mach-s3c2412/mach-vstms.c
+++ b/arch/arm/mach-s3c2412/mach-vstms.c
@@ -42,12 +42,11 @@
 #include <plat/iic.h>
 #include <plat/nand.h>
 
-#include <plat/s3c2410.h>
-#include <plat/s3c2412.h>
 #include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 
+#include "s3c2412.h"
 
 static struct map_desc vstms_iodesc[] __initdata = {
 };
@@ -141,7 +140,7 @@ static void __init vstms_fixup(struct tag *tags, char **cmdline,
 
 static void __init vstms_map_io(void)
 {
-	s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc));
+	s3c2412_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc));
 	s3c24xx_init_clocks(12000000);
 	s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs));
 }
diff --git a/arch/arm/mach-s3c2412/pm.c b/arch/arm/mach-s3c2412/pm.c
index d1adfa6..419597f 100644
--- a/arch/arm/mach-s3c2412/pm.c
+++ b/arch/arm/mach-s3c2412/pm.c
@@ -33,7 +33,7 @@
 #include <plat/cpu.h>
 #include <plat/pm.h>
 
-#include <plat/s3c2412.h>
+#include "s3c2412.h"
 
 extern void s3c2412_sleep_enter(void);
 
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c
index aff6e85..a7d0f47 100644
--- a/arch/arm/mach-s3c2412/s3c2412.c
+++ b/arch/arm/mach-s3c2412/s3c2412.c
@@ -45,7 +45,6 @@
 #include <plat/regs-spi.h>
 #include <mach/regs-s3c2412.h>
 
-#include <plat/s3c2412.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/clock.h>
@@ -53,6 +52,54 @@
 #include <plat/pll.h>
 #include <plat/nand-core.h>
 
+#include "s3c2412.h"
+
+/* table of supported CPUs */
+
+static const char name_s3c2412[]  = "S3C2412";
+
+static struct cpu_table cpu_ids[] __initdata = {
+	{
+		.idcode		= 0x32412001,
+		.idmask		= 0xffffffff,
+		.map_io		= s3c2412_map_io,
+		.init_clocks	= s3c2412_init_clocks,
+		.init_uarts	= s3c2412_init_uarts,
+		.init		= s3c2412_init,
+		.name		= name_s3c2412,
+	},
+	{			/* a newer version of the s3c2412 */
+		.idcode		= 0x32412003,
+		.idmask		= 0xffffffff,
+		.map_io		= s3c2412_map_io,
+		.init_clocks	= s3c2412_init_clocks,
+		.init_uarts	= s3c2412_init_uarts,
+		.init		= s3c2412_init,
+		.name		= name_s3c2412,
+	},
+};
+
+/* minimal IO mapping */
+
+static struct map_desc s3c_iodesc[] __initdata = {
+	IODESC_ENT(GPIO),
+	IODESC_ENT(IRQ),
+	IODESC_ENT(MEMCTRL),
+	IODESC_ENT(UART)
+};
+
+void __init s3c2412_init_io(struct map_desc *mach_desc, int size)
+{
+	/* initialise the io descriptors we need for initialisation */
+	iotable_init(mach_desc, size);
+	iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
+
+	samsung_cpu_id = __raw_readl(S3C2412_GSTATUS1);
+	s3c24xx_init_cpu();
+
+	s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
+}
+
 #ifndef CONFIG_CPU_S3C2412_ONLY
 void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO;
 
diff --git a/arch/arm/mach-s3c2412/s3c2412.h b/arch/arm/mach-s3c2412/s3c2412.h
new file mode 100644
index 0000000..aeb85ee
--- /dev/null
+++ b/arch/arm/mach-s3c2412/s3c2412.h
@@ -0,0 +1,30 @@
+/* linux/arch/arm/plat-samsung/include/plat/s3c2412.h
+ *
+ * Copyright (c) 2006 Simtec Electronics
+ *	Ben Dooks <ben@simtec.co.uk>
+ *
+ * Header file for s3c2412 cpu support
+ *
+ * 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.
+*/
+
+#ifndef __ARCH_ARM_MACH_S3C2412_S3C2412_H
+#define __ARCH_ARM_MACH_S3C2412_S3C2412_H
+
+extern  int s3c2412_init(void);
+
+extern void s3c2412_map_io(void);
+
+extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
+
+extern void s3c2412_init_clocks(int xtal);
+
+extern  int s3c2412_baseclk_add(void);
+
+extern void s3c2412_restart(char mode, const char *cmd);
+
+extern void s3c2412_init_io(struct map_desc *mach_desc, int size);
+
+#endif
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index 316203e..a0eb4d0 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -45,12 +45,10 @@
 #include <plat/devs.h>
 #include <plat/clock.h>
 #include <plat/s3c2410.h>
-#include <plat/s3c2412.h>
 
 /* table of supported CPUs */
 
 static const char name_s3c2410[]  = "S3C2410";
-static const char name_s3c2412[]  = "S3C2412";
 static const char name_s3c2410a[] = "S3C2410A";
 
 static struct cpu_table cpu_ids[] __initdata = {
@@ -72,24 +70,6 @@ static struct cpu_table cpu_ids[] __initdata = {
 		.init		= s3c2410a_init,
 		.name		= name_s3c2410a
 	},
-	{
-		.idcode		= 0x32412001,
-		.idmask		= 0xffffffff,
-		.map_io		= s3c2412_map_io,
-		.init_clocks	= s3c2412_init_clocks,
-		.init_uarts	= s3c2412_init_uarts,
-		.init		= s3c2412_init,
-		.name		= name_s3c2412,
-	},
-	{			/* a newer version of the s3c2412 */
-		.idcode		= 0x32412003,
-		.idmask		= 0xffffffff,
-		.map_io		= s3c2412_map_io,
-		.init_clocks	= s3c2412_init_clocks,
-		.init_uarts	= s3c2412_init_uarts,
-		.init		= s3c2412_init,
-		.name		= name_s3c2412,
-	},
 };
 
 /* minimal IO mapping */
@@ -103,15 +83,6 @@ static struct map_desc s3c_iodesc[] __initdata = {
 
 /* read cpu identificaiton code */
 
-static unsigned long s3c24xx_read_idcode_v5(void)
-{
-#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
-	return __raw_readl(S3C2412_GSTATUS1);
-#else
-	return 1UL;	/* don't look like an 2400 */
-#endif
-}
-
 static unsigned long s3c24xx_read_idcode_v4(void)
 {
 	return __raw_readl(S3C2410_GSTATUS1);
@@ -123,11 +94,7 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
 	iotable_init(mach_desc, size);
 	iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
 
-	if (cpu_architecture() >= CPU_ARCH_ARMv5) {
-		samsung_cpu_id = s3c24xx_read_idcode_v5();
-	} else {
-		samsung_cpu_id = s3c24xx_read_idcode_v4();
-	}
+	samsung_cpu_id = s3c24xx_read_idcode_v4();
 	s3c24xx_init_cpu();
 
 	s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
diff --git a/arch/arm/plat-samsung/include/plat/s3c2412.h b/arch/arm/plat-samsung/include/plat/s3c2412.h
deleted file mode 100644
index cbae50d..0000000
--- a/arch/arm/plat-samsung/include/plat/s3c2412.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* linux/arch/arm/plat-samsung/include/plat/s3c2412.h
- *
- * Copyright (c) 2006 Simtec Electronics
- *	Ben Dooks <ben@simtec.co.uk>
- *
- * Header file for s3c2412 cpu support
- *
- * 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.
-*/
-
-#ifdef CONFIG_CPU_S3C2412
-
-extern  int s3c2412_init(void);
-
-extern void s3c2412_map_io(void);
-
-extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
-
-extern void s3c2412_init_clocks(int xtal);
-
-extern  int s3c2412_baseclk_add(void);
-
-extern void s3c2412_restart(char mode, const char *cmd);
-#else
-#define s3c2412_init_clocks NULL
-#define s3c2412_init_uarts NULL
-#define s3c2412_map_io NULL
-#define s3c2412_init NULL
-#define s3c2412_restart NULL
-#endif
-- 
1.7.2.3

WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/8] S3C2412: move io-init to SoC specific files
Date: Tue, 17 Jan 2012 22:16:06 +0100	[thread overview]
Message-ID: <201201172216.06542.heiko@sntech.de> (raw)
In-Reply-To: <201201172210.51953.heiko@sntech.de>

Move s3c2412 specific code from s3c24xx_init_io to s3c2412.c
and make the s3c2412.h header obsolete.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-s3c2412/clock.c                |    3 +-
 arch/arm/mach-s3c2412/mach-jive.c            |    5 ++-
 arch/arm/mach-s3c2412/mach-smdk2413.c        |    6 ++--
 arch/arm/mach-s3c2412/mach-vstms.c           |    5 +--
 arch/arm/mach-s3c2412/pm.c                   |    2 +-
 arch/arm/mach-s3c2412/s3c2412.c              |   49 +++++++++++++++++++++++++-
 arch/arm/mach-s3c2412/s3c2412.h              |   30 ++++++++++++++++
 arch/arm/plat-s3c24xx/cpu.c                  |   35 +------------------
 arch/arm/plat-samsung/include/plat/s3c2412.h |   32 -----------------
 9 files changed, 90 insertions(+), 77 deletions(-)
 create mode 100644 arch/arm/mach-s3c2412/s3c2412.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/s3c2412.h

diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c
index d10b695..408207d 100644
--- a/arch/arm/mach-s3c2412/clock.c
+++ b/arch/arm/mach-s3c2412/clock.c
@@ -41,10 +41,11 @@
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 
-#include <plat/s3c2412.h>
 #include <plat/clock.h>
 #include <plat/cpu.h>
 
+#include "s3c2412.h"
+
 /* We currently have to assume that the system is running
  * from the XTPll input, and that all ***REFCLKs are being
  * fed from it, as we cannot read the state of OM[4] from
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c
index ae73ba3..ad63ba5 100644
--- a/arch/arm/mach-s3c2412/mach-jive.c
+++ b/arch/arm/mach-s3c2412/mach-jive.c
@@ -48,7 +48,6 @@
 #include <linux/mtd/nand_ecc.h>
 #include <linux/mtd/partitions.h>
 
-#include <plat/s3c2412.h>
 #include <plat/gpio-cfg.h>
 #include <plat/clock.h>
 #include <plat/devs.h>
@@ -56,6 +55,8 @@
 #include <plat/pm.h>
 #include <plat/udc.h>
 
+#include "s3c2412.h"
+
 static struct map_desc jive_iodesc[] __initdata = {
 };
 
@@ -503,7 +504,7 @@ static struct syscore_ops jive_pm_syscore_ops = {
 
 static void __init jive_map_io(void)
 {
-	s3c24xx_init_io(jive_iodesc, ARRAY_SIZE(jive_iodesc));
+	s3c2412_init_io(jive_iodesc, ARRAY_SIZE(jive_iodesc));
 	s3c24xx_init_clocks(12000000);
 	s3c24xx_init_uarts(jive_uartcfgs, ARRAY_SIZE(jive_uartcfgs));
 }
diff --git a/arch/arm/mach-s3c2412/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c
index b11451b..a2804ab 100644
--- a/arch/arm/mach-s3c2412/mach-smdk2413.c
+++ b/arch/arm/mach-s3c2412/mach-smdk2413.c
@@ -42,14 +42,14 @@
 #include <plat/iic.h>
 #include <mach/fb.h>
 
-#include <plat/s3c2410.h>
-#include <plat/s3c2412.h>
 #include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 
 #include <plat/common-smdk.h>
 
+#include "s3c2412.h"
+
 static struct map_desc smdk2413_iodesc[] __initdata = {
 };
 
@@ -104,7 +104,7 @@ static void __init smdk2413_fixup(struct tag *tags, char **cmdline,
 
 static void __init smdk2413_map_io(void)
 {
-	s3c24xx_init_io(smdk2413_iodesc, ARRAY_SIZE(smdk2413_iodesc));
+	s3c2412_init_io(smdk2413_iodesc, ARRAY_SIZE(smdk2413_iodesc));
 	s3c24xx_init_clocks(12000000);
 	s3c24xx_init_uarts(smdk2413_uartcfgs, ARRAY_SIZE(smdk2413_uartcfgs));
 }
diff --git a/arch/arm/mach-s3c2412/mach-vstms.c b/arch/arm/mach-s3c2412/mach-vstms.c
index 94bfaa1..b4cb265 100644
--- a/arch/arm/mach-s3c2412/mach-vstms.c
+++ b/arch/arm/mach-s3c2412/mach-vstms.c
@@ -42,12 +42,11 @@
 #include <plat/iic.h>
 #include <plat/nand.h>
 
-#include <plat/s3c2410.h>
-#include <plat/s3c2412.h>
 #include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 
+#include "s3c2412.h"
 
 static struct map_desc vstms_iodesc[] __initdata = {
 };
@@ -141,7 +140,7 @@ static void __init vstms_fixup(struct tag *tags, char **cmdline,
 
 static void __init vstms_map_io(void)
 {
-	s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc));
+	s3c2412_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc));
 	s3c24xx_init_clocks(12000000);
 	s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs));
 }
diff --git a/arch/arm/mach-s3c2412/pm.c b/arch/arm/mach-s3c2412/pm.c
index d1adfa6..419597f 100644
--- a/arch/arm/mach-s3c2412/pm.c
+++ b/arch/arm/mach-s3c2412/pm.c
@@ -33,7 +33,7 @@
 #include <plat/cpu.h>
 #include <plat/pm.h>
 
-#include <plat/s3c2412.h>
+#include "s3c2412.h"
 
 extern void s3c2412_sleep_enter(void);
 
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c
index aff6e85..a7d0f47 100644
--- a/arch/arm/mach-s3c2412/s3c2412.c
+++ b/arch/arm/mach-s3c2412/s3c2412.c
@@ -45,7 +45,6 @@
 #include <plat/regs-spi.h>
 #include <mach/regs-s3c2412.h>
 
-#include <plat/s3c2412.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/clock.h>
@@ -53,6 +52,54 @@
 #include <plat/pll.h>
 #include <plat/nand-core.h>
 
+#include "s3c2412.h"
+
+/* table of supported CPUs */
+
+static const char name_s3c2412[]  = "S3C2412";
+
+static struct cpu_table cpu_ids[] __initdata = {
+	{
+		.idcode		= 0x32412001,
+		.idmask		= 0xffffffff,
+		.map_io		= s3c2412_map_io,
+		.init_clocks	= s3c2412_init_clocks,
+		.init_uarts	= s3c2412_init_uarts,
+		.init		= s3c2412_init,
+		.name		= name_s3c2412,
+	},
+	{			/* a newer version of the s3c2412 */
+		.idcode		= 0x32412003,
+		.idmask		= 0xffffffff,
+		.map_io		= s3c2412_map_io,
+		.init_clocks	= s3c2412_init_clocks,
+		.init_uarts	= s3c2412_init_uarts,
+		.init		= s3c2412_init,
+		.name		= name_s3c2412,
+	},
+};
+
+/* minimal IO mapping */
+
+static struct map_desc s3c_iodesc[] __initdata = {
+	IODESC_ENT(GPIO),
+	IODESC_ENT(IRQ),
+	IODESC_ENT(MEMCTRL),
+	IODESC_ENT(UART)
+};
+
+void __init s3c2412_init_io(struct map_desc *mach_desc, int size)
+{
+	/* initialise the io descriptors we need for initialisation */
+	iotable_init(mach_desc, size);
+	iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
+
+	samsung_cpu_id = __raw_readl(S3C2412_GSTATUS1);
+	s3c24xx_init_cpu();
+
+	s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
+}
+
 #ifndef CONFIG_CPU_S3C2412_ONLY
 void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO;
 
diff --git a/arch/arm/mach-s3c2412/s3c2412.h b/arch/arm/mach-s3c2412/s3c2412.h
new file mode 100644
index 0000000..aeb85ee
--- /dev/null
+++ b/arch/arm/mach-s3c2412/s3c2412.h
@@ -0,0 +1,30 @@
+/* linux/arch/arm/plat-samsung/include/plat/s3c2412.h
+ *
+ * Copyright (c) 2006 Simtec Electronics
+ *	Ben Dooks <ben@simtec.co.uk>
+ *
+ * Header file for s3c2412 cpu support
+ *
+ * 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.
+*/
+
+#ifndef __ARCH_ARM_MACH_S3C2412_S3C2412_H
+#define __ARCH_ARM_MACH_S3C2412_S3C2412_H
+
+extern  int s3c2412_init(void);
+
+extern void s3c2412_map_io(void);
+
+extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
+
+extern void s3c2412_init_clocks(int xtal);
+
+extern  int s3c2412_baseclk_add(void);
+
+extern void s3c2412_restart(char mode, const char *cmd);
+
+extern void s3c2412_init_io(struct map_desc *mach_desc, int size);
+
+#endif
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index 316203e..a0eb4d0 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -45,12 +45,10 @@
 #include <plat/devs.h>
 #include <plat/clock.h>
 #include <plat/s3c2410.h>
-#include <plat/s3c2412.h>
 
 /* table of supported CPUs */
 
 static const char name_s3c2410[]  = "S3C2410";
-static const char name_s3c2412[]  = "S3C2412";
 static const char name_s3c2410a[] = "S3C2410A";
 
 static struct cpu_table cpu_ids[] __initdata = {
@@ -72,24 +70,6 @@ static struct cpu_table cpu_ids[] __initdata = {
 		.init		= s3c2410a_init,
 		.name		= name_s3c2410a
 	},
-	{
-		.idcode		= 0x32412001,
-		.idmask		= 0xffffffff,
-		.map_io		= s3c2412_map_io,
-		.init_clocks	= s3c2412_init_clocks,
-		.init_uarts	= s3c2412_init_uarts,
-		.init		= s3c2412_init,
-		.name		= name_s3c2412,
-	},
-	{			/* a newer version of the s3c2412 */
-		.idcode		= 0x32412003,
-		.idmask		= 0xffffffff,
-		.map_io		= s3c2412_map_io,
-		.init_clocks	= s3c2412_init_clocks,
-		.init_uarts	= s3c2412_init_uarts,
-		.init		= s3c2412_init,
-		.name		= name_s3c2412,
-	},
 };
 
 /* minimal IO mapping */
@@ -103,15 +83,6 @@ static struct map_desc s3c_iodesc[] __initdata = {
 
 /* read cpu identificaiton code */
 
-static unsigned long s3c24xx_read_idcode_v5(void)
-{
-#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
-	return __raw_readl(S3C2412_GSTATUS1);
-#else
-	return 1UL;	/* don't look like an 2400 */
-#endif
-}
-
 static unsigned long s3c24xx_read_idcode_v4(void)
 {
 	return __raw_readl(S3C2410_GSTATUS1);
@@ -123,11 +94,7 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
 	iotable_init(mach_desc, size);
 	iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
 
-	if (cpu_architecture() >= CPU_ARCH_ARMv5) {
-		samsung_cpu_id = s3c24xx_read_idcode_v5();
-	} else {
-		samsung_cpu_id = s3c24xx_read_idcode_v4();
-	}
+	samsung_cpu_id = s3c24xx_read_idcode_v4();
 	s3c24xx_init_cpu();
 
 	s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
diff --git a/arch/arm/plat-samsung/include/plat/s3c2412.h b/arch/arm/plat-samsung/include/plat/s3c2412.h
deleted file mode 100644
index cbae50d..0000000
--- a/arch/arm/plat-samsung/include/plat/s3c2412.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* linux/arch/arm/plat-samsung/include/plat/s3c2412.h
- *
- * Copyright (c) 2006 Simtec Electronics
- *	Ben Dooks <ben@simtec.co.uk>
- *
- * Header file for s3c2412 cpu support
- *
- * 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.
-*/
-
-#ifdef CONFIG_CPU_S3C2412
-
-extern  int s3c2412_init(void);
-
-extern void s3c2412_map_io(void);
-
-extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
-
-extern void s3c2412_init_clocks(int xtal);
-
-extern  int s3c2412_baseclk_add(void);
-
-extern void s3c2412_restart(char mode, const char *cmd);
-#else
-#define s3c2412_init_clocks NULL
-#define s3c2412_init_uarts NULL
-#define s3c2412_map_io NULL
-#define s3c2412_init NULL
-#define s3c2412_restart NULL
-#endif
-- 
1.7.2.3

  parent reply	other threads:[~2012-01-17 21:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 21:10 [PATCH v2 0/8] S3C24XX: remove global plat/s3c24??.h SoC-headers Heiko Stübner
2012-01-17 21:10 ` Heiko Stübner
2012-01-17 21:11 ` [PATCH 1/8] S3C24XX: Remove extern declaration of clk_msysclk Heiko Stübner
2012-01-17 21:11   ` Heiko Stübner
2012-01-17 21:12 ` [PATCH 2/8] S3C24XX: move common S3C2443 clock definitions to clock.h Heiko Stübner
2012-01-17 21:12   ` Heiko Stübner
2012-01-17 21:12 ` [PATCH 3/8] S3C2410: move s3c2410_baseclk_add " Heiko Stübner
2012-01-17 21:12   ` Heiko Stübner
2012-01-17 21:13 ` [PATCH 4/8] S3C2416: move io-init to SoC specific files Heiko Stübner
2012-01-17 21:13   ` Heiko Stübner
2012-01-17 21:43   ` Russell King - ARM Linux
2012-01-17 21:43     ` Russell King - ARM Linux
2012-01-17 22:23     ` Heiko Stübner
2012-01-17 22:23       ` Heiko Stübner
2012-01-17 21:14 ` [PATCH 5/8] S3C2443: " Heiko Stübner
2012-01-17 21:14   ` Heiko Stübner
2012-01-17 21:15 ` [PATCH 6/8] S3C2440: " Heiko Stübner
2012-01-17 21:15   ` Heiko Stübner
2012-01-17 21:16 ` Heiko Stübner [this message]
2012-01-17 21:16   ` [PATCH 7/8] S3C2412: " Heiko Stübner
2012-01-17 21:50   ` Russell King - ARM Linux
2012-01-17 21:50     ` Russell King - ARM Linux
2012-01-17 21:16 ` [PATCH 8/8] S3C2410: " Heiko Stübner
2012-01-17 21:16   ` Heiko Stübner
2012-01-17 21:58 ` [PATCH v2 0/8] S3C24XX: remove global plat/s3c24??.h SoC-headers Russell King - ARM Linux
2012-01-17 21:58   ` Russell King - ARM Linux
  -- strict thread matches above, loose matches on Subject: below --
2012-01-06 23:22 [PATCH " Heiko Stübner
2012-01-06 23:28 ` [PATCH 7/8] S3C2412: move io-init to SoC specific files Heiko Stübner
2012-01-06 23:28   ` Heiko Stübner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201201172216.06542.heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=ben-linux@fluff.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.