diff options
author | Heiko Stuebner <heiko@sntech.de> | 2013-02-12 21:59:20 +0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2013-03-05 15:20:33 +0400 |
commit | ce6c164bf0ea44fad7969e1f1027d4f6cfb30360 (patch) | |
tree | 62536cd73c1e9efeb93110fc077f8ae5575172c3 /arch/arm/mach-s3c24xx/irq.c | |
parent | 6f8d7ea275eb2a27fd62211e93921a82f367f939 (diff) | |
download | linux-ce6c164bf0ea44fad7969e1f1027d4f6cfb30360.tar.xz |
ARM: S3C24XX: create dedicated irq init functions for s3c2440 and s3c2442
s3c2440 and s3c2442 need separate init functions, as the s3c2440 contains
even more differing irqs that will be moved in the following patch.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s3c24xx/irq.c')
-rw-r--r-- | arch/arm/mach-s3c24xx/irq.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/arch/arm/mach-s3c24xx/irq.c b/arch/arm/mach-s3c24xx/irq.c index 1fea3ddd123d..2c59b2d99a81 100644 --- a/arch/arm/mach-s3c24xx/irq.c +++ b/arch/arm/mach-s3c24xx/irq.c @@ -783,10 +783,13 @@ static struct irq_chip s3c_irq_cam = { .irq_ack = s3c_irq_cam_ack, }; -static int s3c244x_irq_add(struct device *dev, struct subsys_interface *sif) +#ifdef CONFIG_CPU_S3C2440 +void __init s3c2440_init_irq(void) { unsigned int irqno; + s3c24xx_init_irq(); + irq_set_chip_and_handler(IRQ_NFCON, &s3c_irq_level_chip, handle_level_irq); set_irq_flags(IRQ_NFCON, IRQF_VALID); @@ -802,36 +805,34 @@ static int s3c244x_irq_add(struct device *dev, struct subsys_interface *sif) handle_level_irq); set_irq_flags(irqno, IRQF_VALID); } - - return 0; } +#endif -static struct subsys_interface s3c2440_irq_interface = { - .name = "s3c2440_irq", - .subsys = &s3c2440_subsys, - .add_dev = s3c244x_irq_add, -}; - -static int s3c2440_irq_init(void) +#ifdef CONFIG_CPU_S3C2442 +void __init s3c2442_init_irq(void) { - return subsys_interface_register(&s3c2440_irq_interface); -} + unsigned int irqno; -arch_initcall(s3c2440_irq_init); + s3c24xx_init_irq(); -static struct subsys_interface s3c2442_irq_interface = { - .name = "s3c2442_irq", - .subsys = &s3c2442_subsys, - .add_dev = s3c244x_irq_add, -}; + irq_set_chip_and_handler(IRQ_NFCON, &s3c_irq_level_chip, + handle_level_irq); + set_irq_flags(IRQ_NFCON, IRQF_VALID); + /* add chained handler for camera */ -static int s3c2442_irq_init(void) -{ - return subsys_interface_register(&s3c2442_irq_interface); + irq_set_chip_and_handler(IRQ_CAM, &s3c_irq_level_chip, + handle_level_irq); + irq_set_chained_handler(IRQ_CAM, s3c_irq_demux_cam); + + for (irqno = IRQ_S3C2440_CAM_C; irqno <= IRQ_S3C2440_CAM_P; irqno++) { + irq_set_chip_and_handler(irqno, &s3c_irq_cam, + handle_level_irq); + set_irq_flags(irqno, IRQF_VALID); + } } +#endif -arch_initcall(s3c2442_irq_init); #endif #ifdef CONFIG_CPU_S3C2443 |