Subversion Repositories Kolibri OS

Rev

Rev 6934 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6102 serge 1
/* interrupt.h */
2
#ifndef _LINUX_INTERRUPT_H
3
#define _LINUX_INTERRUPT_H
4
 
5
#include 
6
#include 
7
#include 
8
#include 
9
/*
10
 * These correspond to the IORESOURCE_IRQ_* defines in
11
 * linux/ioport.h to select the interrupt line behaviour.  When
12
 * requesting an interrupt without specifying a IRQF_TRIGGER, the
13
 * setting should be assumed to be "as already configured", which
14
 * may be as per machine or firmware initialisation.
15
 */
16
#define IRQF_TRIGGER_NONE	0x00000000
17
#define IRQF_TRIGGER_RISING	0x00000001
18
#define IRQF_TRIGGER_FALLING	0x00000002
19
#define IRQF_TRIGGER_HIGH	0x00000004
20
#define IRQF_TRIGGER_LOW	0x00000008
21
#define IRQF_TRIGGER_MASK	(IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | \
22
				 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)
23
#define IRQF_TRIGGER_PROBE	0x00000010
24
 
25
/*
26
 * These flags used only by the kernel as part of the
27
 * irq handling routines.
28
 *
29
 * IRQF_SHARED - allow sharing the irq among several devices
30
 * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur
31
 * IRQF_TIMER - Flag to mark this interrupt as timer interrupt
32
 * IRQF_PERCPU - Interrupt is per cpu
33
 * IRQF_NOBALANCING - Flag to exclude this interrupt from irq balancing
34
 * IRQF_IRQPOLL - Interrupt is used for polling (only the interrupt that is
35
 *                registered first in an shared interrupt is considered for
36
 *                performance reasons)
37
 * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler finished.
38
 *                Used by threaded interrupts which need to keep the
39
 *                irq line disabled until the threaded handler has been run.
40
 * IRQF_NO_SUSPEND - Do not disable this IRQ during suspend.  Does not guarantee
41
 *                   that this interrupt will wake the system from a suspended
42
 *                   state.  See Documentation/power/suspend-and-interrupts.txt
43
 * IRQF_FORCE_RESUME - Force enable it on resume even if IRQF_NO_SUSPEND is set
44
 * IRQF_NO_THREAD - Interrupt cannot be threaded
45
 * IRQF_EARLY_RESUME - Resume IRQ early during syscore instead of at device
46
 *                resume time.
47
 * IRQF_COND_SUSPEND - If the IRQ is shared with a NO_SUSPEND user, execute this
48
 *                interrupt handler after suspending interrupts. For system
49
 *                wakeup devices users need to implement wakeup detection in
50
 *                their interrupt handlers.
51
 */
52
#define IRQF_SHARED		0x00000080
53
#define IRQF_PROBE_SHARED	0x00000100
54
#define __IRQF_TIMER		0x00000200
55
#define IRQF_PERCPU		0x00000400
56
#define IRQF_NOBALANCING	0x00000800
57
#define IRQF_IRQPOLL		0x00001000
58
#define IRQF_ONESHOT		0x00002000
59
#define IRQF_NO_SUSPEND		0x00004000
60
#define IRQF_FORCE_RESUME	0x00008000
61
#define IRQF_NO_THREAD		0x00010000
62
#define IRQF_EARLY_RESUME	0x00020000
63
#define IRQF_COND_SUSPEND	0x00040000
64
 
65
#define IRQF_TIMER		(__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD)
66
 
67
extern int early_irq_init(void);
68
extern int arch_probe_nr_irqs(void);
69
extern int arch_early_irq_init(void);
70
 
71
#endif