diff options
author | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
commit | 64e47488c913ac704d465a6af86a26786d1412a5 (patch) | |
tree | d3b0148592963dcde26e4bb35ddfec8b1eaf8e23 /arch/arm/mach-s3c2410 | |
parent | 4a35a46bf1cda4737c428380d1db5d15e2590d18 (diff) | |
parent | caf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff) |
Merge linux-2.6 with linux-acpi-2.6
Diffstat (limited to 'arch/arm/mach-s3c2410')
-rw-r--r-- | arch/arm/mach-s3c2410/Kconfig | 15 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/Makefile | 5 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/bast-irq.c | 77 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/irq.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-anubis.c | 270 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-n30.c | 30 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/pm-simtec.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/pm.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/s3c2440-irq.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/time.c | 2 |
10 files changed, 380 insertions, 57 deletions
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index d4d03d0daaec..06807c6ee68a 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig | |||
@@ -2,6 +2,13 @@ if ARCH_S3C2410 | |||
2 | 2 | ||
3 | menu "S3C24XX Implementations" | 3 | menu "S3C24XX Implementations" |
4 | 4 | ||
5 | config MACH_ANUBIS | ||
6 | bool "Simtec Electronics ANUBIS" | ||
7 | select CPU_S3C2440 | ||
8 | help | ||
9 | Say Y gere if you are using the Simtec Electronics ANUBIS | ||
10 | development system | ||
11 | |||
5 | config ARCH_BAST | 12 | config ARCH_BAST |
6 | bool "Simtec Electronics BAST (EB2410ITX)" | 13 | bool "Simtec Electronics BAST (EB2410ITX)" |
7 | select CPU_S3C2410 | 14 | select CPU_S3C2410 |
@@ -11,6 +18,14 @@ config ARCH_BAST | |||
11 | 18 | ||
12 | Product page: <http://www.simtec.co.uk/products/EB2410ITX/>. | 19 | Product page: <http://www.simtec.co.uk/products/EB2410ITX/>. |
13 | 20 | ||
21 | config BAST_PC104_IRQ | ||
22 | bool "BAST PC104 IRQ support" | ||
23 | depends on ARCH_BAST | ||
24 | default y | ||
25 | help | ||
26 | Say Y here to enable the PC104 IRQ routing on the | ||
27 | Simtec BAST (EB2410ITX) | ||
28 | |||
14 | config ARCH_H1940 | 29 | config ARCH_H1940 |
15 | bool "IPAQ H1940" | 30 | bool "IPAQ H1940" |
16 | select CPU_S3C2410 | 31 | select CPU_S3C2410 |
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile index 55ed7c7e57da..b4f1e051c768 100644 --- a/arch/arm/mach-s3c2410/Makefile +++ b/arch/arm/mach-s3c2410/Makefile | |||
@@ -26,8 +26,13 @@ obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s3c2440-dsc.o | |||
26 | obj-$(CONFIG_CPU_S3C2440) += s3c2440-irq.o | 26 | obj-$(CONFIG_CPU_S3C2440) += s3c2440-irq.o |
27 | obj-$(CONFIG_CPU_S3C2440) += s3c2440-clock.o | 27 | obj-$(CONFIG_CPU_S3C2440) += s3c2440-clock.o |
28 | 28 | ||
29 | # bast extras | ||
30 | |||
31 | obj-$(CONFIG_BAST_PC104_IRQ) += bast-irq.o | ||
32 | |||
29 | # machine specific support | 33 | # machine specific support |
30 | 34 | ||
35 | obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o | ||
31 | obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o | 36 | obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o |
32 | obj-$(CONFIG_ARCH_H1940) += mach-h1940.o | 37 | obj-$(CONFIG_ARCH_H1940) += mach-h1940.o |
33 | obj-$(CONFIG_MACH_N30) += mach-n30.o | 38 | obj-$(CONFIG_MACH_N30) += mach-n30.o |
diff --git a/arch/arm/mach-s3c2410/bast-irq.c b/arch/arm/mach-s3c2410/bast-irq.c index 5e5bbe893cbb..fbbeb0553006 100644 --- a/arch/arm/mach-s3c2410/bast-irq.c +++ b/arch/arm/mach-s3c2410/bast-irq.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* linux/arch/arm/mach-s3c2410/bast-irq.c | 1 | /* linux/arch/arm/mach-s3c2410/bast-irq.c |
2 | * | 2 | * |
3 | * Copyright (c) 2004 Simtec Electronics | 3 | * Copyright (c) 2003,2005 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 4 | * Ben Dooks <ben@simtec.co.uk> |
5 | * | 5 | * |
6 | * http://www.simtec.co.uk/products/EB2410ITX/ | 6 | * http://www.simtec.co.uk/products/EB2410ITX/ |
@@ -21,7 +21,8 @@ | |||
21 | * | 21 | * |
22 | * Modifications: | 22 | * Modifications: |
23 | * 08-Jan-2003 BJD Moved from central IRQ code | 23 | * 08-Jan-2003 BJD Moved from central IRQ code |
24 | */ | 24 | * 21-Aug-2005 BJD Fixed missing code and compile errors |
25 | */ | ||
25 | 26 | ||
26 | 27 | ||
27 | #include <linux/init.h> | 28 | #include <linux/init.h> |
@@ -30,12 +31,19 @@ | |||
30 | #include <linux/ptrace.h> | 31 | #include <linux/ptrace.h> |
31 | #include <linux/sysdev.h> | 32 | #include <linux/sysdev.h> |
32 | 33 | ||
34 | #include <asm/mach-types.h> | ||
35 | |||
33 | #include <asm/hardware.h> | 36 | #include <asm/hardware.h> |
34 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
35 | #include <asm/io.h> | 38 | #include <asm/io.h> |
36 | 39 | ||
37 | #include <asm/mach/irq.h> | 40 | #include <asm/mach/irq.h> |
38 | #include <asm/hardware/s3c2410/irq.h> | 41 | |
42 | #include <asm/arch/regs-irq.h> | ||
43 | #include <asm/arch/bast-map.h> | ||
44 | #include <asm/arch/bast-irq.h> | ||
45 | |||
46 | #include "irq.h" | ||
39 | 47 | ||
40 | #if 0 | 48 | #if 0 |
41 | #include <asm/debug-ll.h> | 49 | #include <asm/debug-ll.h> |
@@ -79,15 +87,15 @@ bast_pc104_mask(unsigned int irqno) | |||
79 | temp = __raw_readb(BAST_VA_PC104_IRQMASK); | 87 | temp = __raw_readb(BAST_VA_PC104_IRQMASK); |
80 | temp &= ~bast_pc104_irqmasks[irqno]; | 88 | temp &= ~bast_pc104_irqmasks[irqno]; |
81 | __raw_writeb(temp, BAST_VA_PC104_IRQMASK); | 89 | __raw_writeb(temp, BAST_VA_PC104_IRQMASK); |
82 | |||
83 | if (temp == 0) | ||
84 | bast_extint_mask(IRQ_ISA); | ||
85 | } | 90 | } |
86 | 91 | ||
87 | static void | 92 | static void |
88 | bast_pc104_ack(unsigned int irqno) | 93 | bast_pc104_maskack(unsigned int irqno) |
89 | { | 94 | { |
90 | bast_extint_ack(IRQ_ISA); | 95 | struct irqdesc *desc = irq_desc + IRQ_ISA; |
96 | |||
97 | bast_pc104_mask(irqno); | ||
98 | desc->chip->ack(IRQ_ISA); | ||
91 | } | 99 | } |
92 | 100 | ||
93 | static void | 101 | static void |
@@ -98,14 +106,12 @@ bast_pc104_unmask(unsigned int irqno) | |||
98 | temp = __raw_readb(BAST_VA_PC104_IRQMASK); | 106 | temp = __raw_readb(BAST_VA_PC104_IRQMASK); |
99 | temp |= bast_pc104_irqmasks[irqno]; | 107 | temp |= bast_pc104_irqmasks[irqno]; |
100 | __raw_writeb(temp, BAST_VA_PC104_IRQMASK); | 108 | __raw_writeb(temp, BAST_VA_PC104_IRQMASK); |
101 | |||
102 | bast_extint_unmask(IRQ_ISA); | ||
103 | } | 109 | } |
104 | 110 | ||
105 | static struct bast_pc104_chip = { | 111 | static struct irqchip bast_pc104_chip = { |
106 | .mask = bast_pc104_mask, | 112 | .mask = bast_pc104_mask, |
107 | .unmask = bast_pc104_unmask, | 113 | .unmask = bast_pc104_unmask, |
108 | .ack = bast_pc104_ack | 114 | .ack = bast_pc104_maskack |
109 | }; | 115 | }; |
110 | 116 | ||
111 | static void | 117 | static void |
@@ -119,14 +125,49 @@ bast_irq_pc104_demux(unsigned int irq, | |||
119 | 125 | ||
120 | stat = __raw_readb(BAST_VA_PC104_IRQREQ) & 0xf; | 126 | stat = __raw_readb(BAST_VA_PC104_IRQREQ) & 0xf; |
121 | 127 | ||
122 | for (i = 0; i < 4 && stat != 0; i++) { | 128 | if (unlikely(stat == 0)) { |
123 | if (stat & 1) { | 129 | /* ack if we get an irq with nothing (ie, startup) */ |
124 | irqno = bast_pc104_irqs[i]; | 130 | |
125 | desc = irq_desc + irqno; | 131 | desc = irq_desc + IRQ_ISA; |
132 | desc->chip->ack(IRQ_ISA); | ||
133 | } else { | ||
134 | /* handle the IRQ */ | ||
135 | |||
136 | for (i = 0; stat != 0; i++, stat >>= 1) { | ||
137 | if (stat & 1) { | ||
138 | irqno = bast_pc104_irqs[i]; | ||
126 | 139 | ||
127 | desc->handle(irqno, desc, regs); | 140 | desc_handle_irq(irqno, irq_desc + irqno, regs); |
141 | } | ||
128 | } | 142 | } |
143 | } | ||
144 | } | ||
129 | 145 | ||
130 | stat >>= 1; | 146 | static __init int bast_irq_init(void) |
147 | { | ||
148 | unsigned int i; | ||
149 | |||
150 | if (machine_is_bast()) { | ||
151 | printk(KERN_INFO "BAST PC104 IRQ routing, (c) 2005 Simtec Electronics\n"); | ||
152 | |||
153 | /* zap all the IRQs */ | ||
154 | |||
155 | __raw_writeb(0x0, BAST_VA_PC104_IRQMASK); | ||
156 | |||
157 | set_irq_chained_handler(IRQ_ISA, bast_irq_pc104_demux); | ||
158 | |||
159 | /* reigster our IRQs */ | ||
160 | |||
161 | for (i = 0; i < 4; i++) { | ||
162 | unsigned int irqno = bast_pc104_irqs[i]; | ||
163 | |||
164 | set_irq_chip(irqno, &bast_pc104_chip); | ||
165 | set_irq_handler(irqno, do_level_IRQ); | ||
166 | set_irq_flags(irqno, IRQF_VALID); | ||
167 | } | ||
131 | } | 168 | } |
169 | |||
170 | return 0; | ||
132 | } | 171 | } |
172 | |||
173 | arch_initcall(bast_irq_init); | ||
diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c index 973a5fe6769c..66d8c068e940 100644 --- a/arch/arm/mach-s3c2410/irq.c +++ b/arch/arm/mach-s3c2410/irq.c | |||
@@ -184,14 +184,14 @@ struct irqchip s3c_irq_level_chip = { | |||
184 | .ack = s3c_irq_maskack, | 184 | .ack = s3c_irq_maskack, |
185 | .mask = s3c_irq_mask, | 185 | .mask = s3c_irq_mask, |
186 | .unmask = s3c_irq_unmask, | 186 | .unmask = s3c_irq_unmask, |
187 | .wake = s3c_irq_wake | 187 | .set_wake = s3c_irq_wake |
188 | }; | 188 | }; |
189 | 189 | ||
190 | static struct irqchip s3c_irq_chip = { | 190 | static struct irqchip s3c_irq_chip = { |
191 | .ack = s3c_irq_ack, | 191 | .ack = s3c_irq_ack, |
192 | .mask = s3c_irq_mask, | 192 | .mask = s3c_irq_mask, |
193 | .unmask = s3c_irq_unmask, | 193 | .unmask = s3c_irq_unmask, |
194 | .wake = s3c_irq_wake | 194 | .set_wake = s3c_irq_wake |
195 | }; | 195 | }; |
196 | 196 | ||
197 | /* S3C2410_EINTMASK | 197 | /* S3C2410_EINTMASK |
@@ -350,16 +350,16 @@ static struct irqchip s3c_irqext_chip = { | |||
350 | .mask = s3c_irqext_mask, | 350 | .mask = s3c_irqext_mask, |
351 | .unmask = s3c_irqext_unmask, | 351 | .unmask = s3c_irqext_unmask, |
352 | .ack = s3c_irqext_ack, | 352 | .ack = s3c_irqext_ack, |
353 | .type = s3c_irqext_type, | 353 | .set_type = s3c_irqext_type, |
354 | .wake = s3c_irqext_wake | 354 | .set_wake = s3c_irqext_wake |
355 | }; | 355 | }; |
356 | 356 | ||
357 | static struct irqchip s3c_irq_eint0t4 = { | 357 | static struct irqchip s3c_irq_eint0t4 = { |
358 | .ack = s3c_irq_ack, | 358 | .ack = s3c_irq_ack, |
359 | .mask = s3c_irq_mask, | 359 | .mask = s3c_irq_mask, |
360 | .unmask = s3c_irq_unmask, | 360 | .unmask = s3c_irq_unmask, |
361 | .wake = s3c_irq_wake, | 361 | .set_wake = s3c_irq_wake, |
362 | .type = s3c_irqext_type, | 362 | .set_type = s3c_irqext_type, |
363 | }; | 363 | }; |
364 | 364 | ||
365 | /* mask values for the parent registers for each of the interrupt types */ | 365 | /* mask values for the parent registers for each of the interrupt types */ |
@@ -496,11 +496,11 @@ static void s3c_irq_demux_adc(unsigned int irq, | |||
496 | if (subsrc != 0) { | 496 | if (subsrc != 0) { |
497 | if (subsrc & 1) { | 497 | if (subsrc & 1) { |
498 | mydesc = irq_desc + IRQ_TC; | 498 | mydesc = irq_desc + IRQ_TC; |
499 | mydesc->handle( IRQ_TC, mydesc, regs); | 499 | desc_handle_irq(IRQ_TC, mydesc, regs); |
500 | } | 500 | } |
501 | if (subsrc & 2) { | 501 | if (subsrc & 2) { |
502 | mydesc = irq_desc + IRQ_ADC; | 502 | mydesc = irq_desc + IRQ_ADC; |
503 | mydesc->handle(IRQ_ADC, mydesc, regs); | 503 | desc_handle_irq(IRQ_ADC, mydesc, regs); |
504 | } | 504 | } |
505 | } | 505 | } |
506 | } | 506 | } |
@@ -529,17 +529,17 @@ static void s3c_irq_demux_uart(unsigned int start, | |||
529 | desc = irq_desc + start; | 529 | desc = irq_desc + start; |
530 | 530 | ||
531 | if (subsrc & 1) | 531 | if (subsrc & 1) |
532 | desc->handle(start, desc, regs); | 532 | desc_handle_irq(start, desc, regs); |
533 | 533 | ||
534 | desc++; | 534 | desc++; |
535 | 535 | ||
536 | if (subsrc & 2) | 536 | if (subsrc & 2) |
537 | desc->handle(start+1, desc, regs); | 537 | desc_handle_irq(start+1, desc, regs); |
538 | 538 | ||
539 | desc++; | 539 | desc++; |
540 | 540 | ||
541 | if (subsrc & 4) | 541 | if (subsrc & 4) |
542 | desc->handle(start+2, desc, regs); | 542 | desc_handle_irq(start+2, desc, regs); |
543 | } | 543 | } |
544 | } | 544 | } |
545 | 545 | ||
diff --git a/arch/arm/mach-s3c2410/mach-anubis.c b/arch/arm/mach-s3c2410/mach-anubis.c new file mode 100644 index 000000000000..f87aa0b669ad --- /dev/null +++ b/arch/arm/mach-s3c2410/mach-anubis.c | |||
@@ -0,0 +1,270 @@ | |||
1 | /* linux/arch/arm/mach-s3c2410/mach-anubis.c | ||
2 | * | ||
3 | * Copyright (c) 2003-2005 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * Modifications: | ||
14 | * 02-May-2005 BJD Copied from mach-bast.c | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/types.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/list.h> | ||
21 | #include <linux/timer.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/device.h> | ||
24 | |||
25 | #include <asm/mach/arch.h> | ||
26 | #include <asm/mach/map.h> | ||
27 | #include <asm/mach/irq.h> | ||
28 | |||
29 | #include <asm/arch/anubis-map.h> | ||
30 | #include <asm/arch/anubis-irq.h> | ||
31 | #include <asm/arch/anubis-cpld.h> | ||
32 | |||
33 | #include <asm/hardware.h> | ||
34 | #include <asm/io.h> | ||
35 | #include <asm/irq.h> | ||
36 | #include <asm/mach-types.h> | ||
37 | |||
38 | #include <asm/arch/regs-serial.h> | ||
39 | #include <asm/arch/regs-gpio.h> | ||
40 | #include <asm/arch/regs-mem.h> | ||
41 | #include <asm/arch/regs-lcd.h> | ||
42 | #include <asm/arch/nand.h> | ||
43 | |||
44 | #include <linux/mtd/mtd.h> | ||
45 | #include <linux/mtd/nand.h> | ||
46 | #include <linux/mtd/nand_ecc.h> | ||
47 | #include <linux/mtd/partitions.h> | ||
48 | |||
49 | #include "clock.h" | ||
50 | #include "devs.h" | ||
51 | #include "cpu.h" | ||
52 | |||
53 | #define COPYRIGHT ", (c) 2005 Simtec Electronics" | ||
54 | |||
55 | static struct map_desc anubis_iodesc[] __initdata = { | ||
56 | /* ISA IO areas */ | ||
57 | |||
58 | { (u32)S3C24XX_VA_ISA_BYTE, 0x0, SZ_16M, MT_DEVICE }, | ||
59 | { (u32)S3C24XX_VA_ISA_WORD, 0x0, SZ_16M, MT_DEVICE }, | ||
60 | |||
61 | /* we could possibly compress the next set down into a set of smaller tables | ||
62 | * pagetables, but that would mean using an L2 section, and it still means | ||
63 | * we cannot actually feed the same register to an LDR due to 16K spacing | ||
64 | */ | ||
65 | |||
66 | /* CPLD control registers */ | ||
67 | |||
68 | { (u32)ANUBIS_VA_CTRL1, ANUBIS_PA_CTRL1, SZ_4K, MT_DEVICE }, | ||
69 | { (u32)ANUBIS_VA_CTRL2, ANUBIS_PA_CTRL2, SZ_4K, MT_DEVICE }, | ||
70 | |||
71 | /* IDE drives */ | ||
72 | |||
73 | { (u32)ANUBIS_IDEPRI, S3C2410_CS3, SZ_1M, MT_DEVICE }, | ||
74 | { (u32)ANUBIS_IDEPRIAUX, S3C2410_CS3+(1<<26), SZ_1M, MT_DEVICE }, | ||
75 | |||
76 | { (u32)ANUBIS_IDESEC, S3C2410_CS4, SZ_1M, MT_DEVICE }, | ||
77 | { (u32)ANUBIS_IDESECAUX, S3C2410_CS4+(1<<26), SZ_1M, MT_DEVICE }, | ||
78 | }; | ||
79 | |||
80 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK | ||
81 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | ||
82 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE | ||
83 | |||
84 | static struct s3c24xx_uart_clksrc anubis_serial_clocks[] = { | ||
85 | [0] = { | ||
86 | .name = "uclk", | ||
87 | .divisor = 1, | ||
88 | .min_baud = 0, | ||
89 | .max_baud = 0, | ||
90 | }, | ||
91 | [1] = { | ||
92 | .name = "pclk", | ||
93 | .divisor = 1, | ||
94 | .min_baud = 0, | ||
95 | .max_baud = 0. | ||
96 | } | ||
97 | }; | ||
98 | |||
99 | |||
100 | static struct s3c2410_uartcfg anubis_uartcfgs[] = { | ||
101 | [0] = { | ||
102 | .hwport = 0, | ||
103 | .flags = 0, | ||
104 | .ucon = UCON, | ||
105 | .ulcon = ULCON, | ||
106 | .ufcon = UFCON, | ||
107 | .clocks = anubis_serial_clocks, | ||
108 | .clocks_size = ARRAY_SIZE(anubis_serial_clocks) | ||
109 | }, | ||
110 | [1] = { | ||
111 | .hwport = 2, | ||
112 | .flags = 0, | ||
113 | .ucon = UCON, | ||
114 | .ulcon = ULCON, | ||
115 | .ufcon = UFCON, | ||
116 | .clocks = anubis_serial_clocks, | ||
117 | .clocks_size = ARRAY_SIZE(anubis_serial_clocks) | ||
118 | }, | ||
119 | }; | ||
120 | |||
121 | /* NAND Flash on Anubis board */ | ||
122 | |||
123 | static int external_map[] = { 2 }; | ||
124 | static int chip0_map[] = { 0 }; | ||
125 | static int chip1_map[] = { 1 }; | ||
126 | |||
127 | struct mtd_partition anubis_default_nand_part[] = { | ||
128 | [0] = { | ||
129 | .name = "Boot Agent", | ||
130 | .size = SZ_16K, | ||
131 | .offset = 0 | ||
132 | }, | ||
133 | [1] = { | ||
134 | .name = "/boot", | ||
135 | .size = SZ_4M - SZ_16K, | ||
136 | .offset = SZ_16K, | ||
137 | }, | ||
138 | [2] = { | ||
139 | .name = "user1", | ||
140 | .offset = SZ_4M, | ||
141 | .size = SZ_32M - SZ_4M, | ||
142 | }, | ||
143 | [3] = { | ||
144 | .name = "user2", | ||
145 | .offset = SZ_32M, | ||
146 | .size = MTDPART_SIZ_FULL, | ||
147 | } | ||
148 | }; | ||
149 | |||
150 | /* the Anubis has 3 selectable slots for nand-flash, the two | ||
151 | * on-board chip areas, as well as the external slot. | ||
152 | * | ||
153 | * Note, there is no current hot-plug support for the External | ||
154 | * socket. | ||
155 | */ | ||
156 | |||
157 | static struct s3c2410_nand_set anubis_nand_sets[] = { | ||
158 | [1] = { | ||
159 | .name = "External", | ||
160 | .nr_chips = 1, | ||
161 | .nr_map = external_map, | ||
162 | .nr_partitions = ARRAY_SIZE(anubis_default_nand_part), | ||
163 | .partitions = anubis_default_nand_part | ||
164 | }, | ||
165 | [0] = { | ||
166 | .name = "chip0", | ||
167 | .nr_chips = 1, | ||
168 | .nr_map = chip0_map, | ||
169 | .nr_partitions = ARRAY_SIZE(anubis_default_nand_part), | ||
170 | .partitions = anubis_default_nand_part | ||
171 | }, | ||
172 | [2] = { | ||
173 | .name = "chip1", | ||
174 | .nr_chips = 1, | ||
175 | .nr_map = chip1_map, | ||
176 | .nr_partitions = ARRAY_SIZE(anubis_default_nand_part), | ||
177 | .partitions = anubis_default_nand_part | ||
178 | }, | ||
179 | }; | ||
180 | |||
181 | static void anubis_nand_select(struct s3c2410_nand_set *set, int slot) | ||
182 | { | ||
183 | unsigned int tmp; | ||
184 | |||
185 | slot = set->nr_map[slot] & 3; | ||
186 | |||
187 | pr_debug("anubis_nand: selecting slot %d (set %p,%p)\n", | ||
188 | slot, set, set->nr_map); | ||
189 | |||
190 | tmp = __raw_readb(ANUBIS_VA_CTRL1); | ||
191 | tmp &= ~ANUBIS_CTRL1_NANDSEL; | ||
192 | tmp |= slot; | ||
193 | |||
194 | pr_debug("anubis_nand: ctrl1 now %02x\n", tmp); | ||
195 | |||
196 | __raw_writeb(tmp, ANUBIS_VA_CTRL1); | ||
197 | } | ||
198 | |||
199 | static struct s3c2410_platform_nand anubis_nand_info = { | ||
200 | .tacls = 25, | ||
201 | .twrph0 = 80, | ||
202 | .twrph1 = 80, | ||
203 | .nr_sets = ARRAY_SIZE(anubis_nand_sets), | ||
204 | .sets = anubis_nand_sets, | ||
205 | .select_chip = anubis_nand_select, | ||
206 | }; | ||
207 | |||
208 | |||
209 | /* Standard Anubis devices */ | ||
210 | |||
211 | static struct platform_device *anubis_devices[] __initdata = { | ||
212 | &s3c_device_usb, | ||
213 | &s3c_device_wdt, | ||
214 | &s3c_device_adc, | ||
215 | &s3c_device_i2c, | ||
216 | &s3c_device_rtc, | ||
217 | &s3c_device_nand, | ||
218 | }; | ||
219 | |||
220 | static struct clk *anubis_clocks[] = { | ||
221 | &s3c24xx_dclk0, | ||
222 | &s3c24xx_dclk1, | ||
223 | &s3c24xx_clkout0, | ||
224 | &s3c24xx_clkout1, | ||
225 | &s3c24xx_uclk, | ||
226 | }; | ||
227 | |||
228 | static struct s3c24xx_board anubis_board __initdata = { | ||
229 | .devices = anubis_devices, | ||
230 | .devices_count = ARRAY_SIZE(anubis_devices), | ||
231 | .clocks = anubis_clocks, | ||
232 | .clocks_count = ARRAY_SIZE(anubis_clocks) | ||
233 | }; | ||
234 | |||
235 | void __init anubis_map_io(void) | ||
236 | { | ||
237 | /* initialise the clocks */ | ||
238 | |||
239 | s3c24xx_dclk0.parent = NULL; | ||
240 | s3c24xx_dclk0.rate = 12*1000*1000; | ||
241 | |||
242 | s3c24xx_dclk1.parent = NULL; | ||
243 | s3c24xx_dclk1.rate = 24*1000*1000; | ||
244 | |||
245 | s3c24xx_clkout0.parent = &s3c24xx_dclk0; | ||
246 | s3c24xx_clkout1.parent = &s3c24xx_dclk1; | ||
247 | |||
248 | s3c24xx_uclk.parent = &s3c24xx_clkout1; | ||
249 | |||
250 | s3c_device_nand.dev.platform_data = &anubis_nand_info; | ||
251 | |||
252 | s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc)); | ||
253 | s3c24xx_init_clocks(0); | ||
254 | s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs)); | ||
255 | s3c24xx_set_board(&anubis_board); | ||
256 | |||
257 | /* ensure that the GPIO is setup */ | ||
258 | s3c2410_gpio_setpin(S3C2410_GPA0, 1); | ||
259 | } | ||
260 | |||
261 | MACHINE_START(ANUBIS, "Simtec-Anubis") | ||
262 | /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ | ||
263 | .phys_ram = S3C2410_SDRAM_PA, | ||
264 | .phys_io = S3C2410_PA_UART, | ||
265 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | ||
266 | .boot_params = S3C2410_SDRAM_PA + 0x100, | ||
267 | .map_io = anubis_map_io, | ||
268 | .init_irq = s3c24xx_init_irq, | ||
269 | .timer = &s3c24xx_timer, | ||
270 | MACHINE_END | ||
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c index 79044d9bce38..66bf5bb2b3db 100644 --- a/arch/arm/mach-s3c2410/mach-n30.c +++ b/arch/arm/mach-s3c2410/mach-n30.c | |||
@@ -110,34 +110,24 @@ void __init n30_init_irq(void) | |||
110 | s3c24xx_init_irq(); | 110 | s3c24xx_init_irq(); |
111 | } | 111 | } |
112 | 112 | ||
113 | 113 | /* GPB3 is the line that controls the pull-up for the USB D+ line */ | |
114 | static int n30_usbstart_thread(void *unused) | ||
115 | { | ||
116 | /* Turn off suspend on both USB ports, and switch the | ||
117 | * selectable USB port to USB device mode. */ | ||
118 | writel(readl(S3C2410_MISCCR) & ~0x00003008, S3C2410_MISCCR); | ||
119 | |||
120 | /* Turn off the D+ pull up for 3 seconds so that the USB host | ||
121 | * at the other end will do a rescan of the USB bus. */ | ||
122 | s3c2410_gpio_setpin(S3C2410_GPB3, 0); | ||
123 | |||
124 | msleep_interruptible(3*HZ); | ||
125 | |||
126 | s3c2410_gpio_setpin(S3C2410_GPB3, 1); | ||
127 | |||
128 | return 0; | ||
129 | } | ||
130 | |||
131 | 114 | ||
132 | void __init n30_init(void) | 115 | void __init n30_init(void) |
133 | { | 116 | { |
134 | s3c_device_i2c.dev.platform_data = &n30_i2ccfg; | 117 | s3c_device_i2c.dev.platform_data = &n30_i2ccfg; |
135 | 118 | ||
136 | kthread_run(n30_usbstart_thread, NULL, "n30_usbstart"); | 119 | /* Turn off suspend on both USB ports, and switch the |
120 | * selectable USB port to USB device mode. */ | ||
121 | |||
122 | s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | | ||
123 | S3C2410_MISCCR_USBSUSPND0 | | ||
124 | S3C2410_MISCCR_USBSUSPND1, 0x0); | ||
137 | } | 125 | } |
138 | 126 | ||
139 | MACHINE_START(N30, "Acer-N30") | 127 | MACHINE_START(N30, "Acer-N30") |
140 | /* Maintainer: Christer Weinigel <christer@weinigel.se>, Ben Dooks <ben-linux@fluff.org> */ | 128 | /* Maintainer: Christer Weinigel <christer@weinigel.se>, |
129 | Ben Dooks <ben-linux@fluff.org> | ||
130 | */ | ||
141 | .phys_ram = S3C2410_SDRAM_PA, | 131 | .phys_ram = S3C2410_SDRAM_PA, |
142 | .phys_io = S3C2410_PA_UART, | 132 | .phys_io = S3C2410_PA_UART, |
143 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 133 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
diff --git a/arch/arm/mach-s3c2410/pm-simtec.c b/arch/arm/mach-s3c2410/pm-simtec.c index 2cb798832223..4c7ccef6c207 100644 --- a/arch/arm/mach-s3c2410/pm-simtec.c +++ b/arch/arm/mach-s3c2410/pm-simtec.c | |||
@@ -48,7 +48,7 @@ static __init int pm_simtec_init(void) | |||
48 | 48 | ||
49 | /* check which machine we are running on */ | 49 | /* check which machine we are running on */ |
50 | 50 | ||
51 | if (!machine_is_bast() && !machine_is_vr1000()) | 51 | if (!machine_is_bast() && !machine_is_vr1000() && !machine_is_anubis()) |
52 | return 0; | 52 | return 0; |
53 | 53 | ||
54 | printk(KERN_INFO "Simtec Board Power Manangement" COPYRIGHT "\n"); | 54 | printk(KERN_INFO "Simtec Board Power Manangement" COPYRIGHT "\n"); |
diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c index 13a48ee77484..fe57d966a34d 100644 --- a/arch/arm/mach-s3c2410/pm.c +++ b/arch/arm/mach-s3c2410/pm.c | |||
@@ -585,14 +585,16 @@ static int s3c2410_pm_enter(suspend_state_t state) | |||
585 | 585 | ||
586 | s3c2410_pm_check_store(); | 586 | s3c2410_pm_check_store(); |
587 | 587 | ||
588 | // need to make some form of time-delta | ||
589 | |||
590 | /* send the cpu to sleep... */ | 588 | /* send the cpu to sleep... */ |
591 | 589 | ||
592 | __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */ | 590 | __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */ |
593 | 591 | ||
594 | s3c2410_cpu_suspend(regs_save); | 592 | s3c2410_cpu_suspend(regs_save); |
595 | 593 | ||
594 | /* restore the cpu state */ | ||
595 | |||
596 | cpu_init(); | ||
597 | |||
596 | /* unset the return-from-sleep flag, to ensure reset */ | 598 | /* unset the return-from-sleep flag, to ensure reset */ |
597 | 599 | ||
598 | tmp = __raw_readl(S3C2410_GSTATUS2); | 600 | tmp = __raw_readl(S3C2410_GSTATUS2); |
diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2410/s3c2440-irq.c index 7cb9912242a3..278d0044c85d 100644 --- a/arch/arm/mach-s3c2410/s3c2440-irq.c +++ b/arch/arm/mach-s3c2410/s3c2440-irq.c | |||
@@ -64,11 +64,11 @@ static void s3c_irq_demux_wdtac97(unsigned int irq, | |||
64 | if (subsrc != 0) { | 64 | if (subsrc != 0) { |
65 | if (subsrc & 1) { | 65 | if (subsrc & 1) { |
66 | mydesc = irq_desc + IRQ_S3C2440_WDT; | 66 | mydesc = irq_desc + IRQ_S3C2440_WDT; |
67 | mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs); | 67 | desc_handle_irq(IRQ_S3C2440_WDT, mydesc, regs); |
68 | } | 68 | } |
69 | if (subsrc & 2) { | 69 | if (subsrc & 2) { |
70 | mydesc = irq_desc + IRQ_S3C2440_AC97; | 70 | mydesc = irq_desc + IRQ_S3C2440_AC97; |
71 | mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs); | 71 | desc_handle_irq(IRQ_S3C2440_AC97, mydesc, regs); |
72 | } | 72 | } |
73 | } | 73 | } |
74 | } | 74 | } |
@@ -122,11 +122,11 @@ static void s3c_irq_demux_cam(unsigned int irq, | |||
122 | if (subsrc != 0) { | 122 | if (subsrc != 0) { |
123 | if (subsrc & 1) { | 123 | if (subsrc & 1) { |
124 | mydesc = irq_desc + IRQ_S3C2440_CAM_C; | 124 | mydesc = irq_desc + IRQ_S3C2440_CAM_C; |
125 | mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs); | 125 | desc_handle_irq(IRQ_S3C2440_CAM_C, mydesc, regs); |
126 | } | 126 | } |
127 | if (subsrc & 2) { | 127 | if (subsrc & 2) { |
128 | mydesc = irq_desc + IRQ_S3C2440_CAM_P; | 128 | mydesc = irq_desc + IRQ_S3C2440_CAM_P; |
129 | mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs); | 129 | desc_handle_irq(IRQ_S3C2440_CAM_P, mydesc, regs); |
130 | } | 130 | } |
131 | } | 131 | } |
132 | } | 132 | } |
diff --git a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c index 765a3a9ae032..c0acfb2ad790 100644 --- a/arch/arm/mach-s3c2410/time.c +++ b/arch/arm/mach-s3c2410/time.c | |||
@@ -164,7 +164,7 @@ static void s3c2410_timer_setup (void) | |||
164 | 164 | ||
165 | /* configure the system for whichever machine is in use */ | 165 | /* configure the system for whichever machine is in use */ |
166 | 166 | ||
167 | if (machine_is_bast() || machine_is_vr1000()) { | 167 | if (machine_is_bast() || machine_is_vr1000() || machine_is_anubis()) { |
168 | /* timer is at 12MHz, scaler is 1 */ | 168 | /* timer is at 12MHz, scaler is 1 */ |
169 | timer_usec_ticks = timer_mask_usec_ticks(1, 12000000); | 169 | timer_usec_ticks = timer_mask_usec_ticks(1, 12000000); |
170 | tcnt = 12000000 / HZ; | 170 | tcnt = 12000000 / HZ; |