aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa3xx.c
diff options
context:
space:
mode:
authoreric miao <eric.miao@marvell.com>2008-01-28 18:00:02 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-02-04 08:17:33 -0500
commitc016550490687c6bdbcdf06c7b4d874b6c7c6e4e (patch)
treed2b31c1d89c72417d050343caa6a6a5161b6d02f /arch/arm/mach-pxa/pxa3xx.c
parentcd5604d5618a802e4ed047eb8b1515edc5fc49b5 (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/pxa3xx.c')
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 5cbf057a1b32..3a7e8ccd70bd 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -20,6 +20,7 @@
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/irq.h> 21#include <linux/irq.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/sysdev.h>
23 24
24#include <asm/hardware.h> 25#include <asm/hardware.h>
25#include <asm/arch/pxa3xx-regs.h> 26#include <asm/arch/pxa3xx-regs.h>
@@ -452,9 +453,19 @@ static struct platform_device *devices[] __initdata = {
452 &pxa3xx_device_ssp4, 453 &pxa3xx_device_ssp4,
453}; 454};
454 455
456static struct sys_device pxa3xx_sysdev[] = {
457 {
458 .id = 0,
459 .cls = &pxa_irq_sysclass,
460 }, {
461 .id = 1,
462 .cls = &pxa_irq_sysclass,
463 },
464};
465
455static int __init pxa3xx_init(void) 466static int __init pxa3xx_init(void)
456{ 467{
457 int ret = 0; 468 int i, ret = 0;
458 469
459 if (cpu_is_pxa3xx()) { 470 if (cpu_is_pxa3xx()) {
460 clks_register(pxa3xx_clks, ARRAY_SIZE(pxa3xx_clks)); 471 clks_register(pxa3xx_clks, ARRAY_SIZE(pxa3xx_clks));
@@ -464,9 +475,16 @@ static int __init pxa3xx_init(void)
464 475
465 pxa3xx_init_pm(); 476 pxa3xx_init_pm();
466 477
467 return platform_add_devices(devices, ARRAY_SIZE(devices)); 478 for (i = 0; i < ARRAY_SIZE(pxa3xx_sysdev); i++) {
479 ret = sysdev_register(&pxa3xx_sysdev[i]);
480 if (ret)
481 pr_err("failed to register sysdev[%d]\n", i);
482 }
483
484 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
468 } 485 }
469 return 0; 486
487 return ret;
470} 488}
471 489
472subsys_initcall(pxa3xx_init); 490subsys_initcall(pxa3xx_init);