diff options
Diffstat (limited to 'arch/sh/boards/mach-cayman')
-rw-r--r-- | arch/sh/boards/mach-cayman/Makefile | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-cayman/irq.c | 35 | ||||
-rw-r--r-- | arch/sh/boards/mach-cayman/led.c | 51 |
3 files changed, 8 insertions, 79 deletions
diff --git a/arch/sh/boards/mach-cayman/Makefile b/arch/sh/boards/mach-cayman/Makefile index 489a8f867368..cafe1ac3b29c 100644 --- a/arch/sh/boards/mach-cayman/Makefile +++ b/arch/sh/boards/mach-cayman/Makefile | |||
@@ -2,4 +2,3 @@ | |||
2 | # Makefile for the Hitachi Cayman specific parts of the kernel | 2 | # Makefile for the Hitachi Cayman specific parts of the kernel |
3 | # | 3 | # |
4 | obj-y := setup.o irq.o | 4 | obj-y := setup.o irq.o |
5 | obj-$(CONFIG_HEARTBEAT) += led.o | ||
diff --git a/arch/sh/boards/mach-cayman/irq.c b/arch/sh/boards/mach-cayman/irq.c index ceb37ae92c70..da62ad516994 100644 --- a/arch/sh/boards/mach-cayman/irq.c +++ b/arch/sh/boards/mach-cayman/irq.c | |||
@@ -94,31 +94,11 @@ static void ack_cayman_irq(unsigned int irq) | |||
94 | disable_cayman_irq(irq); | 94 | disable_cayman_irq(irq); |
95 | } | 95 | } |
96 | 96 | ||
97 | static void end_cayman_irq(unsigned int irq) | 97 | struct irq_chip cayman_irq_type = { |
98 | { | 98 | .name = "Cayman-IRQ", |
99 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | 99 | .unmask = enable_cayman_irq, |
100 | enable_cayman_irq(irq); | 100 | .mask = disable_cayman_irq, |
101 | } | 101 | .mask_ack = ack_cayman_irq, |
102 | |||
103 | static unsigned int startup_cayman_irq(unsigned int irq) | ||
104 | { | ||
105 | enable_cayman_irq(irq); | ||
106 | return 0; /* never anything pending */ | ||
107 | } | ||
108 | |||
109 | static void shutdown_cayman_irq(unsigned int irq) | ||
110 | { | ||
111 | disable_cayman_irq(irq); | ||
112 | } | ||
113 | |||
114 | struct hw_interrupt_type cayman_irq_type = { | ||
115 | .typename = "Cayman-IRQ", | ||
116 | .startup = startup_cayman_irq, | ||
117 | .shutdown = shutdown_cayman_irq, | ||
118 | .enable = enable_cayman_irq, | ||
119 | .disable = disable_cayman_irq, | ||
120 | .ack = ack_cayman_irq, | ||
121 | .end = end_cayman_irq, | ||
122 | }; | 102 | }; |
123 | 103 | ||
124 | int cayman_irq_demux(int evt) | 104 | int cayman_irq_demux(int evt) |
@@ -187,8 +167,9 @@ void init_cayman_irq(void) | |||
187 | return; | 167 | return; |
188 | } | 168 | } |
189 | 169 | ||
190 | for (i=0; i<NR_EXT_IRQS; i++) { | 170 | for (i = 0; i < NR_EXT_IRQS; i++) { |
191 | irq_desc[START_EXT_IRQS + i].chip = &cayman_irq_type; | 171 | set_irq_chip_and_handler(START_EXT_IRQS + i, &cayman_irq_type, |
172 | handle_level_irq); | ||
192 | } | 173 | } |
193 | 174 | ||
194 | /* Setup the SMSC interrupt */ | 175 | /* Setup the SMSC interrupt */ |
diff --git a/arch/sh/boards/mach-cayman/led.c b/arch/sh/boards/mach-cayman/led.c deleted file mode 100644 index a808eac4ecd6..000000000000 --- a/arch/sh/boards/mach-cayman/led.c +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * arch/sh/boards/cayman/led.c | ||
3 | * | ||
4 | * Copyright (C) 2002 Stuart Menefy <stuart.menefy@st.com> | ||
5 | * | ||
6 | * May be copied or modified under the terms of the GNU General Public | ||
7 | * License. See linux/COPYING for more information. | ||
8 | * | ||
9 | * Flash the LEDs | ||
10 | */ | ||
11 | #include <asm/io.h> | ||
12 | |||
13 | /* | ||
14 | ** It is supposed these functions to be used for a low level | ||
15 | ** debugging (via Cayman LEDs), hence to be available as soon | ||
16 | ** as possible. | ||
17 | ** Unfortunately Cayman LEDs relies on Cayman EPLD to be mapped | ||
18 | ** (this happen when IRQ are initialized... quite late). | ||
19 | ** These triky dependencies should be removed. Temporary, it | ||
20 | ** may be enough to NOP until EPLD is mapped. | ||
21 | */ | ||
22 | |||
23 | extern unsigned long epld_virt; | ||
24 | |||
25 | #define LED_ADDR (epld_virt + 0x008) | ||
26 | #define HDSP2534_ADDR (epld_virt + 0x100) | ||
27 | |||
28 | void mach_led(int position, int value) | ||
29 | { | ||
30 | if (!epld_virt) | ||
31 | return; | ||
32 | |||
33 | if (value) | ||
34 | ctrl_outl(0, LED_ADDR); | ||
35 | else | ||
36 | ctrl_outl(1, LED_ADDR); | ||
37 | |||
38 | } | ||
39 | |||
40 | void mach_alphanum(int position, unsigned char value) | ||
41 | { | ||
42 | if (!epld_virt) | ||
43 | return; | ||
44 | |||
45 | ctrl_outb(value, HDSP2534_ADDR + 0xe0 + (position << 2)); | ||
46 | } | ||
47 | |||
48 | void mach_alphanum_brightness(int setting) | ||
49 | { | ||
50 | ctrl_outb(setting & 7, HDSP2534_ADDR + 0xc0); | ||
51 | } | ||