diff options
author | eric miao <eric.miao@marvell.com> | 2008-01-28 18:00:02 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-02-04 08:17:33 -0500 |
commit | c016550490687c6bdbcdf06c7b4d874b6c7c6e4e (patch) | |
tree | d2b31c1d89c72417d050343caa6a6a5161b6d02f /arch/arm/mach-pxa/pxa27x.c | |
parent | cd5604d5618a802e4ed047eb8b1515edc5fc49b5 (diff) |
[ARM] pxa: introduce sysdev for IRQ register saving/restoring
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/pxa27x.c')
-rw-r--r-- | arch/arm/mach-pxa/pxa27x.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 96cf274ec7cb..343296a710b3 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/suspend.h> | 17 | #include <linux/suspend.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/sysdev.h> | ||
19 | 20 | ||
20 | #include <asm/hardware.h> | 21 | #include <asm/hardware.h> |
21 | #include <asm/irq.h> | 22 | #include <asm/irq.h> |
@@ -196,7 +197,6 @@ enum { SLEEP_SAVE_START = 0, | |||
196 | 197 | ||
197 | SLEEP_SAVE_PSTR, | 198 | SLEEP_SAVE_PSTR, |
198 | 199 | ||
199 | SLEEP_SAVE_ICMR, | ||
200 | SLEEP_SAVE_CKEN, | 200 | SLEEP_SAVE_CKEN, |
201 | 201 | ||
202 | SLEEP_SAVE_MDREFR, | 202 | SLEEP_SAVE_MDREFR, |
@@ -223,7 +223,6 @@ void pxa27x_cpu_pm_save(unsigned long *sleep_save) | |||
223 | SAVE(PWER); SAVE(PCFR); SAVE(PRER); | 223 | SAVE(PWER); SAVE(PCFR); SAVE(PRER); |
224 | SAVE(PFER); SAVE(PKWR); | 224 | SAVE(PFER); SAVE(PKWR); |
225 | 225 | ||
226 | SAVE(ICMR); ICMR = 0; | ||
227 | SAVE(CKEN); | 226 | SAVE(CKEN); |
228 | SAVE(PSTR); | 227 | SAVE(PSTR); |
229 | 228 | ||
@@ -256,9 +255,6 @@ void pxa27x_cpu_pm_restore(unsigned long *sleep_save) | |||
256 | 255 | ||
257 | RESTORE(CKEN); | 256 | RESTORE(CKEN); |
258 | 257 | ||
259 | ICLR = 0; | ||
260 | ICCR = 1; | ||
261 | RESTORE(ICMR); | ||
262 | RESTORE(PSTR); | 258 | RESTORE(PSTR); |
263 | } | 259 | } |
264 | 260 | ||
@@ -409,9 +405,20 @@ static struct platform_device *devices[] __initdata = { | |||
409 | &pxa27x_device_ssp3, | 405 | &pxa27x_device_ssp3, |
410 | }; | 406 | }; |
411 | 407 | ||
408 | static struct sys_device pxa27x_sysdev[] = { | ||
409 | { | ||
410 | .id = 0, | ||
411 | .cls = &pxa_irq_sysclass, | ||
412 | }, { | ||
413 | .id = 1, | ||
414 | .cls = &pxa_irq_sysclass, | ||
415 | }, | ||
416 | }; | ||
417 | |||
412 | static int __init pxa27x_init(void) | 418 | static int __init pxa27x_init(void) |
413 | { | 419 | { |
414 | int ret = 0; | 420 | int i, ret = 0; |
421 | |||
415 | if (cpu_is_pxa27x()) { | 422 | if (cpu_is_pxa27x()) { |
416 | clks_register(pxa27x_clks, ARRAY_SIZE(pxa27x_clks)); | 423 | clks_register(pxa27x_clks, ARRAY_SIZE(pxa27x_clks)); |
417 | 424 | ||
@@ -420,8 +427,15 @@ static int __init pxa27x_init(void) | |||
420 | 427 | ||
421 | pxa27x_init_pm(); | 428 | pxa27x_init_pm(); |
422 | 429 | ||
430 | for (i = 0; i < ARRAY_SIZE(pxa27x_sysdev); i++) { | ||
431 | ret = sysdev_register(&pxa27x_sysdev[i]); | ||
432 | if (ret) | ||
433 | pr_err("failed to register sysdev[%d]\n", i); | ||
434 | } | ||
435 | |||
423 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 436 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
424 | } | 437 | } |
438 | |||
425 | return ret; | 439 | return ret; |
426 | } | 440 | } |
427 | 441 | ||