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 | * Obsolete inline function for calling irq descriptor handlers. |
| 26 | */ |
Linus Torvalds | 0cd61b6 | 2006-10-06 10:53:39 -0700 | [diff] [blame] | 27 | static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc) |
Thomas Gleixner | 4a2581a | 2006-07-01 22:30:09 +0100 | [diff] [blame] | 28 | { |
Linus Torvalds | 0cd61b6 | 2006-10-06 10:53:39 -0700 | [diff] [blame] | 29 | desc->handle_irq(irq, desc); |
Thomas Gleixner | 4a2581a | 2006-07-01 22:30:09 +0100 | [diff] [blame] | 30 | } |
| 31 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | void set_irq_flags(unsigned int irq, unsigned int flags); |
| 33 | |
| 34 | #define IRQF_VALID (1 << 0) |
| 35 | #define IRQF_PROBE (1 << 1) |
| 36 | #define IRQF_NOAUTOEN (1 << 2) |
| 37 | |
| 38 | /* |
Thomas Gleixner | 4a2581a | 2006-07-01 22:30:09 +0100 | [diff] [blame] | 39 | * This is for easy migration, but should be changed in the source |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | */ |
Linus Torvalds | 0cd61b6 | 2006-10-06 10:53:39 -0700 | [diff] [blame] | 41 | #define do_bad_IRQ(irq,desc) \ |
Thomas Gleixner | 4a2581a | 2006-07-01 22:30:09 +0100 | [diff] [blame] | 42 | do { \ |
| 43 | spin_lock(&desc->lock); \ |
Linus Torvalds | 0cd61b6 | 2006-10-06 10:53:39 -0700 | [diff] [blame] | 44 | handle_bad_irq(irq, desc); \ |
Thomas Gleixner | 4a2581a | 2006-07-01 22:30:09 +0100 | [diff] [blame] | 45 | spin_unlock(&desc->lock); \ |
| 46 | } while(0) |
| 47 | |
| 48 | extern unsigned long irq_err_count; |
| 49 | static inline void ack_bad_irq(int irq) |
| 50 | { |
| 51 | irq_err_count++; |
| 52 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | |
| 54 | #endif |