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>
master
kevin.morfitt@fearnside-systems.co.uk 15 years ago committed by Tom Rix
parent a59a23d68a
commit ac67804fbb
  1. 2
      board/mpl/vcma9/vcma9.c
  2. 2
      board/mpl/vcma9/vcma9.h
  3. 2
      board/samsung/smdk2400/smdk2400.c
  4. 2
      board/samsung/smdk2410/smdk2410.c
  5. 2
      board/sbc2410x/sbc2410x.c
  6. 2
      board/trab/cmd_trab.c
  7. 2
      board/trab/rs485.c
  8. 2
      board/trab/rs485.h
  9. 2
      board/trab/trab.c
  10. 2
      board/trab/trab_fkt.c
  11. 2
      board/trab/tsc2000.c
  12. 2
      board/trab/vfd.c
  13. 6
      cpu/arm920t/s3c24x0/interrupts.c
  14. 13
      cpu/arm920t/s3c24x0/speed.c
  15. 15
      cpu/arm920t/s3c24x0/timer.c
  16. 17
      cpu/arm920t/s3c24x0/usb.c
  17. 11
      cpu/arm920t/s3c24x0/usb_ohci.c
  18. 4
      cpu/arm920t/start.S
  19. 6
      drivers/i2c/s3c24x0_i2c.c
  20. 2
      drivers/mtd/nand/s3c2410_nand.c
  21. 6
      drivers/rtc/s3c24x0_rtc.c
  22. 6
      drivers/serial/serial_s3c24x0.c
  23. 3
      drivers/usb/host/ohci-hcd.c
  24. 27
      include/asm-arm/arch-s3c24x0/s3c24x0_cpu.h
  25. 5
      include/common.h
  26. 7
      include/configs/VCMA9.h
  27. 7
      include/configs/sbc2410x.h
  28. 7
      include/configs/smdk2400.h
  29. 7
      include/configs/smdk2410.h
  30. 9
      include/configs/trab.h

@ -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>

@ -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);

@ -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;

@ -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;

@ -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>

@ -25,7 +25,7 @@
#include <common.h>
#include <command.h>
#include <asm/arch/s3c2400.h>
#include <asm/arch/s3c24x0_cpu.h>
#include <rtc.h>
/*

@ -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);

@ -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);

@ -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;

@ -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"

@ -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"

@ -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;

@ -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)

@ -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 */

@ -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 */

@ -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) */

@ -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) */

@ -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,

@ -27,11 +27,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/io.h>
#include <i2c.h>

@ -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)

@ -30,11 +30,7 @@
#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>

@ -19,11 +19,7 @@
*/
#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;

@ -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) || \

@ -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

@ -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);

@ -33,9 +33,10 @@
* 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 */

@ -43,9 +43,10 @@
* 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 */

@ -34,9 +34,10 @@
* 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 */

@ -33,9 +33,10 @@
* 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 */

@ -40,10 +40,11 @@
* 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

Loading…
Cancel
Save