]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Add a unified s3c24x0 header file
authorkevin.morfitt@fearnside-systems.co.uk <kevin.morfitt@fearnside-systems.co.uk>
Tue, 17 Nov 2009 09:30:34 +0000 (18:30 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Fri, 20 Nov 2009 10:02:17 +0000 (19:02 +0900)
This patch adds a unified s3c24x0 cpu header file that selects the header
file for the specific s3c24x0 cpu from the SOC and CPU configs defined in
board config file. This removes the current chain of s3c24-type #ifdef's
from the s3c24x0 code.

Signed-off-by: Kevin Morfitt <kevin.morfitt@fearnside-systems.co.uk>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
30 files changed:
board/mpl/vcma9/vcma9.c
board/mpl/vcma9/vcma9.h
board/samsung/smdk2400/smdk2400.c
board/samsung/smdk2410/smdk2410.c
board/sbc2410x/sbc2410x.c
board/trab/cmd_trab.c
board/trab/rs485.c
board/trab/rs485.h
board/trab/trab.c
board/trab/trab_fkt.c
board/trab/tsc2000.c
board/trab/vfd.c
cpu/arm920t/s3c24x0/interrupts.c
cpu/arm920t/s3c24x0/speed.c
cpu/arm920t/s3c24x0/timer.c
cpu/arm920t/s3c24x0/usb.c
cpu/arm920t/s3c24x0/usb_ohci.c
cpu/arm920t/start.S
drivers/i2c/s3c24x0_i2c.c
drivers/mtd/nand/s3c2410_nand.c
drivers/rtc/s3c24x0_rtc.c
drivers/serial/serial_s3c24x0.c
drivers/usb/host/ohci-hcd.c
include/asm-arm/arch-s3c24x0/s3c24x0_cpu.h [new file with mode: 0644]
include/common.h
include/configs/VCMA9.h
include/configs/sbc2410x.h
include/configs/smdk2400.h
include/configs/smdk2410.h
include/configs/trab.h

index f3bd28845319853dd34cac35c57b501f673122ea..1835677a88575d981bb24b275a9384f59691c557 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <common.h>
 #include <netdev.h>
-#include <asm/arch/s3c2410.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include <stdio_dev.h>
 #include <i2c.h>
 
index 2c4305c6a676b68ccabae3ebb6f169e4021ed5e1..94fd2faf3bf9a730eacc801ab9dab9ea35595514 100644 (file)
@@ -25,7 +25,7 @@
  * Global routines used for VCMA9
  *****************************************************************************/
 
-#include <asm/arch/s3c2410.h>
+#include <asm/arch/s3c24x0_cpu.h>
 
 extern int  mem_test(unsigned long start, unsigned long ramsize,int mode);
 
index be0c70ad0257f72b7c266ecd9b35439631b812bb..1294d3f1b1c664d2c2cac1866367ce9db598b0b0 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <common.h>
 #include <netdev.h>
-#include <asm/arch/s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index a8cf2874a92536dd737c5525529c7ef308abca69..5d1a8bb0cf6bfd1b829f0b53582fb61488fd1734 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <common.h>
 #include <netdev.h>
-#include <asm/arch/s3c2410.h>
+#include <asm/arch/s3c24x0_cpu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 6768c028c81ed2236a094af8e122dc330e965bd6..3a936778ec4e65f56d500552848ab7e1f8a34cc3 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <common.h>
 #include <netdev.h>
-#include <asm/arch/s3c2410.h>
+#include <asm/arch/s3c24x0_cpu.h>
 
 #if defined(CONFIG_CMD_NAND)
 #include <linux/mtd/nand.h>
index a01ffcc02a6ea3d72894d4bb0d97d2d498f7cb6a..472d7d81e90d935fabeb3d817c356a1ee1365340 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <common.h>
 #include <command.h>
-#include <asm/arch/s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include <rtc.h>
 
 /*
index f402c599042fcf0a4715186bf27e571de3dea5f8..ad0c13665e41073c0a3f0a088e2304157b0f79fd 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <common.h>
-#include <asm/arch/s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include "rs485.h"
 
 static void rs485_setbrg (void);
index 4a2d83f0bf4894956667b2f9b50483fb831dfb88..16d69bbd5ca4bf62e4092a693dff5d45847706dd 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef _RS485_H_
 #define _RS485_H_
 
-#include <asm/arch/s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 
 int rs485_init (void);
 int rs485_getc (void);
index f8836ff372536f84bf02f56d594fc9f18141ceba..71fd22c158ccfb51586998a5643f7267c05fb68a 100644 (file)
@@ -26,7 +26,7 @@
 #include <common.h>
 #include <netdev.h>
 #include <malloc.h>
-#include <asm/arch/s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include <command.h>
 
 DECLARE_GLOBAL_DATA_PTR;
index 940e12f25cf8d90ea9ae0b66b6adaca6beb158d1..2df9a0440708ab45fb5c80f014b25d22b6f4a4ae 100644 (file)
@@ -26,7 +26,7 @@
 #include <common.h>
 #include <exports.h>
 #include <timestamp.h>
-#include <asm/arch/s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include "tsc2000.h"
 #include "rs485.h"
 
index f757202dee53a5c2a21a16fff36e7c9f19f1ae8d..5890624f0f02c272fd049bd6258cd8e72fa6ef0d 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #include <common.h>
-#include <asm/arch/s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include <asm/io.h>
 #include <div64.h>
 #include "tsc2000.h"
index 8d9a0571612a2ed03ed307ecb45418f39cd0601b..b7eb8cce03ceeb71d64cdb20386d7586ced510d3 100644 (file)
@@ -37,7 +37,7 @@
 #include <stdarg.h>
 #include <linux/types.h>
 #include <stdio_dev.h>
-#include <asm/arch/s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 3e8422e142b2f153a15c843e864820bd960447fe..879fda66a9d056f25fce663efffe3b75a571ccac 100644 (file)
 
 #include <common.h>
 
-#if defined(CONFIG_S3C2400)
-#include <asm/arch/s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <asm/arch/s3c2410.h>
-#endif
+#include <asm/arch/s3c24x0_cpu.h>
 #include <asm/proc-armv/ptrace.h>
 
 void do_irq (struct pt_regs *pt_regs)
index 85c73a3ee114497a51cc3019d526ff5d9c6fa369..b13283a798e884ec141d846278966ea69077c395 100644 (file)
  */
 
 #include <common.h>
-#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB)
+#ifdef CONFIG_S3C24X0
 
 #include <asm/io.h>
-
-#if defined(CONFIG_S3C2400)
-#include <asm/arch/s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <asm/arch/s3c2410.h>
-#endif
+#include <asm/arch/s3c24x0_cpu.h>
 
 #define MPLL 0
 #define UPLL 1
@@ -100,6 +95,4 @@ ulong get_UCLK(void)
        return get_PLLCLK(UPLL);
 }
 
