aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c2410')
-rw-r--r--arch/arm/mach-s3c2410/Kconfig29
-rw-r--r--arch/arm/mach-s3c2410/Makefile1
-rw-r--r--arch/arm/mach-s3c2410/bast-irq.c8
-rw-r--r--arch/arm/mach-s3c2410/cpu.c1
-rw-r--r--arch/arm/mach-s3c2410/devs.c1
-rw-r--r--arch/arm/mach-s3c2410/dma.c10
-rw-r--r--arch/arm/mach-s3c2410/irq.c63
-rw-r--r--arch/arm/mach-s3c2410/irq.h4
-rw-r--r--arch/arm/mach-s3c2410/mach-anubis.c1
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c1
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c11
-rw-r--r--arch/arm/mach-s3c2410/mach-n30.c3
-rw-r--r--arch/arm/mach-s3c2410/mach-nexcoder.c1
-rw-r--r--arch/arm/mach-s3c2410/mach-osiris.c10
-rw-r--r--arch/arm/mach-s3c2410/mach-otom.c1
-rw-r--r--arch/arm/mach-s3c2410/mach-rx3715.c3
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2410.c1
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2413.c1
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2440.c1
-rw-r--r--arch/arm/mach-s3c2410/mach-vr1000.c50
-rw-r--r--arch/arm/mach-s3c2410/mach-vstms.c1
-rw-r--r--arch/arm/mach-s3c2410/pm-h1940.S33
-rw-r--r--arch/arm/mach-s3c2410/pm-simtec.c1
-rw-r--r--arch/arm/mach-s3c2410/pm.c1
-rw-r--r--arch/arm/mach-s3c2410/s3c2410-clock.c5
-rw-r--r--arch/arm/mach-s3c2410/s3c2410-dma.c9
-rw-r--r--arch/arm/mach-s3c2410/s3c2410-pm.c38
-rw-r--r--arch/arm/mach-s3c2410/s3c2410.c3
-rw-r--r--arch/arm/mach-s3c2410/s3c2412-clock.c11
-rw-r--r--arch/arm/mach-s3c2410/s3c2412-dma.c3
-rw-r--r--arch/arm/mach-s3c2410/s3c2412-irq.c4
-rw-r--r--arch/arm/mach-s3c2410/s3c2412.c2
-rw-r--r--arch/arm/mach-s3c2410/s3c2440-clock.c24
-rw-r--r--arch/arm/mach-s3c2410/s3c2440-dma.c3
-rw-r--r--arch/arm/mach-s3c2410/s3c2440-irq.c10
-rw-r--r--arch/arm/mach-s3c2410/s3c2440.c9
-rw-r--r--arch/arm/mach-s3c2410/s3c2440.h18
-rw-r--r--arch/arm/mach-s3c2410/s3c2442-clock.c22
-rw-r--r--arch/arm/mach-s3c2410/s3c2442.c20
-rw-r--r--arch/arm/mach-s3c2410/s3c244x-irq.c12
-rw-r--r--arch/arm/mach-s3c2410/s3c244x.c3
-rw-r--r--arch/arm/mach-s3c2410/usb-simtec.h3
42 files changed, 271 insertions, 165 deletions
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index 63965c78de8c..eb4ec411312b 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -5,6 +5,7 @@ menu "S3C24XX Implementations"
5config MACH_AML_M5900 5config MACH_AML_M5900
6 bool "AML M5900 Series" 6 bool "AML M5900 Series"
7 select CPU_S3C2410 7 select CPU_S3C2410
8 select PM_SIMTEC if PM
8 help 9 help
9 Say Y here if you are using the American Microsystems M5900 Series 10 Say Y here if you are using the American Microsystems M5900 Series
10 <http://www.amltd.com> 11 <http://www.amltd.com>
@@ -12,6 +13,7 @@ config MACH_AML_M5900
12config MACH_ANUBIS 13config MACH_ANUBIS
13 bool "Simtec Electronics ANUBIS" 14 bool "Simtec Electronics ANUBIS"
14 select CPU_S3C2440 15 select CPU_S3C2440
16 select PM_SIMTEC if PM
15 help 17 help
16 Say Y here if you are using the Simtec Electronics ANUBIS 18 Say Y here if you are using the Simtec Electronics ANUBIS
17 development system 19 development system
@@ -19,6 +21,7 @@ config MACH_ANUBIS
19config MACH_OSIRIS 21config MACH_OSIRIS
20 bool "Simtec IM2440D20 (OSIRIS) module" 22 bool "Simtec IM2440D20 (OSIRIS) module"
21 select CPU_S3C2440 23 select CPU_S3C2440
24 select PM_SIMTEC if PM
22 help 25 help
23 Say Y here if you are using the Simtec IM2440D20 module, also 26 Say Y here if you are using the Simtec IM2440D20 module, also
24 known as the Osiris. 27 known as the Osiris.
@@ -26,6 +29,7 @@ config MACH_OSIRIS
26config ARCH_BAST 29config ARCH_BAST
27 bool "Simtec Electronics BAST (EB2410ITX)" 30 bool "Simtec Electronics BAST (EB2410ITX)"
28 select CPU_S3C2410 31 select CPU_S3C2410
32 select PM_SIMTEC if PM
29 select ISA 33 select ISA
30 help 34 help
31 Say Y here if you are using the Simtec Electronics EB2410ITX 35 Say Y here if you are using the Simtec Electronics EB2410ITX
@@ -41,9 +45,15 @@ config BAST_PC104_IRQ
41 Say Y here to enable the PC104 IRQ routing on the 45 Say Y here to enable the PC104 IRQ routing on the
42 Simtec BAST (EB2410ITX) 46 Simtec BAST (EB2410ITX)
43 47
48config PM_H1940
49 bool
50 help
51 Internal node for H1940 and related PM
52
44config ARCH_H1940 53config ARCH_H1940
45 bool "IPAQ H1940" 54 bool "IPAQ H1940"
46 select CPU_S3C2410 55 select CPU_S3C2410
56 select PM_H1940 if PM
47 help 57 help
48 Say Y here if you are using the HP IPAQ H1940 58 Say Y here if you are using the HP IPAQ H1940
49 59
@@ -91,7 +101,7 @@ config SMDK2440_CPU2442
91config MACH_S3C2413 101config MACH_S3C2413
92 bool 102 bool
93 help 103 help
94 Internal node for S3C2413 verison of SMDK2413, so that 104 Internal node for S3C2413 version of SMDK2413, so that
95 machine_is_s3c2413() will work when MACH_SMDK2413 is 105 machine_is_s3c2413() will work when MACH_SMDK2413 is
96 selected 106 selected
97 107
@@ -105,6 +115,7 @@ config MACH_SMDK2413
105 115
106config MACH_VR1000 116config MACH_VR1000
107 bool "Thorcom VR1000" 117 bool "Thorcom VR1000"
118 select PM_SIMTEC if PM
108 select CPU_S3C2410 119 select CPU_S3C2410
109 help 120 help
110 Say Y here if you are using the Thorcom VR1000 board. 121 Say Y here if you are using the Thorcom VR1000 board.
@@ -115,6 +126,7 @@ config MACH_VR1000
115config MACH_RX3715 126config MACH_RX3715
116 bool "HP iPAQ rx3715" 127 bool "HP iPAQ rx3715"
117 select CPU_S3C2440 128 select CPU_S3C2440
129 select PM_H1940 if PM
118 help 130 help
119 Say Y here if you are using the HP iPAQ rx3715. 131 Say Y here if you are using the HP iPAQ rx3715.
120 132
@@ -148,7 +160,6 @@ config S3C2410_CLOCK
148 160
149config S3C2410_PM 161config S3C2410_PM
150 bool 162 bool
151 depends on CONFIG_PM
152 help 163 help
153 Power Management code common to S3C2410 and better 164 Power Management code common to S3C2410 and better
154 165
@@ -163,7 +174,7 @@ config CPU_S3C2410
163 bool 174 bool
164 depends on ARCH_S3C2410 175 depends on ARCH_S3C2410
165 select S3C2410_CLOCK 176 select S3C2410_CLOCK
166 select S3C2410_PM 177 select S3C2410_PM if PM
167 help 178 help
168 Support for S3C2410 and S3C2410A family from the S3C24XX line 179 Support for S3C2410 and S3C2410A family from the S3C24XX line
169 of Samsung Mobile CPUs. 180 of Samsung Mobile CPUs.
@@ -178,14 +189,13 @@ config CPU_S3C2412_ONLY
178 189
179config S3C2412_PM 190config S3C2412_PM
180 bool 191 bool
181 default y if PM
182 depends on CPU_S3C2412
183 help 192 help
184 Internal config node to apply S3C2412 power management 193 Internal config node to apply S3C2412 power management
185 194
186config CPU_S3C2412 195config CPU_S3C2412
187 bool 196 bool
188 depends on ARCH_S3C2410 197 depends on ARCH_S3C2410
198 select S3C2412_PM if PM
189 help 199 help
190 Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line 200 Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line
191 201
@@ -199,7 +209,7 @@ config CPU_S3C2440
199 bool 209 bool
200 depends on ARCH_S3C2410 210 depends on ARCH_S3C2410
201 select S3C2410_CLOCK 211 select S3C2410_CLOCK
202 select S3C2410_PM 212 select S3C2410_PM if PM
203 select CPU_S3C244X 213 select CPU_S3C244X
204 help 214 help
205 Support for S3C2440 Samsung Mobile CPU based systems. 215 Support for S3C2440 Samsung Mobile CPU based systems.
@@ -208,7 +218,7 @@ config CPU_S3C2442
208 bool 218 bool
209 depends on ARCH_S3C2420 219 depends on ARCH_S3C2420
210 select S3C2410_CLOCK 220 select S3C2410_CLOCK
211 select S3C2410_PM 221 select S3C2410_PM if PM
212 select CPU_S3C244X 222 select CPU_S3C244X
213 help 223 help
214 Support for S3C2442 Samsung Mobile CPU based systems. 224 Support for S3C2442 Samsung Mobile CPU based systems.
@@ -292,8 +302,9 @@ config S3C2410_PM_CHECK_CHUNKSIZE
292 302
293config PM_SIMTEC 303config PM_SIMTEC
294 bool 304 bool
295 depends on PM && (ARCH_BAST || MACH_VR1000 || MACH_AML_M5900) 305 help
296 default y 306 Common power management code for systems that are
307 compatible with the Simtec style of power management
297 308
298config S3C2410_LOWLEVEL_UART_PORT 309config S3C2410_LOWLEVEL_UART_PORT
299 int "S3C2410 UART to use for low-level messages" 310 int "S3C2410 UART to use for low-level messages"
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile
index d66013365b6b..27663e28cc88 100644
--- a/arch/arm/mach-s3c2410/Makefile
+++ b/arch/arm/mach-s3c2410/Makefile
@@ -31,6 +31,7 @@ obj-$(CONFIG_CPU_S3C2410_DMA) += s3c2410-dma.o
31 31
32obj-$(CONFIG_PM) += pm.o sleep.o 32obj-$(CONFIG_PM) += pm.o sleep.o
33obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o 33obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o
34obj-$(CONFIG_PM_H1940) += pm-h1940.o
34 35
35# S3C2412 support 36# S3C2412 support
36obj-$(CONFIG_CPU_S3C2412) += s3c2412.o 37obj-$(CONFIG_CPU_S3C2412) += s3c2412.o
diff --git a/arch/arm/mach-s3c2410/bast-irq.c b/arch/arm/mach-s3c2410/bast-irq.c
index 23d5beea5568..379efe70778c 100644
--- a/arch/arm/mach-s3c2410/bast-irq.c
+++ b/arch/arm/mach-s3c2410/bast-irq.c
@@ -88,7 +88,7 @@ bast_pc104_mask(unsigned int irqno)
88static void 88static void
89bast_pc104_maskack(unsigned int irqno) 89bast_pc104_maskack(unsigned int irqno)
90{ 90{
91 struct irqdesc *desc = irq_desc + IRQ_ISA; 91 struct irq_desc *desc = irq_desc + IRQ_ISA;
92 92
93 bast_pc104_mask(irqno); 93 bast_pc104_mask(irqno);
94 desc->chip->ack(IRQ_ISA); 94 desc->chip->ack(IRQ_ISA);
@@ -104,7 +104,7 @@ bast_pc104_unmask(unsigned int irqno)
104 __raw_writeb(temp, BAST_VA_PC104_IRQMASK); 104 __raw_writeb(temp, BAST_VA_PC104_IRQMASK);
105} 105}
106 106
107static struct irqchip bast_pc104_chip = { 107static struct irq_chip bast_pc104_chip = {
108 .mask = bast_pc104_mask, 108 .mask = bast_pc104_mask,
109 .unmask = bast_pc104_unmask, 109 .unmask = bast_pc104_unmask,
110 .ack = bast_pc104_maskack 110 .ack = bast_pc104_maskack
@@ -112,7 +112,7 @@ static struct irqchip bast_pc104_chip = {
112 112
113static void 113static void
114bast_irq_pc104_demux(unsigned int irq, 114bast_irq_pc104_demux(unsigned int irq,
115 struct irqdesc *desc) 115 struct irq_desc *desc)
116{ 116{
117 unsigned int stat; 117 unsigned int stat;
118 unsigned int irqno; 118 unsigned int irqno;
@@ -157,7 +157,7 @@ static __init int bast_irq_init(void)
157 unsigned int irqno = bast_pc104_irqs[i]; 157 unsigned int irqno = bast_pc104_irqs[i];
158 158
159 set_irq_chip(irqno, &bast_pc104_chip); 159 set_irq_chip(irqno, &bast_pc104_chip);
160 set_irq_handler(irqno, do_level_IRQ); 160 set_irq_handler(irqno, handle_level_irq);
161 set_irq_flags(irqno, IRQF_VALID); 161 set_irq_flags(irqno, IRQF_VALID);
162 } 162 }
163 } 163 }
diff --git a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c
index 9d4899eddf1f..ae1f5bb63f7a 100644
--- a/arch/arm/mach-s3c2410/cpu.c
+++ b/arch/arm/mach-s3c2410/cpu.c
@@ -26,6 +26,7 @@
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/interrupt.h> 27#include <linux/interrupt.h>
28#include <linux/ioport.h> 28#include <linux/ioport.h>
29#include <linux/serial_core.h>
29#include <linux/platform_device.h> 30#include <linux/platform_device.h>
30 31
31#include <asm/hardware.h> 32#include <asm/hardware.h>
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c
index cae35ff76f33..faccde2092d2 100644
--- a/arch/arm/mach-s3c2410/devs.c
+++ b/arch/arm/mach-s3c2410/devs.c
@@ -17,6 +17,7 @@
17#include <linux/list.h> 17#include <linux/list.h>
18#include <linux/timer.h> 18#include <linux/timer.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/serial_core.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
21 22
22#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c
index 3d211dc2f2f9..fa860e716b4f 100644
--- a/arch/arm/mach-s3c2410/dma.c
+++ b/arch/arm/mach-s3c2410/dma.c
@@ -1,6 +1,6 @@
1/* linux/arch/arm/mach-s3c2410/dma.c 1/* linux/arch/arm/mach-s3c2410/dma.c
2 * 2 *
3 * (c) 2003-2005,2006 Simtec Electronics 3 * Copyright (c) 2003-2005,2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * S3C2410 DMA core 6 * S3C2410 DMA core
@@ -40,7 +40,7 @@
40 40
41/* io map for dma */ 41/* io map for dma */
42static void __iomem *dma_base; 42static void __iomem *dma_base;
43static kmem_cache_t *dma_kmem; 43static struct kmem_cache *dma_kmem;
44 44
45struct s3c24xx_dma_selection dma_sel; 45struct s3c24xx_dma_selection dma_sel;
46 46
@@ -1053,11 +1053,11 @@ int s3c2410_dma_config(dmach_t channel,
1053 if (chan == NULL) 1053 if (chan == NULL)
1054 return -EINVAL; 1054 return -EINVAL;
1055 1055
1056 printk("Initial dcon is %08x\n", dcon); 1056 pr_debug("%s: Initial dcon is %08x\n", __FUNCTION__, dcon);
1057 1057
1058 dcon |= chan->dcon & dma_sel.dcon_mask; 1058 dcon |= chan->dcon & dma_sel.dcon_mask;
1059 1059
1060 printk("New dcon is %08x\n", dcon); 1060 pr_debug("%s: New dcon is %08x\n", __FUNCTION__, dcon);
1061 1061
1062 switch (xferunit) { 1062 switch (xferunit) {
1063 case 1: 1063 case 1:
@@ -1271,7 +1271,7 @@ struct sysdev_class dma_sysclass = {
1271 1271
1272/* kmem cache implementation */ 1272/* kmem cache implementation */
1273 1273
1274static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f) 1274static void s3c2410_dma_cache_ctor(void *p, struct kmem_cache *c, unsigned long f)
1275{ 1275{
1276 memset(p, 0, sizeof(struct s3c2410_dma_buf)); 1276 memset(p, 0, sizeof(struct s3c2410_dma_buf));
1277} 1277}
diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c
index 683b3491ba3c..3c0ed7871c55 100644
--- a/arch/arm/mach-s3c2410/irq.c
+++ b/arch/arm/mach-s3c2410/irq.c
@@ -180,7 +180,7 @@ s3c_irq_unmask(unsigned int irqno)
180 __raw_writel(mask, S3C2410_INTMSK); 180 __raw_writel(mask, S3C2410_INTMSK);
181} 181}
182 182
183struct irqchip s3c_irq_level_chip = { 183struct irq_chip s3c_irq_level_chip = {
184 .name = "s3c-level", 184 .name = "s3c-level",
185 .ack = s3c_irq_maskack, 185 .ack = s3c_irq_maskack,
186 .mask = s3c_irq_mask, 186 .mask = s3c_irq_mask,
@@ -188,7 +188,7 @@ struct irqchip s3c_irq_level_chip = {
188 .set_wake = s3c_irq_wake 188 .set_wake = s3c_irq_wake
189}; 189};
190 190
191static struct irqchip s3c_irq_chip = { 191static struct irq_chip s3c_irq_chip = {
192 .name = "s3c", 192 .name = "s3c",
193 .ack = s3c_irq_ack, 193 .ack = s3c_irq_ack,
194 .mask = s3c_irq_mask, 194 .mask = s3c_irq_mask,
@@ -206,18 +206,6 @@ s3c_irqext_mask(unsigned int irqno)
206 mask = __raw_readl(S3C24XX_EINTMASK); 206 mask = __raw_readl(S3C24XX_EINTMASK);
207 mask |= ( 1UL << irqno); 207 mask |= ( 1UL << irqno);
208 __raw_writel(mask, S3C24XX_EINTMASK); 208 __raw_writel(mask, S3C24XX_EINTMASK);
209
210 if (irqno <= (IRQ_EINT7 - EXTINT_OFF)) {
211 /* check to see if all need masking */
212
213 if ((mask & (0xf << 4)) == (0xf << 4)) {
214 /* all masked, mask the parent */
215 s3c_irq_mask(IRQ_EINT4t7);
216 }
217 } else {
218 /* todo: the same check as above for the rest of the irq regs...*/
219
220 }
221} 209}
222 210
223static void 211static void
@@ -229,7 +217,6 @@ s3c_irqext_ack(unsigned int irqno)
229 217
230 bit = 1UL << (irqno - EXTINT_OFF); 218 bit = 1UL << (irqno - EXTINT_OFF);
231 219
232
233 mask = __raw_readl(S3C24XX_EINTMASK); 220 mask = __raw_readl(S3C24XX_EINTMASK);
234 221
235 __raw_writel(bit, S3C24XX_EINTPEND); 222 __raw_writel(bit, S3C24XX_EINTPEND);
@@ -258,8 +245,6 @@ s3c_irqext_unmask(unsigned int irqno)
258 mask = __raw_readl(S3C24XX_EINTMASK); 245 mask = __raw_readl(S3C24XX_EINTMASK);
259 mask &= ~( 1UL << irqno); 246 mask &= ~( 1UL << irqno);
260 __raw_writel(mask, S3C24XX_EINTMASK); 247 __raw_writel(mask, S3C24XX_EINTMASK);
261
262 s3c_irq_unmask((irqno <= (IRQ_EINT7 - EXTINT_OFF)) ? IRQ_EINT4t7 : IRQ_EINT8t23);
263} 248}
264 249
265int 250int
@@ -344,7 +329,7 @@ s3c_irqext_type(unsigned int irq, unsigned int type)
344 return 0; 329 return 0;
345} 330}
346 331
347static struct irqchip s3c_irqext_chip = { 332static struct irq_chip s3c_irqext_chip = {
348 .name = "s3c-ext", 333 .name = "s3c-ext",
349 .mask = s3c_irqext_mask, 334 .mask = s3c_irqext_mask,
350 .unmask = s3c_irqext_unmask, 335 .unmask = s3c_irqext_unmask,
@@ -353,7 +338,7 @@ static struct irqchip s3c_irqext_chip = {
353 .set_wake = s3c_irqext_wake 338 .set_wake = s3c_irqext_wake
354}; 339};
355 340
356static struct irqchip s3c_irq_eint0t4 = { 341static struct irq_chip s3c_irq_eint0t4 = {
357 .name = "s3c-ext0", 342 .name = "s3c-ext0",
358 .ack = s3c_irq_ack, 343 .ack = s3c_irq_ack,
359 .mask = s3c_irq_mask, 344 .mask = s3c_irq_mask,
@@ -390,7 +375,7 @@ s3c_irq_uart0_ack(unsigned int irqno)
390 s3c_irqsub_maskack(irqno, INTMSK_UART0, 7); 375 s3c_irqsub_maskack(irqno, INTMSK_UART0, 7);
391} 376}
392 377
393static struct irqchip s3c_irq_uart0 = { 378static struct irq_chip s3c_irq_uart0 = {
394 .name = "s3c-uart0", 379 .name = "s3c-uart0",
395 .mask = s3c_irq_uart0_mask, 380 .mask = s3c_irq_uart0_mask,
396 .unmask = s3c_irq_uart0_unmask, 381 .unmask = s3c_irq_uart0_unmask,
@@ -417,7 +402,7 @@ s3c_irq_uart1_ack(unsigned int irqno)
417 s3c_irqsub_maskack(irqno, INTMSK_UART1, 7 << 3); 402 s3c_irqsub_maskack(irqno, INTMSK_UART1, 7 << 3);
418} 403}
419 404
420static struct irqchip s3c_irq_uart1 = { 405static struct irq_chip s3c_irq_uart1 = {
421 .name = "s3c-uart1", 406 .name = "s3c-uart1",
422 .mask = s3c_irq_uart1_mask, 407 .mask = s3c_irq_uart1_mask,
423 .unmask = s3c_irq_uart1_unmask, 408 .unmask = s3c_irq_uart1_unmask,
@@ -444,7 +429,7 @@ s3c_irq_uart2_ack(unsigned int irqno)
444 s3c_irqsub_maskack(irqno, INTMSK_UART2, 7 << 6); 429 s3c_irqsub_maskack(irqno, INTMSK_UART2, 7 << 6);
445} 430}
446 431
447static struct irqchip s3c_irq_uart2 = { 432static struct irq_chip s3c_irq_uart2 = {
448 .name = "s3c-uart2", 433 .name = "s3c-uart2",
449 .mask = s3c_irq_uart2_mask, 434 .mask = s3c_irq_uart2_mask,
450 .unmask = s3c_irq_uart2_unmask, 435 .unmask = s3c_irq_uart2_unmask,
@@ -471,7 +456,7 @@ s3c_irq_adc_ack(unsigned int irqno)
471 s3c_irqsub_ack(irqno, INTMSK_ADCPARENT, 3 << 9); 456 s3c_irqsub_ack(irqno, INTMSK_ADCPARENT, 3 << 9);
472} 457}
473 458
474static struct irqchip s3c_irq_adc = { 459static struct irq_chip s3c_irq_adc = {
475 .name = "s3c-adc", 460 .name = "s3c-adc",
476 .mask = s3c_irq_adc_mask, 461 .mask = s3c_irq_adc_mask,
477 .unmask = s3c_irq_adc_unmask, 462 .unmask = s3c_irq_adc_unmask,
@@ -480,11 +465,11 @@ static struct irqchip s3c_irq_adc = {
480 465
481/* irq demux for adc */ 466/* irq demux for adc */
482static void s3c_irq_demux_adc(unsigned int irq, 467static void s3c_irq_demux_adc(unsigned int irq,
483 struct irqdesc *desc) 468 struct irq_desc *desc)
484{ 469{
485 unsigned int subsrc, submsk; 470 unsigned int subsrc, submsk;
486 unsigned int offset = 9; 471 unsigned int offset = 9;
487 struct irqdesc *mydesc; 472 struct irq_desc *mydesc;
488 473
489 /* read the current pending interrupts, and the mask 474 /* read the current pending interrupts, and the mask
490 * for what it is available */ 475 * for what it is available */
@@ -512,7 +497,7 @@ static void s3c_irq_demux_uart(unsigned int start)
512{ 497{
513 unsigned int subsrc, submsk; 498 unsigned int subsrc, submsk;
514 unsigned int offset = start - IRQ_S3CUART_RX0; 499 unsigned int offset = start - IRQ_S3CUART_RX0;
515 struct irqdesc *desc; 500 struct irq_desc *desc;
516 501
517 /* read the current pending interrupts, and the mask 502 /* read the current pending interrupts, and the mask
518 * for what it is available */ 503 * for what it is available */
@@ -549,7 +534,7 @@ static void s3c_irq_demux_uart(unsigned int start)
549 534
550static void 535static void
551s3c_irq_demux_uart0(unsigned int irq, 536s3c_irq_demux_uart0(unsigned int irq,
552 struct irqdesc *desc) 537 struct irq_desc *desc)
553{ 538{
554 irq = irq; 539 irq = irq;
555 s3c_irq_demux_uart(IRQ_S3CUART_RX0); 540 s3c_irq_demux_uart(IRQ_S3CUART_RX0);
@@ -557,7 +542,7 @@ s3c_irq_demux_uart0(unsigned int irq,
557 542
558static void 543static void
559s3c_irq_demux_uart1(unsigned int irq, 544s3c_irq_demux_uart1(unsigned int irq,
560 struct irqdesc *desc) 545 struct irq_desc *desc)
561{ 546{
562 irq = irq; 547 irq = irq;
563 s3c_irq_demux_uart(IRQ_S3CUART_RX1); 548 s3c_irq_demux_uart(IRQ_S3CUART_RX1);
@@ -565,7 +550,7 @@ s3c_irq_demux_uart1(unsigned int irq,
565 550
566static void 551static void
567s3c_irq_demux_uart2(unsigned int irq, 552s3c_irq_demux_uart2(unsigned int irq,
568 struct irqdesc *desc) 553 struct irq_desc *desc)
569{ 554{
570 irq = irq; 555 irq = irq;
571 s3c_irq_demux_uart(IRQ_S3CUART_RX2); 556 s3c_irq_demux_uart(IRQ_S3CUART_RX2);
@@ -573,7 +558,7 @@ s3c_irq_demux_uart2(unsigned int irq,
573 558
574static void 559static void
575s3c_irq_demux_extint8(unsigned int irq, 560s3c_irq_demux_extint8(unsigned int irq,
576 struct irqdesc *desc) 561 struct irq_desc *desc)
577{ 562{
578 unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND); 563 unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND);
579 unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK); 564 unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK);
@@ -595,7 +580,7 @@ s3c_irq_demux_extint8(unsigned int irq,
595 580
596static void 581static void
597s3c_irq_demux_extint4t7(unsigned int irq, 582s3c_irq_demux_extint4t7(unsigned int irq,
598 struct irqdesc *desc) 583 struct irq_desc *desc)
599{ 584{
600 unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND); 585 unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND);
601 unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK); 586 unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK);
@@ -738,7 +723,7 @@ void __init s3c24xx_init_irq(void)
738 case IRQ_UART2: 723 case IRQ_UART2:
739 case IRQ_ADCPARENT: 724 case IRQ_ADCPARENT:
740 set_irq_chip(irqno, &s3c_irq_level_chip); 725 set_irq_chip(irqno, &s3c_irq_level_chip);
741 set_irq_handler(irqno, do_level_IRQ); 726 set_irq_handler(irqno, handle_level_irq);
742 break; 727 break;
743 728
744 case IRQ_RESERVED6: 729 case IRQ_RESERVED6:
@@ -749,7 +734,7 @@ void __init s3c24xx_init_irq(void)
749 default: 734 default:
750 //irqdbf("registering irq %d (s3c irq)\n", irqno); 735 //irqdbf("registering irq %d (s3c irq)\n", irqno);
751 set_irq_chip(irqno, &s3c_irq_chip); 736 set_irq_chip(irqno, &s3c_irq_chip);
752 set_irq_handler(irqno, do_edge_IRQ); 737 set_irq_handler(irqno, handle_edge_irq);
753 set_irq_flags(irqno, IRQF_VALID); 738 set_irq_flags(irqno, IRQF_VALID);
754 } 739 }
755 } 740 }
@@ -769,14 +754,14 @@ void __init s3c24xx_init_irq(void)
769 for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) { 754 for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) {
770 irqdbf("registering irq %d (ext int)\n", irqno); 755 irqdbf("registering irq %d (ext int)\n", irqno);
771 set_irq_chip(irqno, &s3c_irq_eint0t4); 756 set_irq_chip(irqno, &s3c_irq_eint0t4);
772 set_irq_handler(irqno, do_edge_IRQ); 757 set_irq_handler(irqno, handle_edge_irq);
773 set_irq_flags(irqno, IRQF_VALID); 758 set_irq_flags(irqno, IRQF_VALID);
774 } 759 }
775 760
776 for (irqno = IRQ_EINT4; irqno <= IRQ_EINT23; irqno++) { 761 for (irqno = IRQ_EINT4; irqno <= IRQ_EINT23; irqno++) {
777 irqdbf("registering irq %d (extended s3c irq)\n", irqno); 762 irqdbf("registering irq %d (extended s3c irq)\n", irqno);
778 set_irq_chip(irqno, &s3c_irqext_chip); 763 set_irq_chip(irqno, &s3c_irqext_chip);
779 set_irq_handler(irqno, do_edge_IRQ); 764 set_irq_handler(irqno, handle_edge_irq);
780 set_irq_flags(irqno, IRQF_VALID); 765 set_irq_flags(irqno, IRQF_VALID);
781 } 766 }
782 767
@@ -787,28 +772,28 @@ void __init s3c24xx_init_irq(void)
787 for (irqno = IRQ_S3CUART_RX0; irqno <= IRQ_S3CUART_ERR0; irqno++) { 772 for (irqno = IRQ_S3CUART_RX0; irqno <= IRQ_S3CUART_ERR0; irqno++) {
788 irqdbf("registering irq %d (s3c uart0 irq)\n", irqno); 773 irqdbf("registering irq %d (s3c uart0 irq)\n", irqno);
789 set_irq_chip(irqno, &s3c_irq_uart0); 774 set_irq_chip(irqno, &s3c_irq_uart0);
790 set_irq_handler(irqno, do_level_IRQ); 775 set_irq_handler(irqno, handle_level_irq);
791 set_irq_flags(irqno, IRQF_VALID); 776 set_irq_flags(irqno, IRQF_VALID);
792 } 777 }
793 778
794 for (irqno = IRQ_S3CUART_RX1; irqno <= IRQ_S3CUART_ERR1; irqno++) { 779 for (irqno = IRQ_S3CUART_RX1; irqno <= IRQ_S3CUART_ERR1; irqno++) {
795 irqdbf("registering irq %d (s3c uart1 irq)\n", irqno); 780 irqdbf("registering irq %d (s3c uart1 irq)\n", irqno);
796 set_irq_chip(irqno, &s3c_irq_uart1); 781 set_irq_chip(irqno, &s3c_irq_uart1);
797 set_irq_handler(irqno, do_level_IRQ); 782 set_irq_handler(irqno, handle_level_irq);
798 set_irq_flags(irqno, IRQF_VALID); 783 set_irq_flags(irqno, IRQF_VALID);
799 } 784 }
800 785
801 for (irqno = IRQ_S3CUART_RX2; irqno <= IRQ_S3CUART_ERR2; irqno++) { 786 for (irqno = IRQ_S3CUART_RX2; irqno <= IRQ_S3CUART_ERR2; irqno++) {
802 irqdbf("registering irq %d (s3c uart2 irq)\n", irqno); 787 irqdbf("registering irq %d (s3c uart2 irq)\n", irqno);
803 set_irq_chip(irqno, &s3c_irq_uart2); 788 set_irq_chip(irqno, &s3c_irq_uart2);
804 set_irq_handler(irqno, do_level_IRQ); 789 set_irq_handler(irqno, handle_level_irq);
805 set_irq_flags(irqno, IRQF_VALID); 790 set_irq_flags(irqno, IRQF_VALID);
806 } 791 }
807 792
808 for (irqno = IRQ_TC; irqno <= IRQ_ADC; irqno++) { 793 for (irqno = IRQ_TC; irqno <= IRQ_ADC; irqno++) {
809 irqdbf("registering irq %d (s3c adc irq)\n", irqno); 794 irqdbf("registering irq %d (s3c adc irq)\n", irqno);
810 set_irq_chip(irqno, &s3c_irq_adc); 795 set_irq_chip(irqno, &s3c_irq_adc);
811 set_irq_handler(irqno, do_edge_IRQ); 796 set_irq_handler(irqno, handle_edge_irq);
812 set_irq_flags(irqno, IRQF_VALID); 797 set_irq_flags(irqno, IRQF_VALID);
813 } 798 }
814 799
diff --git a/arch/arm/mach-s3c2410/irq.h b/arch/arm/mach-s3c2410/irq.h
index 842a9f42c97b..e5913da3b919 100644
--- a/arch/arm/mach-s3c2410/irq.h
+++ b/arch/arm/mach-s3c2410/irq.h
@@ -8,8 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Modifications:
13*/ 11*/
14 12
15#define irqdbf(x...) 13#define irqdbf(x...)
@@ -17,7 +15,7 @@
17 15
18#define EXTINT_OFF (IRQ_EINT4 - 4) 16#define EXTINT_OFF (IRQ_EINT4 - 4)
19 17
20extern struct irqchip s3c_irq_level_chip; 18extern struct irq_chip s3c_irq_level_chip;
21 19
22static inline void 20static inline void
23s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit, 21s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit,
diff --git a/arch/arm/mach-s3c2410/mach-anubis.c b/arch/arm/mach-s3c2410/mach-anubis.c
index e94cdcd96591..0fad0c2fe07b 100644
--- a/arch/arm/mach-s3c2410/mach-anubis.c
+++ b/arch/arm/mach-s3c2410/mach-anubis.c
@@ -15,6 +15,7 @@
15#include <linux/list.h> 15#include <linux/list.h>
16#include <linux/timer.h> 16#include <linux/timer.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/serial_core.h>
18#include <linux/platform_device.h> 19#include <linux/platform_device.h>
19 20
20#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index 2968fb235f95..b8b76757ec54 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -16,6 +16,7 @@
16#include <linux/list.h> 16#include <linux/list.h>
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/serial_core.h>
19#include <linux/platform_device.h> 20#include <linux/platform_device.h>
20#include <linux/dm9000.h> 21#include <linux/dm9000.h>
21 22
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index 8c895c077d22..15b625eae499 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -17,6 +17,7 @@
17#include <linux/list.h> 17#include <linux/list.h>
18#include <linux/timer.h> 18#include <linux/timer.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/serial_core.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
21 22
22#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
@@ -33,14 +34,14 @@
33#include <asm/arch/regs-serial.h> 34#include <asm/arch/regs-serial.h>
34#include <asm/arch/regs-lcd.h> 35#include <asm/arch/regs-lcd.h>
35 36
37#include <asm/arch/h1940.h>
36#include <asm/arch/h1940-latch.h> 38#include <asm/arch/h1940-latch.h>
37#include <asm/arch/fb.h> 39#include <asm/arch/fb.h>
38 40
39#include <linux/serial_core.h>
40
41#include "clock.h" 41#include "clock.h"
42#include "devs.h" 42#include "devs.h"
43#include "cpu.h" 43#include "cpu.h"
44#include "pm.h"
44 45
45static struct map_desc h1940_iodesc[] __initdata = { 46static struct map_desc h1940_iodesc[] __initdata = {
46 [0] = { 47 [0] = {
@@ -164,12 +165,16 @@ static void __init h1940_map_io(void)
164 s3c24xx_init_clocks(0); 165 s3c24xx_init_clocks(0);
165 s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs)); 166 s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs));
166 s3c24xx_set_board(&h1940_board); 167 s3c24xx_set_board(&h1940_board);
168
169 /* setup PM */
170
171 memcpy(phys_to_virt(H1940_SUSPEND_RESUMEAT), h1940_pm_return, 1024);
172 s3c2410_pm_init();
167} 173}
168 174
169static void __init h1940_init_irq(void) 175static void __init h1940_init_irq(void)
170{ 176{
171 s3c24xx_init_irq(); 177 s3c24xx_init_irq();
172
173} 178}
174 179
175static void __init h1940_init(void) 180static void __init h1940_init(void)
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index 116ac3169966..0411e9adb54d 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -20,6 +20,7 @@
20#include <linux/timer.h> 20#include <linux/timer.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/delay.h> 22#include <linux/delay.h>
23#include <linux/serial_core.h>
23#include <linux/platform_device.h> 24#include <linux/platform_device.h>
24#include <linux/kthread.h> 25#include <linux/kthread.h>
25 26
@@ -37,8 +38,6 @@
37#include <asm/arch/regs-gpio.h> 38#include <asm/arch/regs-gpio.h>
38#include <asm/arch/iic.h> 39#include <asm/arch/iic.h>
39 40
40#include <linux/serial_core.h>
41
42#include "s3c2410.h" 41#include "s3c2410.h"
43#include "clock.h" 42#include "clock.h"
44#include "devs.h" 43#include "devs.h"
diff --git a/arch/arm/mach-s3c2410/mach-nexcoder.c b/arch/arm/mach-s3c2410/mach-nexcoder.c
index 065a1d4e860b..d6dfdad8c90b 100644
--- a/arch/arm/mach-s3c2410/mach-nexcoder.c
+++ b/arch/arm/mach-s3c2410/mach-nexcoder.c
@@ -19,6 +19,7 @@
19#include <linux/timer.h> 19#include <linux/timer.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/string.h> 21#include <linux/string.h>
22#include <linux/serial_core.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
23 24
24#include <linux/mtd/map.h> 25#include <linux/mtd/map.h>
diff --git a/arch/arm/mach-s3c2410/mach-osiris.c b/arch/arm/mach-s3c2410/mach-osiris.c
index e193ba69e652..37b40850c9b9 100644
--- a/arch/arm/mach-s3c2410/mach-osiris.c
+++ b/arch/arm/mach-s3c2410/mach-osiris.c
@@ -16,6 +16,7 @@
16#include <linux/timer.h> 16#include <linux/timer.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/device.h> 18#include <linux/device.h>
19#include <linux/serial_core.h>
19 20
20#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
21#include <asm/mach/map.h> 22#include <asm/mach/map.h>
@@ -114,6 +115,15 @@ static struct s3c2410_uartcfg osiris_uartcfgs[] __initdata = {
114 .clocks = osiris_serial_clocks, 115 .clocks = osiris_serial_clocks,
115 .clocks_size = ARRAY_SIZE(osiris_serial_clocks), 116 .clocks_size = ARRAY_SIZE(osiris_serial_clocks),
116 }, 117 },
118 [2] = {
119 .hwport = 2,
120 .flags = 0,
121 .ucon = UCON,
122 .ulcon = ULCON,
123 .ufcon = UFCON,
124 .clocks = osiris_serial_clocks,
125 .clocks_size = ARRAY_SIZE(osiris_serial_clocks),
126 }
117}; 127};
118 128
119/* NAND Flash on Osiris board */ 129/* NAND Flash on Osiris board */
diff --git a/arch/arm/mach-s3c2410/mach-otom.c b/arch/arm/mach-s3c2410/mach-otom.c
index c71673fd9955..2c738b375e4d 100644
--- a/arch/arm/mach-s3c2410/mach-otom.c
+++ b/arch/arm/mach-s3c2410/mach-otom.c
@@ -15,6 +15,7 @@
15#include <linux/list.h> 15#include <linux/list.h>
16#include <linux/timer.h> 16#include <linux/timer.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/serial_core.h>
18#include <linux/platform_device.h> 19#include <linux/platform_device.h>
19 20
20#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.c
index 23d7c052013c..ecbcdf79d739 100644
--- a/arch/arm/mach-s3c2410/mach-rx3715.c
+++ b/arch/arm/mach-s3c2410/mach-rx3715.c
@@ -42,6 +42,7 @@
42#include <asm/arch/regs-gpio.h> 42#include <asm/arch/regs-gpio.h>
43#include <asm/arch/regs-lcd.h> 43#include <asm/arch/regs-lcd.h>
44 44
45#include <asm/arch/h1940.h>
45#include <asm/arch/nand.h> 46#include <asm/arch/nand.h>
46#include <asm/arch/fb.h> 47#include <asm/arch/fb.h>
47 48
@@ -224,7 +225,9 @@ static void __init rx3715_init_irq(void)
224 225
225static void __init rx3715_init_machine(void) 226static void __init rx3715_init_machine(void)
226{ 227{
228 memcpy(phys_to_virt(H1940_SUSPEND_RESUMEAT), h1940_pm_return, 1024);
227 s3c2410_pm_init(); 229 s3c2410_pm_init();
230
228 s3c24xx_fb_set_platdata(&rx3715_lcdcfg); 231 s3c24xx_fb_set_platdata(&rx3715_lcdcfg);
229} 232}
230 233
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c
index b3b0171d5052..01c0c986d827 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2410.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2410.c
@@ -35,6 +35,7 @@
35#include <linux/list.h> 35#include <linux/list.h>
36#include <linux/timer.h> 36#include <linux/timer.h>
37#include <linux/init.h> 37#include <linux/init.h>
38#include <linux/serial_core.h>
38#include <linux/platform_device.h> 39#include <linux/platform_device.h>
39 40
40#include <asm/mach/arch.h> 41#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-s3c2410/mach-smdk2413.c b/arch/arm/mach-s3c2410/mach-smdk2413.c
index 3a4ca7f6f7b9..4f89abd7a6df 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2413.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2413.c
@@ -17,6 +17,7 @@
17#include <linux/list.h> 17#include <linux/list.h>
18#include <linux/timer.h> 18#include <linux/timer.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/serial_core.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
21 22
22#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-s3c2410/mach-smdk2440.c b/arch/arm/mach-s3c2410/mach-smdk2440.c
index e2205ff1b0ee..2b61f4ed1da4 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2440.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2440.c
@@ -19,6 +19,7 @@
19#include <linux/list.h> 19#include <linux/list.h>
20#include <linux/timer.h> 20#include <linux/timer.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/serial_core.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
23 24
24#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
index a0d7692cdb2b..a382fc095110 100644
--- a/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -41,6 +41,7 @@
41 41
42#include <asm/arch/regs-serial.h> 42#include <asm/arch/regs-serial.h>
43#include <asm/arch/regs-gpio.h> 43#include <asm/arch/regs-gpio.h>
44#include <asm/arch/leds-gpio.h>
44 45
45#include "clock.h" 46#include "clock.h"
46#include "devs.h" 47#include "devs.h"
@@ -313,6 +314,50 @@ static struct platform_device vr1000_dm9k1 = {
313 } 314 }
314}; 315};
315 316
317/* LEDS */
318
319static struct s3c24xx_led_platdata vr1000_led1_pdata = {
320 .name = "led1",
321 .gpio = S3C2410_GPB0,
322 .def_trigger = "",
323};
324
325static struct s3c24xx_led_platdata vr1000_led2_pdata = {
326 .name = "led2",
327 .gpio = S3C2410_GPB1,
328 .def_trigger = "",
329};
330
331static struct s3c24xx_led_platdata vr1000_led3_pdata = {
332 .name = "led3",
333 .gpio = S3C2410_GPB2,
334 .def_trigger = "",
335};
336
337static struct platform_device vr1000_led1 = {
338 .name = "s3c24xx_led",
339 .id = 1,
340 .dev = {
341 .platform_data = &vr1000_led1_pdata,
342 },
343};
344
345static struct platform_device vr1000_led2 = {
346 .name = "s3c24xx_led",
347 .id = 2,
348 .dev = {
349 .platform_data = &vr1000_led2_pdata,
350 },
351};
352
353static struct platform_device vr1000_led3 = {
354 .name = "s3c24xx_led",
355 .id = 3,
356 .dev = {
357 .platform_data = &vr1000_led3_pdata,
358 },
359};
360
316/* devices for this board */ 361/* devices for this board */
317 362
318static struct platform_device *vr1000_devices[] __initdata = { 363static struct platform_device *vr1000_devices[] __initdata = {
@@ -325,7 +370,10 @@ static struct platform_device *vr1000_devices[] __initdata = {
325 &serial_device, 370 &serial_device,
326 &vr1000_nor, 371 &vr1000_nor,
327 &vr1000_dm9k0, 372 &vr1000_dm9k0,
328 &vr1000_dm9k1 373 &vr1000_dm9k1,
374 &vr1000_led1,
375 &vr1000_led2,
376 &vr1000_led3,
329}; 377};
330 378
331static struct clk *vr1000_clocks[] = { 379static struct clk *vr1000_clocks[] = {
diff --git a/arch/arm/mach-s3c2410/mach-vstms.c b/arch/arm/mach-s3c2410/mach-vstms.c
index ea554e7c006e..0360e1055bcd 100644
--- a/arch/arm/mach-s3c2410/mach-vstms.c
+++ b/arch/arm/mach-s3c2410/mach-vstms.c
@@ -15,6 +15,7 @@
15#include <linux/list.h> 15#include <linux/list.h>
16#include <linux/timer.h> 16#include <linux/timer.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/serial_core.h>
18#include <linux/platform_device.h> 19#include <linux/platform_device.h>
19 20
20#include <linux/mtd/mtd.h> 21#include <linux/mtd/mtd.h>
diff --git a/arch/arm/mach-s3c2410/pm-h1940.S b/arch/arm/mach-s3c2410/pm-h1940.S
new file mode 100644
index 000000000000..7d66de7ff7db
--- /dev/null
+++ b/arch/arm/mach-s3c2410/pm-h1940.S
@@ -0,0 +1,33 @@
1/* linux/arch/arm/mach-s3c2410/pm-h1940.S
2 *
3 * Copyright (c) 2006 Ben Dooks <ben-linux@fluff.org>
4 *
5 * H1940 Suspend to RAM
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19*/
20
21#include <linux/linkage.h>
22#include <asm/assembler.h>
23#include <asm/hardware.h>
24#include <asm/arch/map.h>
25
26#include <asm/arch/regs-gpio.h>
27
28 .text
29 .global h1940_pm_return
30
31h1940_pm_return:
32 mov r0, #S3C2410_PA_GPIO
33 ldr pc, [ r0, #S3C2410_GSTATUS3 - S3C24XX_VA_GPIO ]
diff --git a/arch/arm/mach-s3c2410/pm-simtec.c b/arch/arm/mach-s3c2410/pm-simtec.c
index 42cd05e298f8..619133eb7168 100644
--- a/arch/arm/mach-s3c2410/pm-simtec.c
+++ b/arch/arm/mach-s3c2410/pm-simtec.c
@@ -27,7 +27,6 @@
27#include <asm/io.h> 27#include <asm/io.h>
28 28
29#include <asm/arch/map.h> 29#include <asm/arch/map.h>
30#include <asm/arch/regs-serial.h>
31#include <asm/arch/regs-gpio.h> 30#include <asm/arch/regs-gpio.h>
32#include <asm/arch/regs-mem.h> 31#include <asm/arch/regs-mem.h>
33 32
diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c
index b49a0b3b72b3..00834097eb82 100644
--- a/arch/arm/mach-s3c2410/pm.c
+++ b/arch/arm/mach-s3c2410/pm.c
@@ -34,6 +34,7 @@
34#include <linux/crc32.h> 34#include <linux/crc32.h>
35#include <linux/ioport.h> 35#include <linux/ioport.h>
36#include <linux/delay.h> 36#include <linux/delay.h>
37#include <linux/serial_core.h>
37 38
38#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
39#include <asm/hardware.h> 40#include <asm/hardware.h>
diff --git a/arch/arm/mach-s3c2410/s3c2410-clock.c b/arch/arm/mach-s3c2410/s3c2410-clock.c
index 00abe199a08e..992cc6af230e 100644
--- a/arch/arm/mach-s3c2410/s3c2410-clock.c
+++ b/arch/arm/mach-s3c2410/s3c2410-clock.c
@@ -30,13 +30,18 @@
30#include <linux/clk.h> 30#include <linux/clk.h>
31#include <linux/mutex.h> 31#include <linux/mutex.h>
32#include <linux/delay.h> 32#include <linux/delay.h>
33#include <linux/serial_core.h>
34
35#include <asm/mach/map.h>
33 36
34#include <asm/hardware.h> 37#include <asm/hardware.h>
35#include <asm/io.h> 38#include <asm/io.h>
36 39
40#include <asm/arch/regs-serial.h>
37#include <asm/arch/regs-clock.h> 41#include <asm/arch/regs-clock.h>
38#include <asm/arch/regs-gpio.h> 42#include <asm/arch/regs-gpio.h>
39 43
44#include "s3c2410.h"
40#include "clock.h" 45#include "clock.h"
41#include "cpu.h" 46#include "cpu.h"
42 47
diff --git a/arch/arm/mach-s3c2410/s3c2410-dma.c b/arch/arm/mach-s3c2410/s3c2410-dma.c
index 51e5098b32e8..e67ba3911f11 100644
--- a/arch/arm/mach-s3c2410/s3c2410-dma.c
+++ b/arch/arm/mach-s3c2410/s3c2410-dma.c
@@ -1,6 +1,6 @@
1/* linux/arch/arm/mach-s3c2410/s3c2410-dma.c 1/* linux/arch/arm/mach-s3c2410/s3c2410-dma.c
2 * 2 *
3 * (c) 2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * S3C2410 DMA selection 6 * S3C2410 DMA selection
@@ -15,6 +15,7 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/sysdev.h> 17#include <linux/sysdev.h>
18#include <linux/serial_core.h>
18 19
19#include <asm/dma.h> 20#include <asm/dma.h>
20#include <asm/arch/dma.h> 21#include <asm/arch/dma.h>
@@ -131,6 +132,7 @@ static int s3c2410_dma_add(struct sys_device *sysdev)
131 return s3c24xx_dma_init_map(&s3c2410_dma_sel); 132 return s3c24xx_dma_init_map(&s3c2410_dma_sel);
132} 133}
133 134
135#if defined(CONFIG_CPU_S3C2410)
134static struct sysdev_driver s3c2410_dma_driver = { 136static struct sysdev_driver s3c2410_dma_driver = {
135 .add = s3c2410_dma_add, 137 .add = s3c2410_dma_add,
136}; 138};
@@ -141,9 +143,10 @@ static int __init s3c2410_dma_init(void)
141} 143}
142 144
143arch_initcall(s3c2410_dma_init); 145arch_initcall(s3c2410_dma_init);
146#endif
144 147
148#if defined(CONFIG_CPU_S3C2442)
145/* S3C2442 DMA contains the same selection table as the S3C2410 */ 149/* S3C2442 DMA contains the same selection table as the S3C2410 */
146
147static struct sysdev_driver s3c2442_dma_driver = { 150static struct sysdev_driver s3c2442_dma_driver = {
148 .add = s3c2410_dma_add, 151 .add = s3c2410_dma_add,
149}; 152};
@@ -154,5 +157,5 @@ static int __init s3c2442_dma_init(void)
154} 157}
155 158
156arch_initcall(s3c2442_dma_init); 159arch_initcall(s3c2442_dma_init);
157 160#endif
158 161
diff --git a/arch/arm/mach-s3c2410/s3c2410-pm.c b/arch/arm/mach-s3c2410/s3c2410-pm.c
index e51d76669512..8bb6e5e21f59 100644
--- a/arch/arm/mach-s3c2410/s3c2410-pm.c
+++ b/arch/arm/mach-s3c2410/s3c2410-pm.c
@@ -32,6 +32,7 @@
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33 33
34#include <asm/arch/regs-gpio.h> 34#include <asm/arch/regs-gpio.h>
35#include <asm/arch/h1940.h>
35 36
36#include "cpu.h" 37#include "cpu.h"
37#include "pm.h" 38#include "pm.h"
@@ -52,12 +53,41 @@ static void s3c2410_pm_prepare(void)
52 DBG("GSTATUS3 0x%08x\n", __raw_readl(S3C2410_GSTATUS3)); 53 DBG("GSTATUS3 0x%08x\n", __raw_readl(S3C2410_GSTATUS3));
53 DBG("GSTATUS4 0x%08x\n", __raw_readl(S3C2410_GSTATUS4)); 54 DBG("GSTATUS4 0x%08x\n", __raw_readl(S3C2410_GSTATUS4));
54 55
56 if (machine_is_h1940()) {
57 void *base = phys_to_virt(H1940_SUSPEND_CHECK);
58 unsigned long ptr;
59 unsigned long calc = 0;
60
61 /* generate check for the bootloader to check on resume */
62
63 for (ptr = 0; ptr < 0x40000; ptr += 0x400)
64 calc += __raw_readl(base+ptr);
65
66 __raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
67 }
68
69 /* the RX3715 uses similar code and the same H1940 and the
70 * same offsets for resume and checksum pointers */
71
72 if (machine_is_rx3715()) {
73 void *base = phys_to_virt(H1940_SUSPEND_CHECK);
74 unsigned long ptr;
75 unsigned long calc = 0;
76
77 /* generate check for the bootloader to check on resume */
78
79 for (ptr = 0; ptr < 0x40000; ptr += 0x4)
80 calc += __raw_readl(base+ptr);
81
82 __raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
83 }
84
55 if ( machine_is_aml_m5900() ) 85 if ( machine_is_aml_m5900() )
56 s3c2410_gpio_setpin(S3C2410_GPF2, 1); 86 s3c2410_gpio_setpin(S3C2410_GPF2, 1);
57 87
58} 88}
59 89
60int s3c2410_pm_resume(struct sys_device *dev) 90static int s3c2410_pm_resume(struct sys_device *dev)
61{ 91{
62 unsigned long tmp; 92 unsigned long tmp;
63 93
@@ -81,6 +111,7 @@ static int s3c2410_pm_add(struct sys_device *dev)
81 return 0; 111 return 0;
82} 112}
83 113
114#if defined(CONFIG_CPU_S3C2410)
84static struct sysdev_driver s3c2410_pm_driver = { 115static struct sysdev_driver s3c2410_pm_driver = {
85 .add = s3c2410_pm_add, 116 .add = s3c2410_pm_add,
86 .resume = s3c2410_pm_resume, 117 .resume = s3c2410_pm_resume,
@@ -94,7 +125,9 @@ static int __init s3c2410_pm_drvinit(void)
94} 125}
95 126
96arch_initcall(s3c2410_pm_drvinit); 127arch_initcall(s3c2410_pm_drvinit);
128#endif
97 129
130#if defined(CONFIG_CPU_S3C2440)
98static struct sysdev_driver s3c2440_pm_driver = { 131static struct sysdev_driver s3c2440_pm_driver = {
99 .add = s3c2410_pm_add, 132 .add = s3c2410_pm_add,
100 .resume = s3c2410_pm_resume, 133 .resume = s3c2410_pm_resume,
@@ -106,7 +139,9 @@ static int __init s3c2440_pm_drvinit(void)
106} 139}
107 140
108arch_initcall(s3c2440_pm_drvinit); 141arch_initcall(s3c2440_pm_drvinit);
142#endif
109 143
144#if defined(CONFIG_CPU_S3C2442)
110static struct sysdev_driver s3c2442_pm_driver = { 145static struct sysdev_driver s3c2442_pm_driver = {
111 .add = s3c2410_pm_add, 146 .add = s3c2410_pm_add,
112 .resume = s3c2410_pm_resume, 147 .resume = s3c2410_pm_resume,
@@ -118,3 +153,4 @@ static int __init s3c2442_pm_drvinit(void)
118} 153}
119 154
120arch_initcall(s3c2442_pm_drvinit); 155arch_initcall(s3c2442_pm_drvinit);
156#endif
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c
index 183e4033ce61..4cdc0d70c19f 100644
--- a/arch/arm/mach-s3c2410/s3c2410.c
+++ b/arch/arm/mach-s3c2410/s3c2410.c
@@ -17,6 +17,7 @@
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/sysdev.h> 19#include <linux/sysdev.h>
20#include <linux/serial_core.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
21 22
22#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
@@ -38,11 +39,9 @@
38/* Initial IO mappings */ 39/* Initial IO mappings */
39 40
40static struct map_desc s3c2410_iodesc[] __initdata = { 41static struct map_desc s3c2410_iodesc[] __initdata = {
41 IODESC_ENT(USBHOST),
42 IODESC_ENT(CLKPWR), 42 IODESC_ENT(CLKPWR),
43 IODESC_ENT(LCD), 43 IODESC_ENT(LCD),
44 IODESC_ENT(TIMER), 44 IODESC_ENT(TIMER),
45 IODESC_ENT(ADC),
46 IODESC_ENT(WATCHDOG), 45 IODESC_ENT(WATCHDOG),
47}; 46};
48 47
diff --git a/arch/arm/mach-s3c2410/s3c2412-clock.c b/arch/arm/mach-s3c2410/s3c2412-clock.c
index c95ed3e18580..8f94ad83901d 100644
--- a/arch/arm/mach-s3c2410/s3c2412-clock.c
+++ b/arch/arm/mach-s3c2410/s3c2412-clock.c
@@ -30,13 +30,18 @@
30#include <linux/clk.h> 30#include <linux/clk.h>
31#include <linux/mutex.h> 31#include <linux/mutex.h>
32#include <linux/delay.h> 32#include <linux/delay.h>
33#include <linux/serial_core.h>
34
35#include <asm/mach/map.h>
33 36
34#include <asm/hardware.h> 37#include <asm/hardware.h>
35#include <asm/io.h> 38#include <asm/io.h>
36 39
40#include <asm/arch/regs-serial.h>
37#include <asm/arch/regs-clock.h> 41#include <asm/arch/regs-clock.h>
38#include <asm/arch/regs-gpio.h> 42#include <asm/arch/regs-gpio.h>
39 43
44#include "s3c2412.h"
40#include "clock.h" 45#include "clock.h"
41#include "cpu.h" 46#include "cpu.h"
42 47
@@ -49,7 +54,7 @@
49 * set the correct muxing at initialisation 54 * set the correct muxing at initialisation
50*/ 55*/
51 56
52int s3c2412_clkcon_enable(struct clk *clk, int enable) 57static int s3c2412_clkcon_enable(struct clk *clk, int enable)
53{ 58{
54 unsigned int clocks = clk->ctrlbit; 59 unsigned int clocks = clk->ctrlbit;
55 unsigned long clkcon; 60 unsigned long clkcon;
@@ -556,7 +561,7 @@ struct clk_init {
556 struct clk *src_1; 561 struct clk *src_1;
557}; 562};
558 563
559struct clk_init clks_src[] __initdata = { 564static struct clk_init clks_src[] __initdata = {
560 { 565 {
561 .clk = &clk_usysclk, 566 .clk = &clk_usysclk,
562 .bit = S3C2412_CLKSRC_USBCLK_HCLK, 567 .bit = S3C2412_CLKSRC_USBCLK_HCLK,
@@ -619,7 +624,7 @@ static void __init s3c2412_clk_initparents(void)
619 624
620/* clocks to add straight away */ 625/* clocks to add straight away */
621 626
622struct clk *clks[] __initdata = { 627static struct clk *clks[] __initdata = {
623 &clk_ext, 628 &clk_ext,
624 &clk_usb_bus, 629 &clk_usb_bus,
625 &clk_erefclk, 630 &clk_erefclk,
diff --git a/arch/arm/mach-s3c2410/s3c2412-dma.c b/arch/arm/mach-s3c2410/s3c2412-dma.c
index 171f3706d36d..fe71a8fdb87c 100644
--- a/arch/arm/mach-s3c2410/s3c2412-dma.c
+++ b/arch/arm/mach-s3c2410/s3c2412-dma.c
@@ -1,6 +1,6 @@
1/* linux/arch/arm/mach-s3c2410/s3c2412-dma.c 1/* linux/arch/arm/mach-s3c2410/s3c2412-dma.c
2 * 2 *
3 * (c) 2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * S3C2412 DMA selection 6 * S3C2412 DMA selection
@@ -15,6 +15,7 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/sysdev.h> 17#include <linux/sysdev.h>
18#include <linux/serial_core.h>
18 19
19#include <asm/dma.h> 20#include <asm/dma.h>
20#include <asm/arch/dma.h> 21#include <asm/arch/dma.h>
diff --git a/arch/arm/mach-s3c2410/s3c2412-irq.c b/arch/arm/mach-s3c2410/s3c2412-irq.c
index 7f741547658f..ffcc30b23a80 100644
--- a/arch/arm/mach-s3c2410/s3c2412-irq.c
+++ b/arch/arm/mach-s3c2410/s3c2412-irq.c
@@ -98,7 +98,7 @@ s3c2412_irq_unmask(unsigned int irqno)
98 __raw_writel(mask & ~bitval, S3C2410_INTMSK); 98 __raw_writel(mask & ~bitval, S3C2410_INTMSK);
99} 99}
100 100
101static struct irqchip s3c2412_irq_eint0t4 = { 101static struct irq_chip s3c2412_irq_eint0t4 = {
102 .ack = s3c2412_irq_ack, 102 .ack = s3c2412_irq_ack,
103 .mask = s3c2412_irq_mask, 103 .mask = s3c2412_irq_mask,
104 .unmask = s3c2412_irq_unmask, 104 .unmask = s3c2412_irq_unmask,
@@ -112,7 +112,7 @@ static int s3c2412_irq_add(struct sys_device *sysdev)
112 112
113 for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) { 113 for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) {
114 set_irq_chip(irqno, &s3c2412_irq_eint0t4); 114 set_irq_chip(irqno, &s3c2412_irq_eint0t4);
115 set_irq_handler(irqno, do_edge_IRQ); 115 set_irq_handler(irqno, handle_edge_irq);
116 set_irq_flags(irqno, IRQF_VALID); 116 set_irq_flags(irqno, IRQF_VALID);
117 } 117 }
118 118
diff --git a/arch/arm/mach-s3c2410/s3c2412.c b/arch/arm/mach-s3c2410/s3c2412.c
index e76431c41461..2f651a811ecd 100644
--- a/arch/arm/mach-s3c2410/s3c2412.c
+++ b/arch/arm/mach-s3c2410/s3c2412.c
@@ -17,6 +17,7 @@
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/sysdev.h> 19#include <linux/sysdev.h>
20#include <linux/serial_core.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
21 22
22#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
@@ -60,7 +61,6 @@ static struct map_desc s3c2412_iodesc[] __initdata = {
60 IODESC_ENT(CLKPWR), 61 IODESC_ENT(CLKPWR),
61 IODESC_ENT(LCD), 62 IODESC_ENT(LCD),
62 IODESC_ENT(TIMER), 63 IODESC_ENT(TIMER),
63 IODESC_ENT(ADC),
64 IODESC_ENT(WATCHDOG), 64 IODESC_ENT(WATCHDOG),
65}; 65};
66 66
diff --git a/arch/arm/mach-s3c2410/s3c2440-clock.c b/arch/arm/mach-s3c2410/s3c2440-clock.c
index 15796864d010..ba13c1d079d1 100644
--- a/arch/arm/mach-s3c2410/s3c2440-clock.c
+++ b/arch/arm/mach-s3c2410/s3c2440-clock.c
@@ -113,18 +113,18 @@ static int s3c2440_clk_add(struct sys_device *sysdev)
113{ 113{
114 unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN); 114 unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
115 unsigned long clkdivn; 115 unsigned long clkdivn;
116 struct clk *clk_h; 116 struct clk *clock_h;
117 struct clk *clk_p; 117 struct clk *clock_p;
118 struct clk *clk_upll; 118 struct clk *clock_upll;
119 119
120 printk("S3C2440: Clock Support, DVS %s\n", 120 printk("S3C2440: Clock Support, DVS %s\n",
121 (camdivn & S3C2440_CAMDIVN_DVSEN) ? "on" : "off"); 121 (camdivn & S3C2440_CAMDIVN_DVSEN) ? "on" : "off");
122 122
123 clk_p = clk_get(NULL, "pclk"); 123 clock_p = clk_get(NULL, "pclk");
124 clk_h = clk_get(NULL, "hclk"); 124 clock_h = clk_get(NULL, "hclk");
125 clk_upll = clk_get(NULL, "upll"); 125 clock_upll = clk_get(NULL, "upll");
126 126
127 if (IS_ERR(clk_p) || IS_ERR(clk_h) || IS_ERR(clk_upll)) { 127 if (IS_ERR(clock_p) || IS_ERR(clock_h) || IS_ERR(clock_upll)) {
128 printk(KERN_ERR "S3C2440: Failed to get parent clocks\n"); 128 printk(KERN_ERR "S3C2440: Failed to get parent clocks\n");
129 return -EINVAL; 129 return -EINVAL;
130 } 130 }
@@ -132,8 +132,8 @@ static int s3c2440_clk_add(struct sys_device *sysdev)
132 /* check rate of UPLL, and if it is near 96MHz, then change 132 /* check rate of UPLL, and if it is near 96MHz, then change
133 * to using half the UPLL rate for the system */ 133 * to using half the UPLL rate for the system */
134 134
135 if (clk_get_rate(clk_upll) > (94 * MHZ)) { 135 if (clk_get_rate(clock_upll) > (94 * MHZ)) {
136 clk_usb_bus.rate = clk_get_rate(clk_upll) / 2; 136 clk_usb_bus.rate = clk_get_rate(clock_upll) / 2;
137 137
138 mutex_lock(&clocks_mutex); 138 mutex_lock(&clocks_mutex);
139 139
@@ -144,9 +144,9 @@ static int s3c2440_clk_add(struct sys_device *sysdev)
144 mutex_unlock(&clocks_mutex); 144 mutex_unlock(&clocks_mutex);
145 } 145 }
146 146
147 s3c2440_clk_cam.parent = clk_h; 147 s3c2440_clk_cam.parent = clock_h;
148 s3c2440_clk_ac97.parent = clk_p; 148 s3c2440_clk_ac97.parent = clock_p;
149 s3c2440_clk_cam_upll.parent = clk_upll; 149 s3c2440_clk_cam_upll.parent = clock_upll;
150 150
151 s3c24xx_register_clock(&s3c2440_clk_ac97); 151 s3c24xx_register_clock(&s3c2440_clk_ac97);
152 s3c24xx_register_clock(&s3c2440_clk_cam); 152 s3c24xx_register_clock(&s3c2440_clk_cam);
diff --git a/arch/arm/mach-s3c2410/s3c2440-dma.c b/arch/arm/mach-s3c2410/s3c2440-dma.c
index 11e109c84a15..47b861b9443d 100644
--- a/arch/arm/mach-s3c2410/s3c2440-dma.c
+++ b/arch/arm/mach-s3c2410/s3c2440-dma.c
@@ -1,6 +1,6 @@
1/* linux/arch/arm/mach-s3c2410/s3c2440-dma.c 1/* linux/arch/arm/mach-s3c2410/s3c2440-dma.c
2 * 2 *
3 * (c) 2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * S3C2440 DMA selection 6 * S3C2440 DMA selection
@@ -15,6 +15,7 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/sysdev.h> 17#include <linux/sysdev.h>
18#include <linux/serial_core.h>
18 19
19#include <asm/dma.h> 20#include <asm/dma.h>
20#include <asm/arch/dma.h> 21#include <asm/arch/dma.h>
diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2410/s3c2440-irq.c
index 39db0752d53b..1ba19b27ab05 100644
--- a/arch/arm/mach-s3c2410/s3c2440-irq.c
+++ b/arch/arm/mach-s3c2410/s3c2440-irq.c
@@ -42,10 +42,10 @@
42/* WDT/AC97 */ 42/* WDT/AC97 */
43 43
44static void s3c_irq_demux_wdtac97(unsigned int irq, 44static void s3c_irq_demux_wdtac97(unsigned int irq,
45 struct irqdesc *desc) 45 struct irq_desc *desc)
46{ 46{
47 unsigned int subsrc, submsk; 47 unsigned int subsrc, submsk;
48 struct irqdesc *mydesc; 48 struct irq_desc *mydesc;
49 49
50 /* read the current pending interrupts, and the mask 50 /* read the current pending interrupts, and the mask
51 * for what it is available */ 51 * for what it is available */
@@ -90,7 +90,7 @@ s3c_irq_wdtac97_ack(unsigned int irqno)
90 s3c_irqsub_maskack(irqno, INTMSK_WDT, 3<<13); 90 s3c_irqsub_maskack(irqno, INTMSK_WDT, 3<<13);
91} 91}
92 92
93static struct irqchip s3c_irq_wdtac97 = { 93static struct irq_chip s3c_irq_wdtac97 = {
94 .mask = s3c_irq_wdtac97_mask, 94 .mask = s3c_irq_wdtac97_mask,
95 .unmask = s3c_irq_wdtac97_unmask, 95 .unmask = s3c_irq_wdtac97_unmask,
96 .ack = s3c_irq_wdtac97_ack, 96 .ack = s3c_irq_wdtac97_ack,
@@ -105,12 +105,12 @@ static int s3c2440_irq_add(struct sys_device *sysdev)
105 /* add new chained handler for wdt, ac7 */ 105 /* add new chained handler for wdt, ac7 */
106 106
107 set_irq_chip(IRQ_WDT, &s3c_irq_level_chip); 107 set_irq_chip(IRQ_WDT, &s3c_irq_level_chip);
108 set_irq_handler(IRQ_WDT, do_level_IRQ); 108 set_irq_handler(IRQ_WDT, handle_level_irq);
109 set_irq_chained_handler(IRQ_WDT, s3c_irq_demux_wdtac97); 109 set_irq_chained_handler(IRQ_WDT, s3c_irq_demux_wdtac97);
110 110
111 for (irqno = IRQ_S3C2440_WDT; irqno <= IRQ_S3C2440_AC97; irqno++) { 111 for (irqno = IRQ_S3C2440_WDT; irqno <= IRQ_S3C2440_AC97; irqno++) {
112 set_irq_chip(irqno, &s3c_irq_wdtac97); 112 set_irq_chip(irqno, &s3c_irq_wdtac97);
113 set_irq_handler(irqno, do_level_IRQ); 113 set_irq_handler(irqno, handle_level_irq);
114 set_irq_flags(irqno, IRQF_VALID); 114 set_irq_flags(irqno, IRQF_VALID);
115 } 115 }
116 116
diff --git a/arch/arm/mach-s3c2410/s3c2440.c b/arch/arm/mach-s3c2410/s3c2440.c
index 0ab50f44f318..344eb27cca48 100644
--- a/arch/arm/mach-s3c2410/s3c2440.c
+++ b/arch/arm/mach-s3c2410/s3c2440.c
@@ -17,6 +17,7 @@
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/serial_core.h>
20#include <linux/sysdev.h> 21#include <linux/sysdev.h>
21#include <linux/clk.h> 22#include <linux/clk.h>
22 23
@@ -28,17 +29,9 @@
28#include <asm/io.h> 29#include <asm/io.h>
29#include <asm/irq.h> 30#include <asm/irq.h>
30 31
31#include <asm/arch/regs-clock.h>
32#include <asm/arch/regs-serial.h>
33#include <asm/arch/regs-gpio.h>
34#include <asm/arch/regs-gpioj.h>
35#include <asm/arch/regs-dsc.h>
36
37#include "s3c2440.h" 32#include "s3c2440.h"
38#include "clock.h"
39#include "devs.h" 33#include "devs.h"
40#include "cpu.h" 34#include "cpu.h"
41#include "pm.h"
42 35
43static struct sys_device s3c2440_sysdev = { 36static struct sys_device s3c2440_sysdev = {
44 .cls = &s3c2440_sysclass, 37 .cls = &s3c2440_sysclass,
diff --git a/arch/arm/mach-s3c2410/s3c2440.h b/arch/arm/mach-s3c2410/s3c2440.h
index 29cb6df65a48..dcd316076c59 100644
--- a/arch/arm/mach-s3c2410/s3c2440.h
+++ b/arch/arm/mach-s3c2410/s3c2440.h
@@ -8,28 +8,10 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Modifications:
13 * 24-Aug-2004 BJD Start of S3C2440 CPU support
14 * 04-Nov-2004 BJD Added s3c2440_init_uarts()
15 * 04-Jan-2005 BJD Moved uart init to cpu code
16 * 10-Jan-2005 BJD Moved 2440 specific init here
17 * 14-Jan-2005 BJD Split the clock initialisation code
18*/ 11*/
19 12
20#ifdef CONFIG_CPU_S3C2440 13#ifdef CONFIG_CPU_S3C2440
21
22extern int s3c2440_init(void); 14extern int s3c2440_init(void);
23
24extern void s3c2440_map_io(struct map_desc *mach_desc, int size);
25
26extern void s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no);
27
28extern void s3c2440_init_clocks(int xtal);
29
30#else 15#else
31#define s3c2440_init_clocks NULL
32#define s3c2440_init_uarts NULL
33#define s3c2440_map_io NULL
34#define s3c2440_init NULL 16#define s3c2440_init NULL
35#endif 17#endif
diff --git a/arch/arm/mach-s3c2410/s3c2442-clock.c b/arch/arm/mach-s3c2410/s3c2442-clock.c
index d9f54b5cab7f..4e292ca7c9be 100644
--- a/arch/arm/mach-s3c2410/s3c2442-clock.c
+++ b/arch/arm/mach-s3c2410/s3c2442-clock.c
@@ -117,18 +117,18 @@ static int s3c2442_clk_add(struct sys_device *sysdev)
117{ 117{
118 unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN); 118 unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
119 unsigned long clkdivn; 119 unsigned long clkdivn;
120 struct clk *clk_h; 120 struct clk *clock_h;
121 struct clk *clk_p; 121 struct clk *clock_p;
122 struct clk *clk_upll; 122 struct clk *clock_upll;
123 123
124 printk("S3C2442: Clock Support, DVS %s\n", 124 printk("S3C2442: Clock Support, DVS %s\n",
125 (camdivn & S3C2440_CAMDIVN_DVSEN) ? "on" : "off"); 125 (camdivn & S3C2440_CAMDIVN_DVSEN) ? "on" : "off");
126 126
127 clk_p = clk_get(NULL, "pclk"); 127 clock_p = clk_get(NULL, "pclk");
128 clk_h = clk_get(NULL, "hclk"); 128 clock_h = clk_get(NULL, "hclk");
129 clk_upll = clk_get(NULL, "upll"); 129 clock_upll = clk_get(NULL, "upll");
130 130
131 if (IS_ERR(clk_p) || IS_ERR(clk_h) || IS_ERR(clk_upll)) { 131 if (IS_ERR(clock_p) || IS_ERR(clock_h) || IS_ERR(clock_upll)) {
132 printk(KERN_ERR "S3C2442: Failed to get parent clocks\n"); 132 printk(KERN_ERR "S3C2442: Failed to get parent clocks\n");
133 return -EINVAL; 133 return -EINVAL;
134 } 134 }
@@ -136,8 +136,8 @@ static int s3c2442_clk_add(struct sys_device *sysdev)
136 /* check rate of UPLL, and if it is near 96MHz, then change 136 /* check rate of UPLL, and if it is near 96MHz, then change
137 * to using half the UPLL rate for the system */ 137 * to using half the UPLL rate for the system */
138 138
139 if (clk_get_rate(clk_upll) > (94 * MHZ)) { 139 if (clk_get_rate(clock_upll) > (94 * MHZ)) {
140 clk_usb_bus.rate = clk_get_rate(clk_upll) / 2; 140 clk_usb_bus.rate = clk_get_rate(clock_upll) / 2;
141 141
142 mutex_lock(&clocks_mutex); 142 mutex_lock(&clocks_mutex);
143 143
@@ -148,8 +148,8 @@ static int s3c2442_clk_add(struct sys_device *sysdev)
148 mutex_unlock(&clocks_mutex); 148 mutex_unlock(&clocks_mutex);
149 } 149 }
150 150
151 s3c2442_clk_cam.parent = clk_h; 151 s3c2442_clk_cam.parent = clock_h;
152 s3c2442_clk_cam_upll.parent = clk_upll; 152 s3c2442_clk_cam_upll.parent = clock_upll;
153 153
154 s3c24xx_register_clock(&s3c2442_clk_cam); 154 s3c24xx_register_clock(&s3c2442_clk_cam);
155 s3c24xx_register_clock(&s3c2442_clk_cam_upll); 155 s3c24xx_register_clock(&s3c2442_clk_cam_upll);
diff --git a/arch/arm/mach-s3c2410/s3c2442.c b/arch/arm/mach-s3c2410/s3c2442.c
index 581667efd13c..428732ee68c4 100644
--- a/arch/arm/mach-s3c2410/s3c2442.c
+++ b/arch/arm/mach-s3c2410/s3c2442.c
@@ -16,29 +16,11 @@
16#include <linux/list.h> 16#include <linux/list.h>
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/platform_device.h> 19#include <linux/serial_core.h>
20#include <linux/sysdev.h> 20#include <linux/sysdev.h>
21#include <linux/clk.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
31#include <asm/arch/regs-clock.h>
32#include <asm/arch/regs-serial.h>
33#include <asm/arch/regs-gpio.h>
34#include <asm/arch/regs-gpioj.h>
35#include <asm/arch/regs-dsc.h>
36 21
37#include "s3c2442.h" 22#include "s3c2442.h"
38#include "clock.h"
39#include "devs.h"
40#include "cpu.h" 23#include "cpu.h"
41#include "pm.h"
42 24
43static struct sys_device s3c2442_sysdev = { 25static struct sys_device s3c2442_sysdev = {
44 .cls = &s3c2442_sysclass, 26 .cls = &s3c2442_sysclass,
diff --git a/arch/arm/mach-s3c2410/s3c244x-irq.c b/arch/arm/mach-s3c2410/s3c244x-irq.c
index 146f2109dd90..ede94636a72a 100644
--- a/arch/arm/mach-s3c2410/s3c244x-irq.c
+++ b/arch/arm/mach-s3c2410/s3c244x-irq.c
@@ -42,10 +42,10 @@
42/* camera irq */ 42/* camera irq */
43 43
44static void s3c_irq_demux_cam(unsigned int irq, 44static void s3c_irq_demux_cam(unsigned int irq,
45 struct irqdesc *desc) 45 struct irq_desc *desc)
46{ 46{
47 unsigned int subsrc, submsk; 47 unsigned int subsrc, submsk;
48 struct irqdesc *mydesc; 48 struct irq_desc *mydesc;
49 49
50 /* read the current pending interrupts, and the mask 50 /* read the current pending interrupts, and the mask
51 * for what it is available */ 51 * for what it is available */
@@ -89,7 +89,7 @@ s3c_irq_cam_ack(unsigned int irqno)
89 s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11); 89 s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11);
90} 90}
91 91
92static struct irqchip s3c_irq_cam = { 92static struct irq_chip s3c_irq_cam = {
93 .mask = s3c_irq_cam_mask, 93 .mask = s3c_irq_cam_mask,
94 .unmask = s3c_irq_cam_unmask, 94 .unmask = s3c_irq_cam_unmask,
95 .ack = s3c_irq_cam_ack, 95 .ack = s3c_irq_cam_ack,
@@ -100,18 +100,18 @@ static int s3c244x_irq_add(struct sys_device *sysdev)
100 unsigned int irqno; 100 unsigned int irqno;
101 101
102 set_irq_chip(IRQ_NFCON, &s3c_irq_level_chip); 102 set_irq_chip(IRQ_NFCON, &s3c_irq_level_chip);
103 set_irq_handler(IRQ_NFCON, do_level_IRQ); 103 set_irq_handler(IRQ_NFCON, handle_level_irq);
104 set_irq_flags(IRQ_NFCON, IRQF_VALID); 104 set_irq_flags(IRQ_NFCON, IRQF_VALID);
105 105
106 /* add chained handler for camera */ 106 /* add chained handler for camera */
107 107
108 set_irq_chip(IRQ_CAM, &s3c_irq_level_chip); 108 set_irq_chip(IRQ_CAM, &s3c_irq_level_chip);
109 set_irq_handler(IRQ_CAM, do_level_IRQ); 109 set_irq_handler(IRQ_CAM, handle_level_irq);
110 set_irq_chained_handler(IRQ_CAM, s3c_irq_demux_cam); 110 set_irq_chained_handler(IRQ_CAM, s3c_irq_demux_cam);
111 111
112 for (irqno = IRQ_S3C2440_CAM_C; irqno <= IRQ_S3C2440_CAM_P; irqno++) { 112 for (irqno = IRQ_S3C2440_CAM_C; irqno <= IRQ_S3C2440_CAM_P; irqno++) {
113 set_irq_chip(irqno, &s3c_irq_cam); 113 set_irq_chip(irqno, &s3c_irq_cam);
114 set_irq_handler(irqno, do_level_IRQ); 114 set_irq_handler(irqno, handle_level_irq);
115 set_irq_flags(irqno, IRQF_VALID); 115 set_irq_flags(irqno, IRQF_VALID);
116 } 116 }
117 117
diff --git a/arch/arm/mach-s3c2410/s3c244x.c b/arch/arm/mach-s3c2410/s3c244x.c
index 9a2258270de9..23c7494ad10d 100644
--- a/arch/arm/mach-s3c2410/s3c244x.c
+++ b/arch/arm/mach-s3c2410/s3c244x.c
@@ -16,6 +16,7 @@
16#include <linux/list.h> 16#include <linux/list.h>
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/serial_core.h>
19#include <linux/platform_device.h> 20#include <linux/platform_device.h>
20#include <linux/sysdev.h> 21#include <linux/sysdev.h>
21#include <linux/clk.h> 22#include <linux/clk.h>
@@ -47,8 +48,6 @@ static struct map_desc s3c244x_iodesc[] __initdata = {
47 IODESC_ENT(TIMER), 48 IODESC_ENT(TIMER),
48 IODESC_ENT(WATCHDOG), 49 IODESC_ENT(WATCHDOG),
49 IODESC_ENT(LCD), 50 IODESC_ENT(LCD),
50 IODESC_ENT(ADC),
51 IODESC_ENT(USBHOST),
52}; 51};
53 52
54/* uart initialisation */ 53/* uart initialisation */
diff --git a/arch/arm/mach-s3c2410/usb-simtec.h b/arch/arm/mach-s3c2410/usb-simtec.h
index d8aa6127dedb..03842ede9e71 100644
--- a/arch/arm/mach-s3c2410/usb-simtec.h
+++ b/arch/arm/mach-s3c2410/usb-simtec.h
@@ -10,9 +10,6 @@
10 * This program is free software; you can redistribute it and/or modify 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 11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 *
14 * Modifications:
15 * 20-Aug-2004 BJD Created
16*/ 13*/
17 14
18extern int usb_simtec_init(void); 15extern int usb_simtec_init(void);