irq.c (f6fb7af4768bc1ddc2349f6eaefedd746c8e4913) | irq.c (b9e25aced33eeb7279ccbaef198f28370cfb4e93) |
---|---|
1/* 2 * linux/arch/arm/mach-pxa/irq.c 3 * 4 * Generic PXA IRQ handling 5 * 6 * Author: Nicolas Pitre 7 * Created: Jun 15, 2001 8 * Copyright: MontaVista Software Inc. --- 37 unchanged lines hidden (view full) --- 46 47static struct irq_chip pxa_internal_irq_chip = { 48 .name = "SC", 49 .ack = pxa_mask_irq, 50 .mask = pxa_mask_irq, 51 .unmask = pxa_unmask_irq, 52}; 53 | 1/* 2 * linux/arch/arm/mach-pxa/irq.c 3 * 4 * Generic PXA IRQ handling 5 * 6 * Author: Nicolas Pitre 7 * Created: Jun 15, 2001 8 * Copyright: MontaVista Software Inc. --- 37 unchanged lines hidden (view full) --- 46 47static struct irq_chip pxa_internal_irq_chip = { 48 .name = "SC", 49 .ack = pxa_mask_irq, 50 .mask = pxa_mask_irq, 51 .unmask = pxa_unmask_irq, 52}; 53 |
54void __init pxa_init_irq(int irq_nr) | 54void __init pxa_init_irq(int irq_nr, set_wake_t fn) |
55{ 56 int irq; 57 58 pxa_internal_irq_nr = irq_nr; 59 60 for (irq = 0; irq < irq_nr; irq += 32) { 61 _ICMR(irq) = 0; /* disable all IRQs */ 62 _ICLR(irq) = 0; /* all IRQs are IRQ, not FIQ */ 63 } 64 65 /* only unmasked interrupts kick us out of idle */ 66 ICCR = 1; 67 68 for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq++) { 69 set_irq_chip(irq, &pxa_internal_irq_chip); 70 set_irq_handler(irq, handle_level_irq); 71 set_irq_flags(irq, IRQF_VALID); 72 } | 55{ 56 int irq; 57 58 pxa_internal_irq_nr = irq_nr; 59 60 for (irq = 0; irq < irq_nr; irq += 32) { 61 _ICMR(irq) = 0; /* disable all IRQs */ 62 _ICLR(irq) = 0; /* all IRQs are IRQ, not FIQ */ 63 } 64 65 /* only unmasked interrupts kick us out of idle */ 66 ICCR = 1; 67 68 for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq++) { 69 set_irq_chip(irq, &pxa_internal_irq_chip); 70 set_irq_handler(irq, handle_level_irq); 71 set_irq_flags(irq, IRQF_VALID); 72 } |
73} | |
74 | 73 |
75void __init pxa_init_irq_set_wake(int (*set_wake)(unsigned int, unsigned int)) 76{ 77 pxa_internal_irq_chip.set_wake = set_wake; 78 pxa_init_gpio_set_wake(set_wake); | 74 pxa_internal_irq_chip.set_wake = fn; |
79} 80 81#ifdef CONFIG_PM 82static unsigned long saved_icmr[2]; 83 84static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state) 85{ 86 int i, irq = PXA_IRQ(0); --- 38 unchanged lines hidden --- | 75} 76 77#ifdef CONFIG_PM 78static unsigned long saved_icmr[2]; 79 80static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state) 81{ 82 int i, irq = PXA_IRQ(0); --- 38 unchanged lines hidden --- |