]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[ARM] S3C64XX: Common init code for S3C6400 and S3C6410
authorBen Dooks <ben-linux@fluff.org>
Tue, 21 Oct 2008 13:06:58 +0000 (14:06 +0100)
committerBen Dooks <ben-linux@fluff.org>
Mon, 15 Dec 2008 21:53:14 +0000 (21:53 +0000)
Add the common initialisation code for both the
S3C6400 and S3C6410, the UART registration.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/mach-s3c6410/Kconfig
arch/arm/plat-s3c64xx/Kconfig
arch/arm/plat-s3c64xx/Makefile
arch/arm/plat-s3c64xx/s3c6400-init.c [new file with mode: 0644]

index c473ba998b3d61e2403847ba1285ef01da7a5a91..eff8248439a493bc36cfb2be7eafaf1e1d3d20d4 100644 (file)
@@ -9,6 +9,7 @@
 
 config CPU_S3C6410
        bool
+       select CPU_S3C6400_INIT
        help
          Enable S3C6410 CPU support
 
index 14d6343b54e802d2d8adfc94083abba8ded53794..8ed2f7b8611aae6688f775b7ed3856d14a5cc643 100644 (file)
@@ -21,4 +21,10 @@ if PLAT_S3C64XX
 
 # Configuration options shared by all S3C64XX implementations
 
+config CPU_S3C6400_INIT
+       bool
+       help
+         Common initialisation code for the S3C6400 that is shared
+         by other CPUs in the series, such as the S3C6410.
+
 endif
index 9be8ed59977fdbdbc27838e980632621d8e3049e..26b5714ee736d4711847085b10732aa50f397de3 100644 (file)
@@ -15,3 +15,7 @@ obj-                          :=
 obj-y                          += dev-uart.o
 obj-y                          += cpu.o
 obj-y                          += irq.o
+
+# CPU support
+
+obj-$(CONFIG_CPU_S3C6400_INIT) += s3c6400-init.o
diff --git a/arch/arm/plat-s3c64xx/s3c6400-init.c b/arch/arm/plat-s3c64xx/s3c6400-init.c
new file mode 100644 (file)
index 0000000..6c28f39
--- /dev/null
@@ -0,0 +1,29 @@
+/* linux/arch/arm/plat-s3c64xx/s3c6400-init.c
+ *
+ * Copyright 2008 Openmoko, Inc.
+ * Copyright 2008 Simtec Electronics
+ *      Ben Dooks <ben@simtec.co.uk>
+ *      http://armlinux.simtec.co.uk/
+ *
+ * S3C6400 - CPU initialisation (common with other S3C64XX chips)
+ *
+ * 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/kernel.h>
+#include <linux/types.h>
+#include <linux/init.h>
+
+#include <plat/cpu.h>
+#include <plat/devs.h>
+#include <plat/s3c6400.h>
+#include <plat/s3c6410.h>
+
+/* uart registration process */
+
+void __init s3c6400_common_init_uarts(struct s3c2410_uartcfg *cfg, int no)
+{
+       s3c24xx_init_uartdevs("s3c6400-uart", s3c64xx_uart_resources, cfg, no);
+}