diff options
Diffstat (limited to 'arch/h8300/platform/h8300h/ints_h8300h.c')
-rw-r--r-- | arch/h8300/platform/h8300h/ints_h8300h.c | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/arch/h8300/platform/h8300h/ints_h8300h.c b/arch/h8300/platform/h8300h/ints_h8300h.c deleted file mode 100644 index f1777119b871..000000000000 --- a/arch/h8300/platform/h8300h/ints_h8300h.c +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/h8300/platform/h8300h/ints_h8300h.c | ||
3 | * Interrupt handling CPU variants | ||
4 | * | ||
5 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
6 | * | ||
7 | */ | ||
8 | |||
9 | #include <linux/init.h> | ||
10 | #include <linux/errno.h> | ||
11 | |||
12 | #include <asm/ptrace.h> | ||
13 | #include <asm/traps.h> | ||
14 | #include <asm/irq.h> | ||
15 | #include <asm/io.h> | ||
16 | #include <asm/gpio.h> | ||
17 | #include <asm/regs306x.h> | ||
18 | |||
19 | /* saved vector list */ | ||
20 | const int __initdata h8300_saved_vectors[]={ | ||
21 | #if defined(CONFIG_GDB_DEBUG) | ||
22 | TRAP3_VEC, | ||
23 | #endif | ||
24 | -1 | ||
25 | }; | ||
26 | |||
27 | /* trap entry table */ | ||
28 | const unsigned long __initdata h8300_trap_table[NR_TRAPS]={ | ||
29 | 0,0,0,0,0,0,0,0, | ||
30 | (unsigned long)system_call, /* TRAPA #0 */ | ||
31 | 0,0, | ||
32 | (unsigned long)trace_break, /* TRAPA #3 */ | ||
33 | }; | ||
34 | |||
35 | int h8300_enable_irq_pin(unsigned int irq) | ||
36 | { | ||
37 | int bitmask; | ||
38 | if (irq < EXT_IRQ0 || irq > EXT_IRQ5) | ||
39 | return 0; | ||
40 | |||
41 | /* initialize IRQ pin */ | ||
42 | bitmask = 1 << (irq - EXT_IRQ0); | ||
43 | switch(irq) { | ||
44 | case EXT_IRQ0: | ||
45 | case EXT_IRQ1: | ||
46 | case EXT_IRQ2: | ||
47 | case EXT_IRQ3: | ||
48 | if (H8300_GPIO_RESERVE(H8300_GPIO_P8, bitmask) == 0) | ||
49 | return -EBUSY; | ||
50 | H8300_GPIO_DDR(H8300_GPIO_P8, bitmask, H8300_GPIO_INPUT); | ||
51 | break; | ||
52 | case EXT_IRQ4: | ||
53 | case EXT_IRQ5: | ||
54 | if (H8300_GPIO_RESERVE(H8300_GPIO_P9, bitmask) == 0) | ||
55 | return -EBUSY; | ||
56 | H8300_GPIO_DDR(H8300_GPIO_P9, bitmask, H8300_GPIO_INPUT); | ||
57 | break; | ||
58 | } | ||
59 | |||
60 | return 0; | ||
61 | } | ||
62 | |||
63 | void h8300_disable_irq_pin(unsigned int irq) | ||
64 | { | ||
65 | int bitmask; | ||
66 | if (irq < EXT_IRQ0 || irq > EXT_IRQ5) | ||
67 | return; | ||
68 | |||
69 | /* disable interrupt & release IRQ pin */ | ||
70 | bitmask = 1 << (irq - EXT_IRQ0); | ||
71 | switch(irq) { | ||
72 | case EXT_IRQ0: | ||
73 | case EXT_IRQ1: | ||
74 | case EXT_IRQ2: | ||
75 | case EXT_IRQ3: | ||
76 | *(volatile unsigned char *)IER &= ~bitmask; | ||
77 | H8300_GPIO_FREE(H8300_GPIO_P8, bitmask); | ||
78 | break ; | ||
79 | case EXT_IRQ4: | ||
80 | case EXT_IRQ5: | ||
81 | *(volatile unsigned char *)IER &= ~bitmask; | ||
82 | H8300_GPIO_FREE(H8300_GPIO_P9, bitmask); | ||
83 | break; | ||
84 | } | ||
85 | } | ||