diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-14 18:06:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-14 18:06:49 -0400 |
commit | f701737deb59654dd62e15d5dc379f387cf86c6d (patch) | |
tree | b9073b7d4b43bc3d39c2ba1ddc76a1d0698073de | |
parent | eedab661a51966c454e38c17266a531aa58b4a98 (diff) | |
parent | 6c1640d52b9b7355cd777c4f08bc930ac96d905b (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 4445/1: ANUBIS: Fix CPLD registers
[ARM] 4444/2: OSIRIS: CPLD suspend fix
[ARM] 4443/1: OSIRIS: Add watchdog device to machine devices
[ARM] 4442/1: OSIRIS: Fix CPLD register definitions
[ARM] VFP: fix section mismatch error
-rw-r--r-- | arch/arm/mach-s3c2440/mach-anubis.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-osiris.c | 58 | ||||
-rw-r--r-- | arch/arm/vfp/entry.S | 4 | ||||
-rw-r--r-- | arch/arm/vfp/vfpmodule.c | 5 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/anubis-cpld.h | 4 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/anubis-map.h | 10 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/osiris-cpld.h | 19 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/osiris-map.h | 19 | ||||
-rw-r--r-- | include/asm-arm/linkage.h | 4 |
9 files changed, 97 insertions, 30 deletions
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c index b5d387ef37e1..bff7ddd06a52 100644 --- a/arch/arm/mach-s3c2440/mach-anubis.c +++ b/arch/arm/mach-s3c2440/mach-anubis.c | |||
@@ -76,8 +76,8 @@ static struct map_desc anubis_iodesc[] __initdata = { | |||
76 | .length = SZ_4K, | 76 | .length = SZ_4K, |
77 | .type = MT_DEVICE, | 77 | .type = MT_DEVICE, |
78 | }, { | 78 | }, { |
79 | .virtual = (u32)ANUBIS_VA_CTRL2, | 79 | .virtual = (u32)ANUBIS_VA_IDREG, |
80 | .pfn = __phys_to_pfn(ANUBIS_PA_CTRL2), | 80 | .pfn = __phys_to_pfn(ANUBIS_PA_IDREG), |
81 | .length = SZ_4K, | 81 | .length = SZ_4K, |
82 | .type = MT_DEVICE, | 82 | .type = MT_DEVICE, |
83 | }, | 83 | }, |
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index 4d6c7a574c1a..15811601f03d 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/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/sysdev.h> | ||
19 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
20 | 21 | ||
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
@@ -65,6 +66,11 @@ static struct map_desc osiris_iodesc[] __initdata = { | |||
65 | /* CPLD control registers */ | 66 | /* CPLD control registers */ |
66 | 67 | ||
67 | { | 68 | { |
69 | .virtual = (u32)OSIRIS_VA_CTRL0, | ||
70 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL0), | ||
71 | .length = SZ_16K, | ||
72 | .type = MT_DEVICE, | ||
73 | }, { | ||
68 | .virtual = (u32)OSIRIS_VA_CTRL1, | 74 | .virtual = (u32)OSIRIS_VA_CTRL1, |
69 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL1), | 75 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL1), |
70 | .length = SZ_16K, | 76 | .length = SZ_16K, |
@@ -74,6 +80,11 @@ static struct map_desc osiris_iodesc[] __initdata = { | |||
74 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL2), | 80 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL2), |
75 | .length = SZ_16K, | 81 | .length = SZ_16K, |
76 | .type = MT_DEVICE, | 82 | .type = MT_DEVICE, |
83 | }, { | ||
84 | .virtual = (u32)OSIRIS_VA_IDREG, | ||
85 | .pfn = __phys_to_pfn(OSIRIS_PA_IDREG), | ||
86 | .length = SZ_16K, | ||
87 | .type = MT_DEVICE, | ||
77 | }, | 88 | }, |
78 | }; | 89 | }; |
79 | 90 | ||
@@ -195,13 +206,13 @@ static void osiris_nand_select(struct s3c2410_nand_set *set, int slot) | |||
195 | pr_debug("osiris_nand: selecting slot %d (set %p,%p)\n", | 206 | pr_debug("osiris_nand: selecting slot %d (set %p,%p)\n", |
196 | slot, set, set->nr_map); | 207 | slot, set, set->nr_map); |
197 | 208 | ||
198 | tmp = __raw_readb(OSIRIS_VA_CTRL1); | 209 | tmp = __raw_readb(OSIRIS_VA_CTRL0); |
199 | tmp &= ~OSIRIS_CTRL1_NANDSEL; | 210 | tmp &= ~OSIRIS_CTRL0_NANDSEL; |
200 | tmp |= slot; | 211 | tmp |= slot; |
201 | 212 | ||
202 | pr_debug("osiris_nand: ctrl1 now %02x\n", tmp); | 213 | pr_debug("osiris_nand: ctrl0 now %02x\n", tmp); |
203 | 214 | ||
204 | __raw_writeb(tmp, OSIRIS_VA_CTRL1); | 215 | __raw_writeb(tmp, OSIRIS_VA_CTRL0); |
205 | } | 216 | } |
206 | 217 | ||
207 | static struct s3c2410_platform_nand osiris_nand_info = { | 218 | static struct s3c2410_platform_nand osiris_nand_info = { |
@@ -235,10 +246,45 @@ static struct platform_device osiris_pcmcia = { | |||
235 | .resource = osiris_pcmcia_resource, | 246 | .resource = osiris_pcmcia_resource, |
236 | }; | 247 | }; |
237 | 248 | ||
249 | /* Osiris power management device */ | ||
250 | |||
251 | #ifdef CONFIG_PM | ||
252 | static unsigned char pm_osiris_ctrl0; | ||
253 | |||
254 | static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state) | ||
255 | { | ||
256 | pm_osiris_ctrl0 = __raw_readb(OSIRIS_VA_CTRL0); | ||
257 | return 0; | ||
258 | } | ||
259 | |||
260 | static int osiris_pm_resume(struct sys_device *sd) | ||
261 | { | ||
262 | if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8) | ||
263 | __raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1); | ||
264 | |||
265 | return 0; | ||
266 | } | ||
267 | |||
268 | #else | ||
269 | #define osiris_pm_suspend NULL | ||
270 | #define osiris_pm_resume NULL | ||
271 | #endif | ||
272 | |||
273 | static struct sysdev_class osiris_pm_sysclass = { | ||
274 | set_kset_name("mach-osiris"), | ||
275 | .suspend = osiris_pm_suspend, | ||
276 | .resume = osiris_pm_resume, | ||
277 | }; | ||
278 | |||
279 | static struct sys_device osiris_pm_sysdev = { | ||
280 | .cls = &osiris_pm_sysclass, | ||
281 | }; | ||
282 | |||
238 | /* Standard Osiris devices */ | 283 | /* Standard Osiris devices */ |
239 | 284 | ||
240 | static struct platform_device *osiris_devices[] __initdata = { | 285 | static struct platform_device *osiris_devices[] __initdata = { |
241 | &s3c_device_i2c, | 286 | &s3c_device_i2c, |
287 | &s3c_device_wdt, | ||
242 | &s3c_device_nand, | 288 | &s3c_device_nand, |
243 | &osiris_pcmcia, | 289 | &osiris_pcmcia, |
244 | }; | 290 | }; |
@@ -288,6 +334,9 @@ static void __init osiris_map_io(void) | |||
288 | 334 | ||
289 | static void __init osiris_init(void) | 335 | static void __init osiris_init(void) |
290 | { | 336 | { |
337 | sysdev_class_register(&osiris_pm_sysclass); | ||
338 | sysdev_register(&osiris_pm_sysdev); | ||
339 | |||
291 | platform_add_devices(osiris_devices, ARRAY_SIZE(osiris_devices)); | 340 | platform_add_devices(osiris_devices, ARRAY_SIZE(osiris_devices)); |
292 | }; | 341 | }; |
293 | 342 | ||
@@ -299,5 +348,6 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS") | |||
299 | .map_io = osiris_map_io, | 348 | .map_io = osiris_map_io, |
300 | .init_machine = osiris_init, | 349 | .init_machine = osiris_init, |
301 | .init_irq = s3c24xx_init_irq, | 350 | .init_irq = s3c24xx_init_irq, |
351 | .init_machine = osiris_init, | ||
302 | .timer = &s3c24xx_timer, | 352 | .timer = &s3c24xx_timer, |
303 | MACHINE_END | 353 | MACHINE_END |
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S index ca2a5ad19ea6..806ce26d5243 100644 --- a/arch/arm/vfp/entry.S +++ b/arch/arm/vfp/entry.S | |||
@@ -29,6 +29,10 @@ do_vfp: | |||
29 | add r10, r10, #TI_VFPSTATE @ r10 = workspace | 29 | add r10, r10, #TI_VFPSTATE @ r10 = workspace |
30 | ldr pc, [r4] @ call VFP entry point | 30 | ldr pc, [r4] @ call VFP entry point |
31 | 31 | ||
32 | ENTRY(vfp_null_entry) | ||
33 | mov pc, lr | ||
34 | ENDPROC(vfp_null_entry) | ||
35 | |||
32 | .LCvfp: | 36 | .LCvfp: |
33 | .word vfp_vector | 37 | .word vfp_vector |
34 | 38 | ||
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index f1e5951dc721..1106b5f9cf19 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -26,8 +26,9 @@ | |||
26 | */ | 26 | */ |
27 | void vfp_testing_entry(void); | 27 | void vfp_testing_entry(void); |
28 | void vfp_support_entry(void); | 28 | void vfp_support_entry(void); |
29 | void vfp_null_entry(void); | ||
29 | 30 | ||
30 | void (*vfp_vector)(void) = vfp_testing_entry; | 31 | void (*vfp_vector)(void) = vfp_null_entry; |
31 | union vfp_state *last_VFP_context[NR_CPUS]; | 32 | union vfp_state *last_VFP_context[NR_CPUS]; |
32 | 33 | ||
33 | /* | 34 | /* |
@@ -321,8 +322,10 @@ static int __init vfp_init(void) | |||
321 | * The handler is already setup to just log calls, so | 322 | * The handler is already setup to just log calls, so |
322 | * we just need to read the VFPSID register. | 323 | * we just need to read the VFPSID register. |
323 | */ | 324 | */ |
325 | vfp_vector = vfp_testing_entry; | ||
324 | vfpsid = fmrx(FPSID); | 326 | vfpsid = fmrx(FPSID); |
325 | barrier(); | 327 | barrier(); |
328 | vfp_vector = vfp_null_entry; | ||
326 | 329 | ||
327 | printk(KERN_INFO "VFP support v0.3: "); | 330 | printk(KERN_INFO "VFP support v0.3: "); |
328 | if (VFP_arch) { | 331 | if (VFP_arch) { |
diff --git a/include/asm-arm/arch-s3c2410/anubis-cpld.h b/include/asm-arm/arch-s3c2410/anubis-cpld.h index dcebf6d61903..168b93fee529 100644 --- a/include/asm-arm/arch-s3c2410/anubis-cpld.h +++ b/include/asm-arm/arch-s3c2410/anubis-cpld.h | |||
@@ -18,4 +18,8 @@ | |||
18 | 18 | ||
19 | #define ANUBIS_CTRL1_NANDSEL (0x3) | 19 | #define ANUBIS_CTRL1_NANDSEL (0x3) |
20 | 20 | ||
21 | /* IDREG - revision */ | ||
22 | |||
23 | #define ANUBIS_IDREG_REVMASK (0x7) | ||
24 | |||
21 | #endif /* __ASM_ARCH_ANUBISCPLD_H */ | 25 | #endif /* __ASM_ARCH_ANUBISCPLD_H */ |
diff --git a/include/asm-arm/arch-s3c2410/anubis-map.h b/include/asm-arm/arch-s3c2410/anubis-map.h index ab076de4a0d0..830d114261da 100644 --- a/include/asm-arm/arch-s3c2410/anubis-map.h +++ b/include/asm-arm/arch-s3c2410/anubis-map.h | |||
@@ -27,14 +27,8 @@ | |||
27 | #define ANUBIS_VA_CTRL1 ANUBIS_IOADDR(0x00000000) /* 0x01800000 */ | 27 | #define ANUBIS_VA_CTRL1 ANUBIS_IOADDR(0x00000000) /* 0x01800000 */ |
28 | #define ANUBIS_PA_CTRL1 (ANUBIS_PA_CPLD) | 28 | #define ANUBIS_PA_CTRL1 (ANUBIS_PA_CPLD) |
29 | 29 | ||
30 | #define ANUBIS_VA_CTRL2 ANUBIS_IOADDR(0x00100000) /* 0x01900000 */ | 30 | #define ANUBIS_VA_IDREG ANUBIS_IOADDR(0x00300000) /* 0x01B00000 */ |
31 | #define ANUBIS_PA_CTRL2 (ANUBIS_PA_CPLD) | 31 | #define ANUBIS_PA_IDREG (ANUBIS_PA_CPLD + (3<<23)) |
32 | |||
33 | #define ANUBIS_VA_CTRL3 ANUBIS_IOADDR(0x00200000) /* 0x01A00000 */ | ||
34 | #define ANUBIS_PA_CTRL3 (ANUBIS_PA_CPLD) | ||
35 | |||
36 | #define ANUBIS_VA_CTRL4 ANUBIS_IOADDR(0x00300000) /* 0x01B00000 */ | ||
37 | #define ANUBIS_PA_CTRL4 (ANUBIS_PA_CPLD) | ||
38 | 32 | ||
39 | #define ANUBIS_IDEPRI ANUBIS_IOADDR(0x01000000) | 33 | #define ANUBIS_IDEPRI ANUBIS_IOADDR(0x01000000) |
40 | #define ANUBIS_IDEPRIAUX ANUBIS_IOADDR(0x01100000) | 34 | #define ANUBIS_IDEPRIAUX ANUBIS_IOADDR(0x01100000) |
diff --git a/include/asm-arm/arch-s3c2410/osiris-cpld.h b/include/asm-arm/arch-s3c2410/osiris-cpld.h index 3b6498468d62..229ab2351db6 100644 --- a/include/asm-arm/arch-s3c2410/osiris-cpld.h +++ b/include/asm-arm/arch-s3c2410/osiris-cpld.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/osiris-cpld.h | 1 | /* linux/include/asm-arm/arch-s3c2410/osiris-cpld.h |
2 | * | 2 | * |
3 | * Copyright (c) 2005 Simtec Electronics | 3 | * Copyright 2005 Simtec Electronics |
4 | * http://www.simtec.co.uk/products/ | 4 | * http://www.simtec.co.uk/products/ |
5 | * Ben Dooks <ben@simtec.co.uk> | 5 | * Ben Dooks <ben@simtec.co.uk> |
6 | * | 6 | * |
@@ -14,12 +14,17 @@ | |||
14 | #ifndef __ASM_ARCH_OSIRISCPLD_H | 14 | #ifndef __ASM_ARCH_OSIRISCPLD_H |
15 | #define __ASM_ARCH_OSIRISCPLD_H | 15 | #define __ASM_ARCH_OSIRISCPLD_H |
16 | 16 | ||
17 | /* CTRL1 - NAND WP control */ | 17 | /* CTRL0 - NAND WP control */ |
18 | 18 | ||
19 | #define OSIRIS_CTRL1_NANDSEL (0x3) | 19 | #define OSIRIS_CTRL0_NANDSEL (0x3) |
20 | #define OSIRIS_CTRL1_BOOT_INT (1<<3) | 20 | #define OSIRIS_CTRL0_BOOT_INT (1<<3) |
21 | #define OSIRIS_CTRL1_PCMCIA (1<<4) | 21 | #define OSIRIS_CTRL0_PCMCIA (1<<4) |
22 | #define OSIRIS_CTRL1_PCMCIA_nWAIT (1<<6) | 22 | #define OSIRIS_CTRL0_FIX8 (1<<5) |
23 | #define OSIRIS_CTRL1_PCMCIA_nIOIS16 (1<<7) | 23 | #define OSIRIS_CTRL0_PCMCIA_nWAIT (1<<6) |
24 | #define OSIRIS_CTRL0_PCMCIA_nIOIS16 (1<<7) | ||
25 | |||
26 | #define OSIRIS_CTRL1_FIX8 (1<<0) | ||
27 | |||
28 | #define OSIRIS_ID_REVMASK (0x7) | ||
24 | 29 | ||
25 | #endif /* __ASM_ARCH_OSIRISCPLD_H */ | 30 | #endif /* __ASM_ARCH_OSIRISCPLD_H */ |
diff --git a/include/asm-arm/arch-s3c2410/osiris-map.h b/include/asm-arm/arch-s3c2410/osiris-map.h index a14164dfa525..b5c74d2b9aaa 100644 --- a/include/asm-arm/arch-s3c2410/osiris-map.h +++ b/include/asm-arm/arch-s3c2410/osiris-map.h | |||
@@ -24,16 +24,19 @@ | |||
24 | 24 | ||
25 | /* we put the CPLD registers next, to get them out of the way */ | 25 | /* we put the CPLD registers next, to get them out of the way */ |
26 | 26 | ||
27 | #define OSIRIS_VA_CTRL1 OSIRIS_IOADDR(0x00000000) | 27 | #define OSIRIS_VA_CTRL0 OSIRIS_IOADDR(0x00000000) |
28 | #define OSIRIS_PA_CTRL1 (OSIRIS_PA_CPLD) | 28 | #define OSIRIS_PA_CTRL0 (OSIRIS_PA_CPLD) |
29 | 29 | ||
30 | #define OSIRIS_VA_CTRL2 OSIRIS_IOADDR(0x00100000) | 30 | #define OSIRIS_VA_CTRL1 OSIRIS_IOADDR(0x00100000) |
31 | #define OSIRIS_PA_CTRL2 (OSIRIS_PA_CPLD + (1<<23)) | 31 | #define OSIRIS_PA_CTRL1 (OSIRIS_PA_CPLD + (1<<23)) |
32 | 32 | ||
33 | #define OSIRIS_VA_CTRL3 OSIRIS_IOADDR(0x00200000) | 33 | #define OSIRIS_VA_CTRL2 OSIRIS_IOADDR(0x00200000) |
34 | #define OSIRIS_PA_CTRL3 (OSIRIS_PA_CPLD + (2<<23)) | 34 | #define OSIRIS_PA_CTRL2 (OSIRIS_PA_CPLD + (2<<23)) |
35 | 35 | ||
36 | #define OSIRIS_VA_CTRL4 OSIRIS_IOADDR(0x00300000) | 36 | #define OSIRIS_VA_CTRL3 OSIRIS_IOADDR(0x00300000) |
37 | #define OSIRIS_PA_CTRL4 (OSIRIS_PA_CPLD + (3<<23)) | 37 | #define OSIRIS_PA_CTRL3 (OSIRIS_PA_CPLD + (2<<23)) |
38 | |||
39 | #define OSIRIS_VA_IDREG OSIRIS_IOADDR(0x00700000) | ||
40 | #define OSIRIS_PA_IDREG (OSIRIS_PA_CPLD + (7<<23)) | ||
38 | 41 | ||
39 | #endif /* __ASM_ARCH_OSIRISMAP_H */ | 42 | #endif /* __ASM_ARCH_OSIRISMAP_H */ |
diff --git a/include/asm-arm/linkage.h b/include/asm-arm/linkage.h index dbe4b4e31a5b..5a25632b1bc0 100644 --- a/include/asm-arm/linkage.h +++ b/include/asm-arm/linkage.h | |||
@@ -4,4 +4,8 @@ | |||
4 | #define __ALIGN .align 0 | 4 | #define __ALIGN .align 0 |
5 | #define __ALIGN_STR ".align 0" | 5 | #define __ALIGN_STR ".align 0" |
6 | 6 | ||
7 | #define ENDPROC(name) \ | ||
8 | .type name, %function; \ | ||
9 | END(name) | ||
10 | |||
7 | #endif | 11 | #endif |