blob: 0e017ecf20966f01a7a4d4abbb10926dc8c23c6f [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 * Function wrappers
Linus Torvalds1da177e2005-04-16 15:20:36 -070026 */
Thomas Gleixner4a2581a2006-07-01 22:30:09 +010027#define set_irq_chipdata(irq, d) set_irq_chip_data(irq, d)
28#define get_irq_chipdata(irq) get_irq_chip_data(irq)
Linus Torvalds1da177e2005-04-16 15:20:36 -070029
Thomas Gleixner4a2581a2006-07-01 22:30:09 +010030/*
31 * Obsolete inline function for calling irq descriptor handlers.
32 */
Linus Torvalds0cd61b62006-10-06 10:53:39 -070033static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc)
Thomas Gleixner4a2581a2006-07-01 22:30:09 +010034{
Linus Torvalds0cd61b62006-10-06 10:53:39 -070035 desc->handle_irq(irq, desc);
Thomas Gleixner4a2581a2006-07-01 22:30:09 +010036}
37
Linus Torvalds1da177e2005-04-16 15:20:36 -070038void set_irq_flags(unsigned int irq, unsigned int flags);
39
40#define IRQF_VALID (1 << 0)
41#define IRQF_PROBE (1 << 1)
42#define IRQF_NOAUTOEN (1 << 2)
43
44/*
Thomas Gleixner4a2581a2006-07-01 22:30:09 +010045 * This is for easy migration, but should be changed in the source
Linus Torvalds1da177e2005-04-16 15:20:36 -070046 */
Thomas Gleixner4a2581a2006-07-01 22:30:09 +010047#define do_level_IRQ handle_level_irq
48#define do_edge_IRQ handle_edge_irq
49#define do_simple_IRQ handle_simple_irq
50#define irqdesc irq_desc
51#define irqchip irq_chip
52
Linus Torvalds0cd61b62006-10-06 10:53:39 -070053#define do_bad_IRQ(irq,desc) \
Thomas Gleixner4a2581a2006-07-01 22:30:09 +010054do { \
55 spin_lock(&desc->lock); \
Linus Torvalds0cd61b62006-10-06 10:53:39 -070056 handle_bad_irq(irq, desc); \
Thomas Gleixner4a2581a2006-07-01 22:30:09 +010057 spin_unlock(&desc->lock); \
58} while(0)
59
60extern unsigned long irq_err_count;
61static inline void ack_bad_irq(int irq)
62{
63 irq_err_count++;
64}
Linus Torvalds1da177e2005-04-16 15:20:36 -070065
66#endif