-#endif /* defined(CONFIG_S3C2400) ||
-         defined (CONFIG_S3C2410) ||
-         defined (CONFIG_TRAB) */
+#endif /* CONFIG_S3C24X0 */
index 2667da6e84bd205e70a8941d67eb453021be4f3e..cd06f6b5808288cf6c5ceb5067d0fd38cb98550b 100644 (file)
  */
 
 #include <common.h>
-#if defined(CONFIG_S3C2400) || \
-    defined(CONFIG_S3C2410) || \
-    defined(CONFIG_TRAB)
+#ifdef CONFIG_S3C24X0
 
 #include <asm/io.h>
-
-#if defined(CONFIG_S3C2400)
-#include <asm/arch/s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <asm/arch/s3c2410.h>
-#endif
+#include <asm/arch/s3c24x0_cpu.h>
 
 int timer_load_val = 0;
 static ulong timer_clk;
@@ -225,6 +218,4 @@ void reset_cpu(ulong ignored)
        /*NOTREACHED*/
 }
 
-#endif /* defined(CONFIG_S3C2400)  ||
-         defined (CONFIG_S3C2410) ||
-         defined (CONFIG_TRAB) */
+#endif /* CONFIG_S3C24X0 */
index 5e19cda8fa2f97441cc9af5b2ee9d3c89ee6cb7d..e468ed08fc4d22bf9a3341f50400fa111e79ca38 100644 (file)
 
 #include <common.h>
 
