aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2006-04-01 12:33:42 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-04-01 12:33:42 -0500
commitd3f4c571b6e596f9d39c596426269006a309d3b8 (patch)
tree291d0f60e379f1fa1b26941c75bd9354f2e7a708 /arch/arm/mach-s3c2410
parent532bda5d9cd2f94a9e374765c23858c7d8641f66 (diff)
[ARM] 3440/1: [S3C2410] make SMDK2410 and SMDK2440 similarities common
Patch from Ben Dooks The SMDK2410 and SMDK2440 boards have a number of items in common, including the LEDs, Ethernet, PCMCIA. Make a common SMDK support file. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-s3c2410')
-rw-r--r--arch/arm/mach-s3c2410/Kconfig7
-rw-r--r--arch/arm/mach-s3c2410/Makefile2
-rw-r--r--arch/arm/mach-s3c2410/common-smdk.c51
-rw-r--r--arch/arm/mach-s3c2410/common-smdk.h15
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2410.c13
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2440.c17
6 files changed, 84 insertions, 21 deletions
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index ed07c4149d82..ce7d81000695 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -50,9 +50,15 @@ config MACH_N30
50 50
51 <http://zoo.weinigel.se/n30>. 51 <http://zoo.weinigel.se/n30>.
52 52
53config MACH_SMDK
54 bool
55 help
56 Common machine code for SMDK2410 and SMDK2440
57
53config ARCH_SMDK2410 58config ARCH_SMDK2410
54 bool "SMDK2410/A9M2410" 59 bool "SMDK2410/A9M2410"
55 select CPU_S3C2410 60 select CPU_S3C2410
61 select MACH_SMDK
56 help 62 help
57 Say Y here if you are using the SMDK2410 or the derived module A9M2410 63 Say Y here if you are using the SMDK2410 or the derived module A9M2410
58 <http://www.fsforth.de> 64 <http://www.fsforth.de>
@@ -60,6 +66,7 @@ config ARCH_SMDK2410
60config ARCH_S3C2440 66config ARCH_S3C2440
61 bool "SMDK2440" 67 bool "SMDK2440"
62 select CPU_S3C2440 68 select CPU_S3C2440
69 select MACH_SMDK
63 help 70 help
64 Say Y here if you are using the SMDK2440. 71 Say Y here if you are using the SMDK2440.
65 72
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile
index 1b3b476e5637..3e5712db6b52 100644
--- a/arch/arm/mach-s3c2410/Makefile
+++ b/arch/arm/mach-s3c2410/Makefile
@@ -48,3 +48,5 @@ obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o
48obj-$(CONFIG_MACH_RX3715) += mach-rx3715.o 48obj-$(CONFIG_MACH_RX3715) += mach-rx3715.o
49obj-$(CONFIG_MACH_OTOM) += mach-otom.o 49obj-$(CONFIG_MACH_OTOM) += mach-otom.o
50obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o 50obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o
51
52obj-$(CONFIG_MACH_SMDK) += common-smdk.o \ No newline at end of file
diff --git a/arch/arm/mach-s3c2410/common-smdk.c b/arch/arm/mach-s3c2410/common-smdk.c
new file mode 100644
index 000000000000..b054f8ff53f7
--- /dev/null
+++ b/arch/arm/mach-s3c2410/common-smdk.c
@@ -0,0 +1,51 @@
1/* linux/arch/arm/mach-s3c2410/common-smdk.c
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Common code for SMDK2410 and SMDK2440 boards
7 *
8 * http://www.fluff.org/ben/smdk2440/
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#include <linux/kernel.h>
16#include <linux/types.h>
17#include <linux/interrupt.h>
18#include <linux/list.h>
19#include <linux/timer.h>
20#include <linux/init.h>
21#include <linux/platform_device.h>
22
23#include <asm/mach/arch.h>
24#include <asm/mach/map.h>
25#include <asm/mach/irq.h>
26
27#include <asm/hardware.h>
28#include <asm/io.h>
29#include <asm/irq.h>
30#include <asm/mach-types.h>
31
32#include <asm/arch/regs-gpio.h>
33
34#include "pm.h"
35
36void __init smdk_machine_init(void)
37{
38 /* Configure the LEDs (even if we have no LED support)*/
39
40 s3c2410_gpio_cfgpin(S3C2410_GPF4, S3C2410_GPF4_OUTP);
41 s3c2410_gpio_cfgpin(S3C2410_GPF5, S3C2410_GPF5_OUTP);
42 s3c2410_gpio_cfgpin(S3C2410_GPF6, S3C2410_GPF6_OUTP);
43 s3c2410_gpio_cfgpin(S3C2410_GPF7, S3C2410_GPF7_OUTP);
44
45 s3c2410_gpio_setpin(S3C2410_GPF4, 0);
46 s3c2410_gpio_setpin(S3C2410_GPF5, 0);
47 s3c2410_gpio_setpin(S3C2410_GPF6, 0);
48 s3c2410_gpio_setpin(S3C2410_GPF7, 0);
49
50 s3c2410_pm_init();
51}
diff --git a/arch/arm/mach-s3c2410/common-smdk.h b/arch/arm/mach-s3c2410/common-smdk.h
new file mode 100644
index 000000000000..0e3a3be330a3
--- /dev/null
+++ b/arch/arm/mach-s3c2410/common-smdk.h
@@ -0,0 +1,15 @@
1/* linux/arch/arm/mach-s3c2410/common-smdk.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Common code for SMDK2410 and SMDK2440 boards
7 *
8 * http://www.fluff.org/ben/smdk2440/
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15extern void smdk_machine_init(void);
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c
index 1e76e1fdfcea..2db932d72c5a 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2410.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2410.c
@@ -28,7 +28,8 @@
28 * Ben Dooks <ben@simtec.co.uk> 28 * Ben Dooks <ben@simtec.co.uk>
29 * 29 *
30 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA 30 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
31 * 20-Sep-2005 BJD Added static to non-exported items 31 * 20-Sep-2005 BJD Added static to non-exported items
32 * 01-Apr-2006 BJD Moved init code to common smdk
32 * 33 *
33 ***********************************************************************/ 34 ***********************************************************************/
34 35
@@ -54,6 +55,8 @@
54#include "devs.h" 55#include "devs.h"
55#include "cpu.h" 56#include "cpu.h"
56 57
58#include "common-smdk.h"
59
57static struct map_desc smdk2410_iodesc[] __initdata = { 60static struct map_desc smdk2410_iodesc[] __initdata = {
58 /* nothing here yet */ 61 /* nothing here yet */
59}; 62};
@@ -107,11 +110,6 @@ static void __init smdk2410_map_io(void)
107 s3c24xx_set_board(&smdk2410_board); 110 s3c24xx_set_board(&smdk2410_board);
108} 111}
109 112
110static void __init smdk2410_init_irq(void)
111{
112 s3c24xx_init_irq();
113}
114
115MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch 113MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch
116 * to SMDK2410 */ 114 * to SMDK2410 */
117 /* Maintainer: Jonas Dietsche */ 115 /* Maintainer: Jonas Dietsche */
@@ -119,7 +117,8 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc
119 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 117 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
120 .boot_params = S3C2410_SDRAM_PA + 0x100, 118 .boot_params = S3C2410_SDRAM_PA + 0x100,
121 .map_io = smdk2410_map_io, 119 .map_io = smdk2410_map_io,
122 .init_irq = smdk2410_init_irq, 120 .init_irq = s3c24xx_init_irq,
121 .init_machine = smdk_machine_init,
123 .timer = &s3c24xx_timer, 122 .timer = &s3c24xx_timer,
124MACHINE_END 123MACHINE_END
125 124
diff --git a/arch/arm/mach-s3c2410/mach-smdk2440.c b/arch/arm/mach-s3c2410/mach-smdk2440.c
index f4315721c3b8..5fffd1d51047 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2440.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2440.c
@@ -53,7 +53,8 @@
53#include "clock.h" 53#include "clock.h"
54#include "devs.h" 54#include "devs.h"
55#include "cpu.h" 55#include "cpu.h"
56#include "pm.h" 56
57#include "common-smdk.h"
57 58
58static struct map_desc smdk2440_iodesc[] __initdata = { 59static struct map_desc smdk2440_iodesc[] __initdata = {
59 /* ISA IO Space map (memory space selected by A24) */ 60 /* ISA IO Space map (memory space selected by A24) */
@@ -197,21 +198,9 @@ static void __init smdk2440_map_io(void)
197 198
198static void __init smdk2440_machine_init(void) 199static void __init smdk2440_machine_init(void)
199{ 200{
200 /* Configure the LEDs (even if we have no LED support)*/
201
202 s3c2410_gpio_cfgpin(S3C2410_GPF4, S3C2410_GPF4_OUTP);
203 s3c2410_gpio_cfgpin(S3C2410_GPF5, S3C2410_GPF5_OUTP);
204 s3c2410_gpio_cfgpin(S3C2410_GPF6, S3C2410_GPF6_OUTP);
205 s3c2410_gpio_cfgpin(S3C2410_GPF7, S3C2410_GPF7_OUTP);
206
207 s3c2410_gpio_setpin(S3C2410_GPF4, 0);
208 s3c2410_gpio_setpin(S3C2410_GPF5, 0);
209 s3c2410_gpio_setpin(S3C2410_GPF6, 0);
210 s3c2410_gpio_setpin(S3C2410_GPF7, 0);
211
212 s3c24xx_fb_set_platdata(&smdk2440_lcd_cfg); 201 s3c24xx_fb_set_platdata(&smdk2440_lcd_cfg);
213 202
214 s3c2410_pm_init(); 203 smdk_machine_init();
215} 204}
216 205
217MACHINE_START(S3C2440, "SMDK2440") 206MACHINE_START(S3C2440, "SMDK2440")