summaryrefslogtreecommitdiff
path: root/cpu/arm920t/s3c24x0
diff options
context:
space:
mode:
authorkevin.morfitt@fearnside-systems.co.uk <kevin.morfitt@fearnside-systems.co.uk>2009-11-17 18:30:34 +0900
committerMinkyu Kang <mk7.kang@samsung.com>2009-11-20 19:02:17 +0900
commit33bf447477ff38eda46529b346677856b53e0f87 (patch)
tree08752d8593dfa6784b164493c5b789e6c21d3800 /cpu/arm920t/s3c24x0
parent1f8b91962941d6a1bfff4993a2f3ed125f7c7e56 (diff)
downloadu-boot-imx-33bf447477ff38eda46529b346677856b53e0f87.zip
u-boot-imx-33bf447477ff38eda46529b346677856b53e0f87.tar.gz
u-boot-imx-33bf447477ff38eda46529b346677856b53e0f87.tar.bz2
Add a unified s3c24x0 header file
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>
Diffstat (limited to 'cpu/arm920t/s3c24x0')
-rw-r--r--cpu/arm920t/s3c24x0/interrupts.c6
-rw-r--r--cpu/arm920t/s3c24x0/speed.c13
-rw-r--r--cpu/arm920t/s3c24x0/timer.c15
-rw-r--r--cpu/arm920t/s3c24x0/usb.c17
-rw-r--r--cpu/arm920t/s3c24x0/usb_ohci.c11
5 files changed, 17 insertions, 45 deletions
diff --git a/cpu/arm920t/s3c24x0/interrupts.c b/cpu/arm920t/s3c24x0/interrupts.c
index 3e8422e..879fda6 100644
--- a/cpu/arm920t/s3c24x0/interrupts.c
+++ b/cpu/arm920t/s3c24x0/interrupts.c
@@ -31,11 +31,7 @@
#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)
diff --git a/cpu/arm920t/s3c24x0/speed.c b/cpu/arm920t/s3c24x0/speed.c
index 85c73a3..b13283a 100644
--- a/cpu/arm920t/s3c24x0/speed.c
+++ b/cpu/arm920t/s3c24x0/speed.c
@@ -30,15 +30,10 @@
*/
#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 */
diff --git a/cpu/arm920t/s3c24x0/timer.c b/cpu/arm920t/s3c24x0/timer.c
index 2667da6..cd06f6b 100644
--- a/cpu/arm920t/s3c24x0/timer.c
+++ b/cpu/arm920t/s3c24x0/timer.c
@@ -30,17 +30,10 @@
*/
#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 */
diff --git a/cpu/arm920t/s3c24x0/usb.c b/cpu/arm920t/s3c24x0/usb.c
index 5e19cda..e468ed0 100644
--- a/cpu/arm920t/s3c24x0/usb.c
+++ b/cpu/arm920t/s3c24x0/usb.c
@@ -23,15 +23,11 @@
#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) */
diff --git a/cpu/arm920t/s3c24x0/usb_ohci.c b/cpu/arm920t/s3c24x0/usb_ohci.c
index 4111992..5aa8d64 100644
--- a/cpu/arm920t/s3c24x0/usb_ohci.c
+++ b/cpu/arm920t/s3c24x0/usb_ohci.c
@@ -36,14 +36,9 @@
#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) */