blob: eb0bfba6570d6ae294fa50adf0a349527ba2ad86 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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 Gleixner4a2581a2006-07-01 22:30:09 +010013#include <linux/irq.h>
14
Linus Torvalds1da177e2005-04-16 15:20:36 -070015struct seq_file;
16
Russell King664399e2005-09-04 19:45:00 +010017/*
Linus Torvalds1da177e2005-04-16 15:20:36 -070018 * This is internal. Do not use it.
19 */
20extern void (*init_arch_irq)(void);
21extern void init_FIQ(void);
22extern int show_fiq_list(struct seq_file *, void *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
24/*
Thomas Gleixner4a2581a2006-07-01 22:30:09 +010025 * Obsolete inline function for calling irq descriptor handlers.
26 */
Linus Torvalds0cd61b62006-10-06 10:53:39 -070027static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc)
Thomas Gleixner4a2581a2006-07-01 22:30:09 +010028{
Linus Torvalds0cd61b62006-10-06 10:53:39 -070029 desc->handle_irq(irq, desc);
Thomas Gleixner4a2581a2006-07-01 22:30:09 +010030}
31
Linus Torvalds1da177e2005-04-16 15:20:36 -070032void 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 Gleixner4a2581a2006-07-01 22:30:09 +010039 * This is for easy migration, but should be changed in the source
Linus Torvalds1da177e2005-04-16 15:20:36 -070040 */
Linus Torvalds0cd61b62006-10-06 10:53:39 -070041#define do_bad_IRQ(irq,desc) \
Thomas Gleixner4a2581a2006-07-01 22:30:09 +010042do { \
43 spin_lock(&desc->lock); \
Linus Torvalds0cd61b62006-10-06 10:53:39 -070044 handle_bad_irq(irq, desc); \
Thomas Gleixner4a2581a2006-07-01 22:30:09 +010045 spin_unlock(&desc->lock); \
46} while(0)
47
48extern unsigned long irq_err_count;
49static inline void ack_bad_irq(int irq)
50{
51 irq_err_count++;
52}
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
54#endif