diff options
author | Ben Dooks <ben-linux@org.rmk.(none)> | 2005-01-12 00:12:19 +0000 |
---|---|---|
committer | Russell King <rmk@flint.arm.linux.org.uk> | 2005-01-12 00:12:19 +0000 |
commit | 0c88346fc54ede3bf757dd9fe06593512b701a66 (patch) | |
tree | 0c096be9a4132f119c5731300e4b08860087b7c8 /arch | |
parent | 73ef2d644741787f8054e69c4c52d471bd68617f (diff) | |
download | history-0c88346fc54ede3bf757dd9fe06593512b701a66.tar.gz |
[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
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s3c2410/cpu.h | 26 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/irq.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-bast.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-h1940.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-rx3715.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-smdk2410.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-vr1000.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/s3c2410.h | 16 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/s3c2440-dsc.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/s3c2440.h | 21 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/time.c | 2 |
11 files changed, 57 insertions, 51 deletions
diff --git a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h index 7c90dab27098a0..d7b2c61d11c674 100644 --- a/arch/arm/mach-s3c2410/cpu.h +++ b/arch/arm/mach-s3c2410/cpu.h @@ -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; diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c index a8a48f743047d2..6b0b93e5aa4157 100644 --- a/arch/arm/mach-s3c2410/irq.c +++ b/arch/arm/mach-s3c2410/irq.c @@ -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; diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 3126b641248d16..a6c05555445f5e 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c @@ -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 diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index ae200e86833bbf..9044d287e03a03 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c @@ -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 diff --git a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.c index 763aeaf6be44a1..38241c908bbd9c 100644 --- a/arch/arm/mach-s3c2410/mach-rx3715.c +++ b/arch/arm/mach-s3c2410/mach-rx3715.c @@ -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 diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c index 16f9d59cd65ba8..ac95647362f674 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2410.c +++ b/arch/arm/mach-s3c2410/mach-smdk2410.c @@ -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 diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index 2804fe5a0be5c9..47108f13f652a5 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c @@ -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 diff --git a/arch/arm/mach-s3c2410/s3c2410.h b/arch/arm/mach-s3c2410/s3c2410.h index d13c300a7de427..93f7a27e3cb80c 100644 --- a/arch/arm/mach-s3c2410/s3c2410.h +++ b/arch/arm/mach-s3c2410/s3c2410.h @@ -1,7 +1,7 @@ /* 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 diff --git a/arch/arm/mach-s3c2410/s3c2440-dsc.c b/arch/arm/mach-s3c2410/s3c2440-dsc.c index bc11fbfb25265a..50ccc673ff0530 100644 --- a/arch/arm/mach-s3c2410/s3c2440-dsc.c +++ b/arch/arm/mach-s3c2410/s3c2440-dsc.c @@ -1,6 +1,6 @@ /* 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) { diff --git a/arch/arm/mach-s3c2410/s3c2440.h b/arch/arm/mach-s3c2410/s3c2440.h index 4eb19a8797633e..760cee377c8892 100644 --- a/arch/arm/mach-s3c2410/s3c2440.h +++ b/arch/arm/mach-s3c2410/s3c2440.h @@ -1,7 +1,7 @@ /* 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 diff --git a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c index ccd16044354e84..715d65a40341b2 100644 --- a/arch/arm/mach-s3c2410/time.c +++ b/arch/arm/mach-s3c2410/time.c @@ -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 |