-#if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT)
-# if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410)
-
-#if defined(CONFIG_S3C2400)
-# include <asm/arch/s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-# include <asm/arch/s3c2410.h>
-#endif
+#if defined(CONFIG_USB_OHCI_NEW) && \
+    defined(CONFIG_SYS_USB_OHCI_CPU_INIT) && \
+    defined(CONFIG_S3C24X0)
 
+#include <asm/arch/s3c24x0_cpu.h>
 #include <asm/io.h>
 
 int usb_cpu_init(void)
@@ -70,5 +66,6 @@ int usb_cpu_init_fail(void)
        return 0;
 }
 
-# endif        /* defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) */
-#endif /* defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT) */
+#endif /* defined(CONFIG_USB_OHCI_NEW) && \
+          defined(CONFIG_SYS_USB_OHCI_CPU_INIT) && \
+          defined(CONFIG_S3C24X0) */
index 41119922e1f5a2a9340cfcbbbe98c8532dce29e1..5aa8d64a55cfddeea11014c2256be3a1f6240824 100644 (file)
 #include <common.h>
 /* #include <pci.h> no PCI on the S3C24X0 */
 
-#ifdef CONFIG_USB_OHCI
-
-#if defined(CONFIG_S3C2400)
-#include <asm/arch/s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <asm/arch/s3c2410.h>
-#endif
+#if defined(CONFIG_USB_OHCI) && defined(CONFIG_S3C24X0)
 
+#include <asm/arch/s3c24x0_cpu.h>
 #include <asm/io.h>
 #include <malloc.h>
 #include <usb.h>
@@ -1757,4 +1752,4 @@ int usb_lowlevel_stop(void)
        return 0;
 }
 
-#endif /* CONFIG_USB_OHCI */
+#endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_S3C24X0) */
index 114427a16ed36c618711a3be2007a5ba8c18606e..779f192e519ef000fef340722aabffe30382417c 100644 (file)
@@ -131,7 +131,7 @@ copyex:
        bne     copyex
 #endif
 
-#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410)
+#ifdef CONFIG_S3C24X0
        /* turn off the watchdog */
 
 # if defined(CONFIG_S3C2400)
@@ -166,7 +166,7 @@ copyex:
        ldr     r0, =CLKDIVN
        mov     r1, #3
        str     r1, [r0]
-#endif /* CONFIG_S3C2400 || CONFIG_S3C2410 */
+#endif /* CONFIG_S3C24X0 */
 
        /*
         * we do sys-critical inits only at reboot,
index 8fecc6e3f2c04b6879f9f724e56b062599bd05c0..c8371cf730c0256f911a3a54d05034fe8b584651 100644 (file)
  */
 
 #include <common.h>
-#if defined(CONFIG_S3C2400)
-#include <asm/arch/s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <asm/arch/s3c2410.h>
-#endif
+#include <asm/arch/s3c24x0_cpu.h>
 
 #include <asm/io.h>
 #include <i2c.h>
index 9f02dd8f11839053e9f2cc306926d25e78fd29a8..3f15d2d7cd027152614d8d3d339343885bdf1ddf 100644 (file)
@@ -21,7 +21,7 @@
 #include <common.h>
 
 #include <nand.h>
-#include <asm/arch/s3c2410.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include <asm/io.h>
 
 #define S3C2410_NFCONF_EN          (1<<15)
