Commit 0c88346f authored by Ben Dooks's avatar Ben Dooks Committed by Russell King

[ARM PATCH] 2376/1: S3C2410 - cleanup 2410/2440 distinctions, fix build

Patch from Ben Dooks

This cleans up a few items in arch/arm/mach-s3c2410
with naming of functions and a build problem. Items
which are general to s3c2410 and s3c2440 are now
named s3c24xx_ instead of s3c2410_, as well as
moving them to the correct headers.
The patch also fixes a problem where at least one
s3c2410 target had to be selected to allow an s3c2440
target to build without error.
The following have been renamed:
	s3c2410_init_irq -> s3c24xx_init_irq
	s3c2410_timer -> s3c24xx_timer

Signed-off-by: Ben Dooks
Signed-off-by: Russell King
parent 73ef2d64
......@@ -13,6 +13,7 @@
* 24-Aug-2004 BJD Start of generic S3C24XX support
* 18-Oct-2004 BJD Moved board struct into this file
* 04-Jan-2005 BJD New uart initialisation
* 10-Jan-2005 BJD Moved generic init here, specific to cpu headers
*/
#define IODESC_ENT(x) { S3C2410_VA_##x, S3C2410_PA_##x, S3C2410_SZ_##x, MT_DEVICE }
......@@ -26,25 +27,9 @@
/* forward declaration */
struct s3c2410_uartcfg;
#ifdef CONFIG_CPU_S3C2410
extern int s3c2410_init(void);
extern void s3c2410_map_io(struct map_desc *mach_desc, int size);
extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
#else
#define s3c2410_init_uarts NULL
#define s3c2410_map_io NULL
#define s3c2410_init NULL
#endif
/* core initialisation functions */
#ifdef CONFIG_CPU_S3C2440
extern int s3c2440_init(void);
extern void s3c2440_map_io(struct map_desc *mach_desc, int size);
extern void s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no);
#else
#define s3c2440_init_uarts NULL
#define s3c2440_map_io NULL
#define s3c2440_init NULL
#endif
extern void s3c24xx_init_irq(void);
extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
......@@ -65,3 +50,8 @@ struct s3c24xx_board {
};
extern void s3c24xx_set_board(struct s3c24xx_board *board);
/* timer for 2410/2440 */
struct sys_timer;
extern struct sys_timer s3c24xx_timer;
......@@ -628,12 +628,12 @@ s3c_irq_demux_uart2(unsigned int irq,
s3c_irq_demux_uart(IRQ_S3CUART_RX2, regs);
}
/* s3c2410_init_irq
/* s3c24xx_init_irq
*
* Initialise S3C2410 IRQ system
*/
void __init s3c2410_init_irq(void)
void __init s3c24xx_init_irq(void)
{
unsigned long pend;
unsigned long last;
......
......@@ -20,7 +20,8 @@
* 18-Jan-2003 BJD Added serial port configuration
* 05-Oct-2004 BJD Power management code
* 04-Nov-2004 BJD Updated serial port clocks
* 04-Jan-2004 BJD New uart init call
* 04-Jan-2006 BJD New uart init call
* 10-Jan-2005 BJD Removed include of s3c2410.h
*/
#include <linux/kernel.h>
......@@ -48,7 +49,6 @@
#include <asm/arch/regs-gpio.h>
#include <asm/arch/regs-mem.h>
#include "s3c2410.h"
#include "clock.h"
#include "devs.h"
#include "cpu.h"
......@@ -270,7 +270,7 @@ void __init bast_map_io(void)
void __init bast_init_irq(void)
{
s3c2410_init_irq();
s3c24xx_init_irq();
}
#ifdef CONFIG_PM
......@@ -307,5 +307,5 @@ MACHINE_START(BAST, "Simtec-BAST")
MAPIO(bast_map_io)
INITIRQ(bast_init_irq)
.init_machine = bast_init_machine,
.timer = &s3c2410_timer,
.timer = &s3c24xx_timer,
MACHINE_END
......@@ -21,6 +21,7 @@
* 18-Oct-2004 BJD Updated new board structure name
* 04-Nov-2004 BJD Change for new serial clock
* 04-Jan-2005 BJD Updated uart init call
* 10-Jan-2005 BJD Removed include of s3c2410.h
*/
#include <linux/kernel.h>
......@@ -45,7 +46,6 @@
#include <linux/serial_core.h>
#include "s3c2410.h"
#include "clock.h"
#include "devs.h"
#include "cpu.h"
......@@ -109,7 +109,7 @@ void __init h1940_map_io(void)
void __init h1940_init_irq(void)
{
s3c2410_init_irq();
s3c24xx_init_irq();
}
......@@ -119,5 +119,5 @@ MACHINE_START(H1940, "IPAQ-H1940")
BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
MAPIO(h1940_map_io)
INITIRQ(h1940_init_irq)
.timer = &s3c2410_timer,
.timer = &s3c24xx_timer,
MACHINE_END
......@@ -12,6 +12,7 @@
* Modifications:
* 16-Sep-2004 BJD Copied from mach-h1940.c
* 25-Oct-2004 BJD Updates for 2.6.10-rc1
* 10-Jan-2005 BJD Removed include of s3c2410.h s3c2440.h
*/
#include <linux/kernel.h>
......@@ -38,8 +39,6 @@
#include <asm/arch/regs-serial.h>
#include <asm/arch/regs-gpio.h>
#include "s3c2410.h"
#include "s3c2440.h"
#include "clock.h"
#include "devs.h"
#include "cpu.h"
......@@ -101,7 +100,7 @@ void __init rx3715_map_io(void)
void __init rx3715_init_irq(void)
{
s3c2410_init_irq();
s3c24xx_init_irq();
}
#ifdef CONFIG_PM
......@@ -120,5 +119,5 @@ MACHINE_START(RX3715, "IPAQ-RX3715")
MAPIO(rx3715_map_io)
INITIRQ(rx3715_init_irq)
INIT_MACHINE(rx3715_init_machine)
.timer = &s3c2410_timer,
.timer = &s3c24xx_timer,
MACHINE_END
......@@ -46,7 +46,6 @@
#include <asm/arch/regs-serial.h>
#include "s3c2410.h"
#include "devs.h"
#include "cpu.h"
......@@ -104,7 +103,7 @@ void __init smdk2410_map_io(void)
void __init smdk2410_init_irq(void)
{
s3c2410_init_irq();
s3c24xx_init_irq();
}
MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch
......@@ -114,7 +113,7 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc
BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
MAPIO(smdk2410_map_io)
INITIRQ(smdk2410_init_irq)
.timer = &s3c2410_timer,
.timer = &s3c24xx_timer,
MACHINE_END
......@@ -18,7 +18,8 @@
* 05-Apr-2004 BJD Copied to make mach-vr1000.c
* 18-Oct-2004 BJD Updated board struct
* 04-Nov-2004 BJD Clock and serial configuration update
* 04-Jan-2004 BJD Updated uart init call
* 04-Jan-2005 BJD Updated uart init call
* 10-Jan-2005 BJD Removed include of s3c2410.h
*/
#include <linux/kernel.h>
......@@ -43,7 +44,6 @@
//#include <asm/debug-ll.h>
#include <asm/arch/regs-serial.h>
#include "s3c2410.h"
#include "clock.h"
#include "devs.h"
#include "cpu.h"
......@@ -212,7 +212,7 @@ void __init vr1000_map_io(void)
void __init vr1000_init_irq(void)
{
s3c2410_init_irq();
s3c24xx_init_irq();
}
MACHINE_START(VR1000, "Thorcom-VR1000")
......@@ -221,5 +221,5 @@ MACHINE_START(VR1000, "Thorcom-VR1000")
BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
MAPIO(vr1000_map_io)
INITIRQ(vr1000_init_irq)
.timer = &s3c2410_timer,
.timer = &s3c24xx_timer,
MACHINE_END
/* arch/arm/mach-s3c2410/s3c2410.h
*
* Copyright (c) 2004 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
* Ben Dooks <ben@simtec.co.uk>
*
* Header file for s3c2410 machine directory
*
......@@ -15,13 +15,19 @@
* 04-Sep-2004 BJD Added s3c2410_init_uarts() call
* 17-Oct-2004 BJD Moved board out to cpu
* 04-Jan-2005 BJD Changed uart init
* 10-Jan-2005 BJD Removed timer to cpu.h, moved 2410 specific bits here
*/
extern void s3c2410_map_io(struct map_desc *, int count);
#ifdef CONFIG_CPU_S3C2410
extern void s3c2410_init_irq(void);
extern int s3c2410_init(void);
struct sys_timer;
extern struct sys_timer s3c2410_timer;
extern void s3c2410_map_io(struct map_desc *mach_desc, int size);
extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
#else
#define s3c2410_init_uarts NULL
#define s3c2410_map_io NULL
#define s3c2410_init NULL
#endif
/* linux/arch/arm/mach-s3c2410/s3c2440-dsc.c
*
* Copyright (c) 2004 Simtec Electronics
* Copyright (c) 2004-2005 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
*
* Samsung S3C2440 Drive Strength Control support
......@@ -12,6 +12,7 @@
* Modifications:
* 29-Aug-2004 BJD Start of drive-strength control
* 09-Nov-2004 BJD Added symbol export
* 11-Jan-2005 BJD Include fix
*/
#include <linux/kernel.h>
......@@ -31,8 +32,8 @@
#include <asm/arch/regs-gpio.h>
#include <asm/arch/regs-dsc.h>
#include "s3c2440.h"
#include "cpu.h"
#include "s3c2440.h"
int s3c2440_set_dsc(unsigned int pin, unsigned int value)
{
......
/* arch/arm/mach-s3c2410/s3c2440.h
*
* Copyright (c) 2004 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
* Copyright (c) 2004-2005 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
*
* Header file for s3c2440 cpu support
*
......@@ -12,9 +12,20 @@
* Modifications:
* 24-Aug-2004 BJD Start of S3C2440 CPU support
* 04-Nov-2004 BJD Added s3c2440_init_uarts()
* 04-Jan-2004 BJD Moved uart init to cpu code
* 04-Jan-2005 BJD Moved uart init to cpu code
* 10-Jan-2005 BJD Moved 2440 specific init here
*/
extern void s3c2440_init_irq(void);
#ifdef CONFIG_CPU_S3C2440
extern void s3c2440_init_time(void);
extern int s3c2440_init(void);
extern void s3c2440_map_io(struct map_desc *mach_desc, int size);
extern void s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no);
#else
#define s3c2440_init_uarts NULL
#define s3c2440_map_io NULL
#define s3c2440_init NULL
#endif
......@@ -232,7 +232,7 @@ static void __init s3c2410_timer_init (void)
setup_irq(IRQ_TIMER4, &s3c2410_timer_irq);
}
struct sys_timer s3c2410_timer = {
struct sys_timer s3c24xx_timer = {
.init = s3c2410_timer_init,
.offset = s3c2410_gettimeoffset,
.resume = s3c2410_timer_setup
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment