• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ****************************************************************************
11  ****************************************************************************/
12 #ifndef _LINUX_IRQ_H
13 #define _LINUX_IRQ_H
14 
15 #include <linux/smp.h>
16 
17 #include <linux/linkage.h>
18 #include <linux/cache.h>
19 #include <linux/spinlock.h>
20 #include <linux/cpumask.h>
21 #include <linux/irqreturn.h>
22 
23 #include <asm/irq.h>
24 #include <asm/ptrace.h>
25 
26 #define IRQ_TYPE_NONE 0x00000000
27 #define IRQ_TYPE_EDGE_RISING 0x00000001
28 #define IRQ_TYPE_EDGE_FALLING 0x00000002
29 #define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)
30 #define IRQ_TYPE_LEVEL_HIGH 0x00000004
31 #define IRQ_TYPE_LEVEL_LOW 0x00000008
32 #define IRQ_TYPE_SENSE_MASK 0x0000000f
33 #define IRQ_TYPE_PROBE 0x00000010
34 
35 #define IRQ_INPROGRESS 0x00010000
36 #define IRQ_DISABLED 0x00020000
37 #define IRQ_PENDING 0x00040000
38 #define IRQ_REPLAY 0x00080000
39 #define IRQ_AUTODETECT 0x00100000
40 #define IRQ_WAITING 0x00200000
41 #define IRQ_LEVEL 0x00400000
42 #define IRQ_MASKED 0x00800000
43 #define IRQ_PER_CPU 0x01000000
44 #define CHECK_IRQ_PER_CPU(var) 0
45 
46 #define IRQ_NOPROBE 0x02000000
47 #define IRQ_NOREQUEST 0x04000000
48 #define IRQ_NOAUTOEN 0x08000000
49 #define IRQ_DELAYED_DISABLE 0x10000000
50 #define IRQ_WAKEUP 0x20000000
51 
52 struct proc_dir_entry;
53 
54 struct irq_chip {
55  const char *name;
56  unsigned int (*startup)(unsigned int irq);
57  void (*shutdown)(unsigned int irq);
58  void (*enable)(unsigned int irq);
59  void (*disable)(unsigned int irq);
60 
61  void (*ack)(unsigned int irq);
62  void (*mask)(unsigned int irq);
63  void (*mask_ack)(unsigned int irq);
64  void (*unmask)(unsigned int irq);
65  void (*eoi)(unsigned int irq);
66 
67  void (*end)(unsigned int irq);
68  void (*set_affinity)(unsigned int irq, cpumask_t dest);
69  int (*retrigger)(unsigned int irq);
70  int (*set_type)(unsigned int irq, unsigned int flow_type);
71  int (*set_wake)(unsigned int irq, unsigned int on);
72 
73  const char *typename;
74 };
75 
76 struct irq_desc {
77  void fastcall (*handle_irq)(unsigned int irq,
78  struct irq_desc *desc,
79  struct pt_regs *regs);
80  struct irq_chip *chip;
81  void *handler_data;
82  void *chip_data;
83  struct irqaction *action;
84  unsigned int status;
85 
86  unsigned int depth;
87  unsigned int wake_depth;
88  unsigned int irq_count;
89  unsigned int irqs_unhandled;
90  spinlock_t lock;
91 } ____cacheline_aligned;
92 
93 #define hw_interrupt_type irq_chip
94 typedef struct irq_chip hw_irq_controller;
95 #define no_irq_type no_irq_chip
96 typedef struct irq_desc irq_desc_t;
97 
98 #include <asm/hw_irq.h>
99 
100 #endif
101