index 2d78f93aec8578c972461336e811e6c4514e95dd..04de5ca545d52c88780e459bdd785a806d5e822f 100644 (file)
 
 #if (defined(CONFIG_CMD_DATE))
 
-#if defined(CONFIG_S3C2400)
-#include <asm/arch/s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <asm/arch/s3c2410.h>
-#endif
+#include <asm/arch/s3c24x0_cpu.h>
 
 #include <rtc.h>
 #include <asm/io.h>
index 914d07cda3387a38043ad8a70f66ab241401b018..5dd4dd8160469c6d66df82fe141524132cf0d3a2 100644 (file)
  */
 
 #include <common.h>
-#if defined(CONFIG_S3C2400) || defined(CONFIG_TRAB)
-#include <asm/arch/s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <asm/arch/s3c2410.h>
-#endif
+#include <asm/arch/s3c24x0_cpu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 67d478f8701383cce383b55064fc0b39cb1b5ee1..b03a60044e854f66f95ad77d33f0f183a75b55e8 100644 (file)
@@ -65,8 +65,7 @@
 #endif
 
 #if defined(CONFIG_ARM920T) || \
-    defined(CONFIG_S3C2400) || \
-    defined(CONFIG_S3C2410) || \
+    defined(CONFIG_S3C24X0) || \
     defined(CONFIG_S3C6400) || \
     defined(CONFIG_440EP) || \
     defined(CONFIG_PCI_OHCI) || \
diff --git a/include/asm-arm/arch-s3c24x0/s3c24x0_cpu.h b/include/asm-arm/arch-s3c24x0/s3c24x0_cpu.h
new file mode 100644 (file)
index 0000000..c37d4a1
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * (C) Copyright 2009
+ * Kevin Morfitt, Fearnside Systems Ltd, <kevin.morfitt@fearnside-systems.co.uk>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifdef CONFIG_S3C2400
+       #include <asm/arch/s3c2400.h>
+#elif defined CONFIG_S3C2410
+       #include <asm/arch/s3c2410.h>
+#else
+       #error Please define the s3c24x0 cpu type
+#endif
index f7c93bf5a6d427d97108a73146c22482fe285633..8ee80c13910c0f272e3a035d533e28ae84ac6bfb 100644 (file)
@@ -495,8 +495,9 @@ int prt_mpc8220_clks (void);
 ulong  get_OPB_freq (void);
 ulong  get_PCI_freq (void);
 #endif
-#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || \
-       defined(CONFIG_LH7A40X) || defined(CONFIG_S3C6400)
+#if defined(CONFIG_S3C24X0) || \
+    defined(CONFIG_LH7A40X) || \
+    defined(CONFIG_S3C6400)
 ulong  get_FCLK (void);
 ulong  get_HCLK (void);
 ulong  get_PCLK (void);
index 618b7f0a7e0fe10529772cc81bf76d48c8caf1d6..ebc81c40034f5ff798cc08e349c34aa79520dc31 100644 (file)
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_ARM920T         1       /* This is an ARM920T Core      */
-#define        CONFIG_S3C2410          1       /* in a SAMSUNG S3C2410 SoC     */
-#define CONFIG_VCMA9           1       /* on a MPL VCMA9 Board  */
+#define CONFIG_ARM920T 1       /* This is an ARM920T Core      */
+#define CONFIG_S3C24X0 1       /* in a SAMSUNG S3C24x0-type SoC        */
+#define CONFIG_S3C2410 1       /* specifically a SAMSUNG S3C2410 SoC   */
+#define CONFIG_VCMA9   1       /* on a MPL VCMA9 Board  */
 
 /* input clock of PLL */
 #define CONFIG_SYS_CLK_FREQ    12000000/* VCMA9 has 12MHz input clock  */
