aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/mach
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm/mach')
-rw-r--r--include/asm-arm/mach/irq.h135
-rw-r--r--include/asm-arm/mach/map.h9
-rw-r--r--include/asm-arm/mach/pci.h2
-rw-r--r--include/asm-arm/mach/serial_at91.h (renamed from include/asm-arm/mach/serial_at91rm9200.h)9
-rw-r--r--include/asm-arm/mach/serial_sa1100.h1
-rw-r--r--include/asm-arm/mach/time.h2
6 files changed, 43 insertions, 115 deletions
diff --git a/include/asm-arm/mach/irq.h b/include/asm-arm/mach/irq.h
index d4d420ecf3a8..131f33733d25 100644
--- a/include/asm-arm/mach/irq.h
+++ b/include/asm-arm/mach/irq.h
@@ -10,95 +10,9 @@
10#ifndef __ASM_ARM_MACH_IRQ_H 10#ifndef __ASM_ARM_MACH_IRQ_H
11#define __ASM_ARM_MACH_IRQ_H 11#define __ASM_ARM_MACH_IRQ_H
12 12
13struct irqdesc; 13#include <linux/irq.h>
14struct pt_regs;
15struct seq_file;
16
17typedef void (*irq_handler_t)(unsigned int, struct irqdesc *, struct pt_regs *);
18typedef void (*irq_control_t)(unsigned int);
19
20struct irqchip {
21 /*
22 * Acknowledge the IRQ.
23 * If this is a level-based IRQ, then it is expected to mask the IRQ
24 * as well.
25 */
26 void (*ack)(unsigned int);
27 /*
28 * Mask the IRQ in hardware.
29 */
30 void (*mask)(unsigned int);
31 /*
32 * Unmask the IRQ in hardware.
33 */
34 void (*unmask)(unsigned int);
35 /*
36 * Ask the hardware to re-trigger the IRQ.
37 * Note: This method _must_ _not_ call the interrupt handler.
38 * If you are unable to retrigger the interrupt, do not
39 * provide a function, or if you do, return non-zero.
40 */
41 int (*retrigger)(unsigned int);
42 /*
43 * Set the type of the IRQ.
44 */
45 int (*set_type)(unsigned int, unsigned int);
46 /*
47 * Set wakeup-enable on the selected IRQ
48 */
49 int (*set_wake)(unsigned int, unsigned int);
50
51#ifdef CONFIG_SMP
52 /*
53 * Route an interrupt to a CPU
54 */
55 void (*set_cpu)(struct irqdesc *desc, unsigned int irq, unsigned int cpu);
56#endif
57};
58
59struct irqdesc {
60 irq_handler_t handle;
61 struct irqchip *chip;
62 struct irqaction *action;
63 struct list_head pend;
64 void __iomem *base;
65 void *data;
66 unsigned int disable_depth;
67
68 unsigned int triggered: 1; /* IRQ has occurred */
69 unsigned int running : 1; /* IRQ is running */
70 unsigned int pending : 1; /* IRQ is pending */
71 unsigned int probing : 1; /* IRQ in use for a probe */
72 unsigned int probe_ok : 1; /* IRQ can be used for probe */
73 unsigned int valid : 1; /* IRQ claimable */
74 unsigned int noautoenable : 1; /* don't automatically enable IRQ */
75 unsigned int unused :25;
76
77 unsigned int irqs_unhandled;
78 struct proc_dir_entry *procdir;
79
80#ifdef CONFIG_SMP
81 cpumask_t affinity;
82 unsigned int cpu;
83#endif
84
85 /*
86 * IRQ lock detection
87 */
88 unsigned int lck_cnt;
89 unsigned int lck_pc;
90 unsigned int lck_jif;
91};
92
93extern struct irqdesc irq_desc[];
94 14
95/* 15struct seq_file;
96 * Helpful inline function for calling irq descriptor handlers.
97 */
98static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
99{
100 desc->handle(irq, desc, regs);
101}
102 16
103/* 17/*
104 * This is internal. Do not use it. 18 * This is internal. Do not use it.
@@ -106,18 +20,22 @@ static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struc
106extern void (*init_arch_irq)(void); 20extern void (*init_arch_irq)(void);
107extern void init_FIQ(void); 21extern void init_FIQ(void);
108extern int show_fiq_list(struct seq_file *, void *); 22extern int show_fiq_list(struct seq_file *, void *);
109void __set_irq_handler(unsigned int irq, irq_handler_t, int);
110 23
111/* 24/*
112 * External stuff. 25 * Function wrappers
26 */
27#define set_irq_chipdata(irq, d) set_irq_chip_data(irq, d)
28#define get_irq_chipdata(irq) get_irq_chip_data(irq)
29
30/*
31 * Obsolete inline function for calling irq descriptor handlers.
113 */ 32 */
114#define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0) 33static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc,
115#define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1) 34 struct pt_regs *regs)
116#define set_irq_data(irq,d) do { irq_desc[irq].data = d; } while (0) 35{
117#define set_irq_chipdata(irq,d) do { irq_desc[irq].base = d; } while (0) 36 desc->handle_irq(irq, desc, regs);
118#define get_irq_chipdata(irq) (irq_desc[irq].base) 37}
119 38
120void set_irq_chip(unsigned int irq, struct irqchip *);
121void set_irq_flags(unsigned int irq, unsigned int flags); 39void set_irq_flags(unsigned int irq, unsigned int flags);
122 40
123#define IRQF_VALID (1 << 0) 41#define IRQF_VALID (1 << 0)
@@ -125,12 +43,25 @@ void set_irq_flags(unsigned int irq, unsigned int flags);
125#define IRQF_NOAUTOEN (1 << 2) 43#define IRQF_NOAUTOEN (1 << 2)
126 44
127/* 45/*
128 * Built-in IRQ handlers. 46 * This is for easy migration, but should be changed in the source
129 */ 47 */
130void do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); 48#define do_level_IRQ handle_level_irq
131void do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); 49#define do_edge_IRQ handle_edge_irq
132void do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); 50#define do_simple_IRQ handle_simple_irq
133void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); 51#define irqdesc irq_desc
134void dummy_mask_unmask_irq(unsigned int irq); 52#define irqchip irq_chip
53
54#define do_bad_IRQ(irq,desc,regs) \
55do { \
56 spin_lock(&desc->lock); \
57 handle_bad_irq(irq, desc, regs); \
58 spin_unlock(&desc->lock); \
59} while(0)
60
61extern unsigned long irq_err_count;
62static inline void ack_bad_irq(int irq)
63{
64 irq_err_count++;
65}
135 66
136#endif 67#endif
diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h
index e8ea67c97c73..cef5364ed5fe 100644
--- a/include/asm-arm/mach/map.h
+++ b/include/asm-arm/mach/map.h
@@ -16,8 +16,6 @@ struct map_desc {
16 unsigned int type; 16 unsigned int type;
17}; 17};
18 18
19struct meminfo;
20
21#define MT_DEVICE 0 19#define MT_DEVICE 0
22#define MT_CACHECLEAN 1 20#define MT_CACHECLEAN 1
23#define MT_MINICLEAN 2 21#define MT_MINICLEAN 2
@@ -28,7 +26,8 @@ struct meminfo;
28#define MT_IXP2000_DEVICE 7 26#define MT_IXP2000_DEVICE 7
29#define MT_NONSHARED_DEVICE 8 27#define MT_NONSHARED_DEVICE 8
30 28
31extern void create_memmap_holes(struct meminfo *); 29#ifdef CONFIG_MMU
32extern void memtable_init(struct meminfo *);
33extern void iotable_init(struct map_desc *, int); 30extern void iotable_init(struct map_desc *, int);
34extern void setup_io_desc(void); 31#else
32#define iotable_init(map,num) do { } while (0)
33#endif
diff --git a/include/asm-arm/mach/pci.h b/include/asm-arm/mach/pci.h
index 25d540ed0079..923e0ca66200 100644
--- a/include/asm-arm/mach/pci.h
+++ b/include/asm-arm/mach/pci.h
@@ -28,7 +28,7 @@ struct hw_pci {
28struct pci_sys_data { 28struct pci_sys_data {
29 struct list_head node; 29 struct list_head node;
30 int busnr; /* primary bus number */ 30 int busnr; /* primary bus number */
31 unsigned long mem_offset; /* bus->cpu memory mapping offset */ 31 u64 mem_offset; /* bus->cpu memory mapping offset */
32 unsigned long io_offset; /* bus->cpu IO mapping offset */ 32 unsigned long io_offset; /* bus->cpu IO mapping offset */
33 struct pci_bus *bus; /* PCI bus */ 33 struct pci_bus *bus; /* PCI bus */
34 struct resource *resource[3]; /* Primary PCI bus resources */ 34 struct resource *resource[3]; /* Primary PCI bus resources */
diff --git a/include/asm-arm/mach/serial_at91rm9200.h b/include/asm-arm/mach/serial_at91.h
index 98f4b0cb883c..1290bb32802d 100644
--- a/include/asm-arm/mach/serial_at91rm9200.h
+++ b/include/asm-arm/mach/serial_at91.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/include/asm-arm/mach/serial_at91rm9200.h 2 * linux/include/asm-arm/mach/serial_at91.h
3 * 3 *
4 * Based on serial_sa1100.h by Nicolas Pitre 4 * Based on serial_sa1100.h by Nicolas Pitre
5 * 5 *
@@ -7,7 +7,6 @@
7 * 7 *
8 * Low level machine dependent UART functions. 8 * Low level machine dependent UART functions.
9 */ 9 */
10#include <linux/config.h>
11 10
12struct uart_port; 11struct uart_port;
13 12
@@ -15,7 +14,7 @@ struct uart_port;
15 * This is a temporary structure for registering these 14 * This is a temporary structure for registering these
16 * functions; it is intended to be discarded after boot. 15 * functions; it is intended to be discarded after boot.
17 */ 16 */
18struct at91rm9200_port_fns { 17struct at91_port_fns {
19 void (*set_mctrl)(struct uart_port *, u_int); 18 void (*set_mctrl)(struct uart_port *, u_int);
20 u_int (*get_mctrl)(struct uart_port *); 19 u_int (*get_mctrl)(struct uart_port *);
21 void (*enable_ms)(struct uart_port *); 20 void (*enable_ms)(struct uart_port *);
@@ -26,11 +25,9 @@ struct at91rm9200_port_fns {
26}; 25};
27 26
28#if defined(CONFIG_SERIAL_AT91) 27#if defined(CONFIG_SERIAL_AT91)
29void at91_register_uart_fns(struct at91rm9200_port_fns *fns); 28void at91_register_uart_fns(struct at91_port_fns *fns);
30void at91_register_uart(int idx, int port);
31#else 29#else
32#define at91_register_uart_fns(fns) do { } while (0) 30#define at91_register_uart_fns(fns) do { } while (0)
33#define at91_register_uart(idx,port) do { } while (0)
34#endif 31#endif
35 32
36 33
diff --git a/include/asm-arm/mach/serial_sa1100.h b/include/asm-arm/mach/serial_sa1100.h
index 9162018585df..20c22bb218d9 100644
--- a/include/asm-arm/mach/serial_sa1100.h
+++ b/include/asm-arm/mach/serial_sa1100.h
@@ -7,7 +7,6 @@
7 * 7 *
8 * Low level machine dependent UART functions. 8 * Low level machine dependent UART functions.
9 */ 9 */
10#include <linux/config.h>
11 10
12struct uart_port; 11struct uart_port;
13struct uart_info; 12struct uart_info;
diff --git a/include/asm-arm/mach/time.h b/include/asm-arm/mach/time.h
index 96c6db7dd0e1..dee0bc336fe8 100644
--- a/include/asm-arm/mach/time.h
+++ b/include/asm-arm/mach/time.h
@@ -50,6 +50,7 @@ struct sys_timer {
50#define DYN_TICK_ENABLED (1 << 1) 50#define DYN_TICK_ENABLED (1 << 1)
51 51
52struct dyn_tick_timer { 52struct dyn_tick_timer {
53 spinlock_t lock;
53 unsigned int state; /* Current state */ 54 unsigned int state; /* Current state */
54 int (*enable)(void); /* Enables dynamic tick */ 55 int (*enable)(void); /* Enables dynamic tick */
55 int (*disable)(void); /* Disables dynamic tick */ 56 int (*disable)(void); /* Disables dynamic tick */
@@ -68,6 +69,7 @@ extern void timer_tick(struct pt_regs *);
68/* 69/*
69 * Kernel time keeping support. 70 * Kernel time keeping support.
70 */ 71 */
72struct timespec;
71extern int (*set_rtc)(void); 73extern int (*set_rtc)(void);
72extern void save_time_delta(struct timespec *delta, struct timespec *rtc); 74extern void save_time_delta(struct timespec *delta, struct timespec *rtc);
73extern void restore_time_delta(struct timespec *delta, struct timespec *rtc); 75extern void restore_time_delta(struct timespec *delta, struct timespec *rtc);