diff options
author | Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 2007-09-12 22:04:04 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-10-11 18:46:04 -0400 |
commit | d80c1c0b2207ba326b2c06249dfebddf8ac863bd (patch) | |
tree | 6fedbb8d5c70b6c67e47a95cbb11c4a889b9bb2b | |
parent | ec70f65e3b5309e7ac8b5508ff5657050c92b913 (diff) |
[MIPS] i8295 cleanups.
o Move i8259 function declarations to include/asm-mips/i8259.h
o Make i8259.c functions static where possible.
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/kernel/i8259.c | 14 | ||||
-rw-r--r-- | include/asm-mips/hw_irq.h | 7 | ||||
-rw-r--r-- | include/asm-mips/i8259.h | 5 |
3 files changed, 10 insertions, 16 deletions
diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c index 60021647cac1..b6e5bb41b06b 100644 --- a/arch/mips/kernel/i8259.c +++ b/arch/mips/kernel/i8259.c | |||
@@ -30,8 +30,10 @@ | |||
30 | 30 | ||
31 | static int i8259A_auto_eoi = -1; | 31 | static int i8259A_auto_eoi = -1; |
32 | DEFINE_SPINLOCK(i8259A_lock); | 32 | DEFINE_SPINLOCK(i8259A_lock); |
33 | /* some platforms call this... */ | 33 | static void disable_8259A_irq(unsigned int irq); |
34 | void mask_and_ack_8259A(unsigned int); | 34 | static void enable_8259A_irq(unsigned int irq); |
35 | static void mask_and_ack_8259A(unsigned int irq); | ||
36 | static void init_8259A(int auto_eoi); | ||
35 | 37 | ||
36 | static struct irq_chip i8259A_chip = { | 38 | static struct irq_chip i8259A_chip = { |
37 | .name = "XT-PIC", | 39 | .name = "XT-PIC", |
@@ -56,7 +58,7 @@ static unsigned int cached_irq_mask = 0xffff; | |||
56 | #define cached_master_mask (cached_irq_mask) | 58 | #define cached_master_mask (cached_irq_mask) |
57 | #define cached_slave_mask (cached_irq_mask >> 8) | 59 | #define cached_slave_mask (cached_irq_mask >> 8) |
58 | 60 | ||
59 | void disable_8259A_irq(unsigned int irq) | 61 | static void disable_8259A_irq(unsigned int irq) |
60 | { | 62 | { |
61 | unsigned int mask; | 63 | unsigned int mask; |
62 | unsigned long flags; | 64 | unsigned long flags; |
@@ -72,7 +74,7 @@ void disable_8259A_irq(unsigned int irq) | |||
72 | spin_unlock_irqrestore(&i8259A_lock, flags); | 74 | spin_unlock_irqrestore(&i8259A_lock, flags); |
73 | } | 75 | } |
74 | 76 | ||
75 | void enable_8259A_irq(unsigned int irq) | 77 | static void enable_8259A_irq(unsigned int irq) |
76 | { | 78 | { |
77 | unsigned int mask; | 79 | unsigned int mask; |
78 | unsigned long flags; | 80 | unsigned long flags; |
@@ -142,7 +144,7 @@ static inline int i8259A_irq_real(unsigned int irq) | |||
142 | * first, _then_ send the EOI, and the order of EOI | 144 | * first, _then_ send the EOI, and the order of EOI |
143 | * to the two 8259s is important! | 145 | * to the two 8259s is important! |
144 | */ | 146 | */ |
145 | void mask_and_ack_8259A(unsigned int irq) | 147 | static void mask_and_ack_8259A(unsigned int irq) |
146 | { | 148 | { |
147 | unsigned int irqmask; | 149 | unsigned int irqmask; |
148 | unsigned long flags; | 150 | unsigned long flags; |
@@ -256,7 +258,7 @@ static int __init i8259A_init_sysfs(void) | |||
256 | 258 | ||
257 | device_initcall(i8259A_init_sysfs); | 259 | device_initcall(i8259A_init_sysfs); |
258 | 260 | ||
259 | void init_8259A(int auto_eoi) | 261 | static void init_8259A(int auto_eoi) |
260 | { | 262 | { |
261 | unsigned long flags; | 263 | unsigned long flags; |
262 | 264 | ||
diff --git a/include/asm-mips/hw_irq.h b/include/asm-mips/hw_irq.h index 458d9fdc76bf..aca05a43a97b 100644 --- a/include/asm-mips/hw_irq.h +++ b/include/asm-mips/hw_irq.h | |||
@@ -8,15 +8,8 @@ | |||
8 | #ifndef __ASM_HW_IRQ_H | 8 | #ifndef __ASM_HW_IRQ_H |
9 | #define __ASM_HW_IRQ_H | 9 | #define __ASM_HW_IRQ_H |
10 | 10 | ||
11 | #include <linux/profile.h> | ||
12 | #include <asm/atomic.h> | 11 | #include <asm/atomic.h> |
13 | 12 | ||
14 | extern void disable_8259A_irq(unsigned int irq); | ||
15 | extern void enable_8259A_irq(unsigned int irq); | ||
16 | extern int i8259A_irq_pending(unsigned int irq); | ||
17 | extern void make_8259A_irq(unsigned int irq); | ||
18 | extern void init_8259A(int aeoi); | ||
19 | |||
20 | extern atomic_t irq_err_count; | 13 | extern atomic_t irq_err_count; |
21 | 14 | ||
22 | /* | 15 | /* |
diff --git a/include/asm-mips/i8259.h b/include/asm-mips/i8259.h index e88a01607fea..8572a2d90484 100644 --- a/include/asm-mips/i8259.h +++ b/include/asm-mips/i8259.h | |||
@@ -37,9 +37,8 @@ | |||
37 | 37 | ||
38 | extern spinlock_t i8259A_lock; | 38 | extern spinlock_t i8259A_lock; |
39 | 39 | ||
40 | extern void init_8259A(int auto_eoi); | 40 | extern int i8259A_irq_pending(unsigned int irq); |
41 | extern void enable_8259A_irq(unsigned int irq); | 41 | extern void make_8259A_irq(unsigned int irq); |
42 | extern void disable_8259A_irq(unsigned int irq); | ||
43 | 42 | ||
44 | extern void init_i8259_irqs(void); | 43 | extern void init_i8259_irqs(void); |
45 | 44 | ||