aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-14 18:06:49 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-14 18:06:49 -0400
commitf701737deb59654dd62e15d5dc379f387cf86c6d (patch)
treeb9073b7d4b43bc3d39c2ba1ddc76a1d0698073de /arch
parenteedab661a51966c454e38c17266a531aa58b4a98 (diff)
parent6c1640d52b9b7355cd777c4f08bc930ac96d905b (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
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s3c2440/mach-anubis.c4
-rw-r--r--arch/arm/mach-s3c2440/mach-osiris.c58
-rw-r--r--arch/arm/vfp/entry.S4
-rw-r--r--arch/arm/vfp/vfpmodule.c5
4 files changed, 64 insertions, 7 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
207static struct s3c2410_platform_nand osiris_nand_info = { 218static 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
252static unsigned char pm_osiris_ctrl0;
253
254static 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
260static 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
273static struct sysdev_class osiris_pm_sysclass = {
274 set_kset_name("mach-osiris"),
275 .suspend = osiris_pm_suspend,
276 .resume = osiris_pm_resume,
277};
278
279static struct sys_device osiris_pm_sysdev = {
280 .cls = &osiris_pm_sysclass,
281};
282
238/* Standard Osiris devices */ 283/* Standard Osiris devices */
239 284
240static struct platform_device *osiris_devices[] __initdata = { 285static 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
289static void __init osiris_init(void) 335static 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,
303MACHINE_END 353MACHINE_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
32ENTRY(vfp_null_entry)
33 mov pc, lr
34ENDPROC(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 */
27void vfp_testing_entry(void); 27void vfp_testing_entry(void);
28void vfp_support_entry(void); 28void vfp_support_entry(void);
29void vfp_null_entry(void);
29 30
30void (*vfp_vector)(void) = vfp_testing_entry; 31void (*vfp_vector)(void) = vfp_null_entry;
31union vfp_state *last_VFP_context[NR_CPUS]; 32union 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) {