Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/include/asm-arm/mach/irq.h |
| 3 | * |
| 4 | * Copyright (C) 1995-2000 Russell King. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | #ifndef __ASM_ARM_MACH_IRQ_H |
| 11 | #define __ASM_ARM_MACH_IRQ_H |
| 12 | |
Thomas Gleixner | 4a2581a | 2006-07-01 22:30:09 +0100 | [diff] [blame^] | 13 | #include <linux/irq.h> |
| 14 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | struct seq_file; |
| 16 | |
Russell King | 664399e | 2005-09-04 19:45:00 +0100 | [diff] [blame] | 17 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | * This is internal. Do not use it. |
| 19 | */ |
| 20 | extern void (*init_arch_irq)(void); |
| 21 | extern void init_FIQ(void); |
| 22 | extern int show_fiq_list(struct seq_file *, void *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | |
| 24 | /* |
Thomas Gleixner | 4a2581a | 2006-07-01 22:30:09 +0100 | [diff] [blame^] | 25 | * Function wrappers |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | */ |
Thomas Gleixner | 4a2581a | 2006-07-01 22:30:09 +0100 | [diff] [blame^] | 27 | #define set_irq_chipdata(irq, d) set_irq_chip_data(irq, d) |
| 28 | #define get_irq_chipdata(irq) get_irq_chip_data(irq) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | |
Thomas Gleixner | 4a2581a | 2006-07-01 22:30:09 +0100 | [diff] [blame^] | 30 | /* |
| 31 | * Obsolete inline function for calling irq descriptor handlers. |
| 32 | */ |
| 33 | static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc, |
| 34 | struct pt_regs *regs) |
| 35 | { |
| 36 | desc->handle_irq(irq, desc, regs); |
| 37 | } |
| 38 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | void set_irq_flags(unsigned int irq, unsigned int flags); |
| 40 | |
| 41 | #define IRQF_VALID (1 << 0) |
| 42 | #define IRQF_PROBE (1 << 1) |
| 43 | #define IRQF_NOAUTOEN (1 << 2) |
| 44 | |
| 45 | /* |
Thomas Gleixner | 4a2581a | 2006-07-01 22:30:09 +0100 | [diff] [blame^] | 46 | * This is for easy migration, but should be changed in the source |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | */ |
Thomas Gleixner | 4a2581a | 2006-07-01 22:30:09 +0100 | [diff] [blame^] | 48 | #define do_level_IRQ handle_level_irq |
| 49 | #define do_edge_IRQ handle_edge_irq |
| 50 | #define do_simple_IRQ handle_simple_irq |
| 51 | #define irqdesc irq_desc |
| 52 | #define irqchip irq_chip |
| 53 | |
| 54 | #define do_bad_IRQ(irq,desc,regs) \ |
| 55 | do { \ |
| 56 | spin_lock(&desc->lock); \ |
| 57 | handle_bad_irq(irq, desc, regs); \ |
| 58 | spin_unlock(&desc->lock); \ |
| 59 | } while(0) |
| 60 | |
| 61 | extern unsigned long irq_err_count; |
| 62 | static inline void ack_bad_irq(int irq) |
| 63 | { |
| 64 | irq_err_count++; |
| 65 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 66 | |
| 67 | #endif |