index e6886cf7f6f86c8ec88d2e408b9e3d394683ce5f..025ad0953c2807115f86aa80897fedb888326e68 100644 (file)
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_ARM920T         1       /* This is an ARM920T Core      */
-#define        CONFIG_S3C2410          1       /* in a SAMSUNG S3C2410 SoC     */
-#define CONFIG_SBC2410X                1       /* on a friendly-arm SBC-2410X Board  */
+#define CONFIG_ARM920T 1       /* This is an ARM920T Core      */
+#define CONFIG_S3C24X0 1       /* in a SAMSUNG S3C24x0-type SoC        */
+#define CONFIG_S3C2410 1       /* specifically a SAMSUNG S3C2410 SoC   */
+#define CONFIG_SBC2410X        1       /* on a friendly-arm SBC-2410X Board  */
 
 /* input clock of PLL */
 #define CONFIG_SYS_CLK_FREQ    12000000/* the SBC2410X has 12MHz input clock */
index a1beb65d0ead377c76d7b86cde730c699dcd83ac..fd51219af4cddd1d2e656030aaa92a9d09f3b057 100644 (file)
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_ARM920T         1       /* This is an ARM920T core      */
-#define CONFIG_S3C2400         1       /* in a SAMSUNG S3C2400 SoC     */
-#define CONFIG_SMDK2400                1       /* on an SAMSUNG SMDK2400 Board */
+#define CONFIG_ARM920T 1       /* This is an ARM920T core      */
+#define CONFIG_S3C24X0 1       /* in a SAMSUNG S3C24x0-type SoC        */
+#define CONFIG_S3C2400 1       /* specifically a SAMSUNG S3C2400 SoC   */
+#define CONFIG_SMDK2400        1       /* on an SAMSUNG SMDK2400 Board */
 
 /* input clock of PLL */
 #define CONFIG_SYS_CLK_FREQ    12000000 /* SMDK2400 has 12 MHz input clock */
index c57751bf90b085f4532c788880b9bdd455d3b59b..f9d1e55186fc783c3280de7eceb26a43a8c84c94 100644 (file)
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_ARM920T         1       /* This is an ARM920T Core      */
-#define        CONFIG_S3C2410          1       /* in a SAMSUNG S3C2410 SoC     */
-#define CONFIG_SMDK2410                1       /* on a SAMSUNG SMDK2410 Board  */
+#define CONFIG_ARM920T 1       /* This is an ARM920T Core      */
+#define CONFIG_S3C24X0 1       /* in a SAMSUNG S3C24x0-type SoC        */
+#define CONFIG_S3C2410 1       /* specifically a SAMSUNG S3C2410 SoC   */
+#define CONFIG_SMDK2410        1       /* on a SAMSUNG SMDK2410 Board  */
 
 /* input clock of PLL */
 #define CONFIG_SYS_CLK_FREQ    12000000/* the SMDK2410 has 12MHz input clock */
index 97f30cea750cf75f7827b2587320a40ded66be0b..9827195e8d59102ece270f38839844046f6c28f8 100644 (file)
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_ARM920T         1       /* This is an arm920t CPU       */
-#define CONFIG_S3C2400         1       /* in a SAMSUNG S3C2400 SoC     */
-#define CONFIG_TRAB            1       /* on a TRAB Board              */
-#undef CONFIG_TRAB_50MHZ               /* run the CPU at 50 MHz        */
+#define CONFIG_ARM920T 1       /* This is an arm920t CPU       */
+#define CONFIG_S3C24X0 1       /* in a SAMSUNG S3C24x0-type SoC        */
+#define CONFIG_S3C2400 1       /* specifically a SAMSUNG S3C2400 SoC   */
+#define CONFIG_TRAB    1       /* on a TRAB Board              */
+#undef CONFIG_TRAB_50MHZ       /* run the CPU at 50 MHz        */
 
 /* automatic software updates (see board/trab/auto_update.c) */
 #define CONFIG_AUTO_UPDATE     1