aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/devboards
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@googlemail.com>2009-10-04 08:55:26 -0400
committerRalf Baechle <ralf@linux-mips.org>2010-02-27 06:52:50 -0500
commit7e50b2b741bb4f9dbddc9f56972ef82a7d4b33ed (patch)
tree3302cb551b83f715827e967e3f8fd7188d952b91 /arch/mips/alchemy/devboards
parent95a437966dba642870a93d16bf82af8926bb2082 (diff)
MIPS: Alchemy: remove board_init_irq() function.
remove board_init_irq(): On all in-kernel boards it is sufficient to initialize board interrupts in an arch_initcall by using the default linux irq functions. Some small irqmap.c files have been folded into board_setup files. Run-tested on DB1200; compile-tested on all other affected boards. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy/devboards')
-rw-r--r--arch/mips/alchemy/devboards/db1x00/Makefile2
-rw-r--r--arch/mips/alchemy/devboards/db1x00/board_setup.c51
-rw-r--r--arch/mips/alchemy/devboards/db1x00/irqmap.c90
-rw-r--r--arch/mips/alchemy/devboards/pb1000/board_setup.c17
-rw-r--r--arch/mips/alchemy/devboards/pb1100/board_setup.c24
-rw-r--r--arch/mips/alchemy/devboards/pb1200/Makefile2
-rw-r--r--arch/mips/alchemy/devboards/pb1200/board_setup.c46
-rw-r--r--arch/mips/alchemy/devboards/pb1200/irqmap.c75
-rw-r--r--arch/mips/alchemy/devboards/pb1500/board_setup.c25
-rw-r--r--arch/mips/alchemy/devboards/pb1550/board_setup.c19
10 files changed, 136 insertions, 215 deletions
diff --git a/arch/mips/alchemy/devboards/db1x00/Makefile b/arch/mips/alchemy/devboards/db1x00/Makefile
index 432241ab8677..ce48d58920d0 100644
--- a/arch/mips/alchemy/devboards/db1x00/Makefile
+++ b/arch/mips/alchemy/devboards/db1x00/Makefile
@@ -5,4 +5,4 @@
5# Makefile for the Alchemy Semiconductor DBAu1xx0 boards. 5# Makefile for the Alchemy Semiconductor DBAu1xx0 boards.
6# 6#
7 7
8obj-y := board_setup.o irqmap.o 8obj-y := board_setup.o
diff --git a/arch/mips/alchemy/devboards/db1x00/board_setup.c b/arch/mips/alchemy/devboards/db1x00/board_setup.c
index e713390c69e6..9a619aeeaf60 100644
--- a/arch/mips/alchemy/devboards/db1x00/board_setup.c
+++ b/arch/mips/alchemy/devboards/db1x00/board_setup.c
@@ -29,6 +29,7 @@
29 29
30#include <linux/gpio.h> 30#include <linux/gpio.h>
31#include <linux/init.h> 31#include <linux/init.h>
32#include <linux/interrupt.h>
32 33
33#include <asm/mach-au1x00/au1000.h> 34#include <asm/mach-au1x00/au1000.h>
34#include <asm/mach-db1x00/db1x00.h> 35#include <asm/mach-db1x00/db1x00.h>
@@ -36,6 +37,37 @@
36 37
37#include <prom.h> 38#include <prom.h>
38 39
40#ifdef CONFIG_MIPS_DB1500
41char irq_tab_alchemy[][5] __initdata = {
42 [12] = { -1, INTA, INTX, INTX, INTX }, /* IDSEL 12 - HPT371 */
43 [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot */
44};
45#endif
46
47#ifdef CONFIG_MIPS_BOSPORUS
48char irq_tab_alchemy[][5] __initdata = {
49 [11] = { -1, INTA, INTB, INTX, INTX }, /* IDSEL 11 - miniPCI */
50 [12] = { -1, INTA, INTX, INTX, INTX }, /* IDSEL 12 - SN1741 */
51 [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot */
52};
53#endif
54
55#ifdef CONFIG_MIPS_MIRAGE
56char irq_tab_alchemy[][5] __initdata = {
57 [11] = { -1, INTD, INTX, INTX, INTX }, /* IDSEL 11 - SMI VGX */
58 [12] = { -1, INTX, INTX, INTC, INTX }, /* IDSEL 12 - PNX1300 */
59 [13] = { -1, INTA, INTB, INTX, INTX }, /* IDSEL 13 - miniPCI */
60};
61#endif
62
63#ifdef CONFIG_MIPS_DB1550
64char irq_tab_alchemy[][5] __initdata = {
65 [11] = { -1, INTC, INTX, INTX, INTX }, /* IDSEL 11 - on-board HPT371 */
66 [12] = { -1, INTB, INTC, INTD, INTA }, /* IDSEL 12 - PCI slot 2 (left) */
67 [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot 1 (right) */
68};
69#endif
70
39const char *get_system_type(void) 71const char *get_system_type(void)
40{ 72{
41#ifdef CONFIG_MIPS_BOSPORUS 73#ifdef CONFIG_MIPS_BOSPORUS
@@ -149,3 +181,22 @@ void __init board_setup(void)
149 181
150 au_sync(); 182 au_sync();
151} 183}
184
185static int __init db1x00_init_irq(void)
186{
187#if defined(CONFIG_MIPS_MIRAGE)
188 set_irq_type(AU1000_GPIO_7, IRQF_TRIGGER_RISING); /* TS pendown */
189#elif defined(CONFIG_MIPS_DB1550)
190 set_irq_type(AU1000_GPIO_3, IRQF_TRIGGER_LOW); /* CARD0# */
191 set_irq_type(AU1000_GPIO_5, IRQF_TRIGGER_LOW); /* CARD1# */
192#else
193 set_irq_type(AU1000_GPIO_0, IRQF_TRIGGER_LOW); /* CD0# */
194 set_irq_type(AU1000_GPIO_3, IRQF_TRIGGER_LOW); /* CD1# */
195 set_irq_type(AU1000_GPIO_2, IRQF_TRIGGER_LOW); /* CARD0# */
196 set_irq_type(AU1000_GPIO_5, IRQF_TRIGGER_LOW); /* CARD1# */
197 set_irq_type(AU1000_GPIO_1, IRQF_TRIGGER_LOW); /* STSCHG0# */
198 set_irq_type(AU1000_GPIO_4, IRQF_TRIGGER_LOW); /* STSCHG1# */
199#endif
200 return 0;
201}
202arch_initcall(db1x00_init_irq);
diff --git a/arch/mips/alchemy/devboards/db1x00/irqmap.c b/arch/mips/alchemy/devboards/db1x00/irqmap.c
deleted file mode 100644
index 0b09025087c6..000000000000
--- a/arch/mips/alchemy/devboards/db1x00/irqmap.c
+++ /dev/null
@@ -1,90 +0,0 @@
1/*
2 * BRIEF MODULE DESCRIPTION
3 * Au1xxx irq map table
4 *
5 * Copyright 2003 Embedded Edge, LLC
6 * dan@embeddededge.com
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#include <linux/init.h>
30#include <linux/interrupt.h>
31
32#include <asm/mach-au1x00/au1000.h>
33
34#ifdef CONFIG_MIPS_DB1500
35char irq_tab_alchemy[][5] __initdata = {
36 [12] = { -1, INTA, INTX, INTX, INTX }, /* IDSEL 12 - HPT371 */
37 [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot */
38};
39#endif
40
41#ifdef CONFIG_MIPS_BOSPORUS
42char irq_tab_alchemy[][5] __initdata = {
43 [11] = { -1, INTA, INTB, INTX, INTX }, /* IDSEL 11 - miniPCI */
44 [12] = { -1, INTA, INTX, INTX, INTX }, /* IDSEL 12 - SN1741 */
45 [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot */
46};
47#endif
48
49#ifdef CONFIG_MIPS_MIRAGE
50char irq_tab_alchemy[][5] __initdata = {
51 [11] = { -1, INTD, INTX, INTX, INTX }, /* IDSEL 11 - SMI VGX */
52 [12] = { -1, INTX, INTX, INTC, INTX }, /* IDSEL 12 - PNX1300 */
53 [13] = { -1, INTA, INTB, INTX, INTX }, /* IDSEL 13 - miniPCI */
54};
55#endif
56
57#ifdef CONFIG_MIPS_DB1550
58char irq_tab_alchemy[][5] __initdata = {
59 [11] = { -1, INTC, INTX, INTX, INTX }, /* IDSEL 11 - on-board HPT371 */
60 [12] = { -1, INTB, INTC, INTD, INTA }, /* IDSEL 12 - PCI slot 2 (left) */
61 [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot 1 (right) */
62};
63#endif
64
65
66struct au1xxx_irqmap __initdata au1xxx_irq_map[] = {
67
68#ifndef CONFIG_MIPS_MIRAGE
69#ifdef CONFIG_MIPS_DB1550
70 { AU1000_GPIO_3, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card 0 IRQ# */
71 { AU1000_GPIO_5, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card 1 IRQ# */
72#else
73 { AU1000_GPIO_0, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card 0 Fully_Interted# */
74 { AU1000_GPIO_1, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card 0 STSCHG# */
75 { AU1000_GPIO_2, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card 0 IRQ# */
76
77 { AU1000_GPIO_3, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card 1 Fully_Interted# */
78 { AU1000_GPIO_4, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card 1 STSCHG# */
79 { AU1000_GPIO_5, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card 1 IRQ# */
80#endif
81#else
82 { AU1000_GPIO_7, IRQF_TRIGGER_RISING, 0 }, /* touchscreen pen down */
83#endif
84
85};
86
87void __init board_init_irq(void)
88{
89 au1xxx_setup_irqmap(au1xxx_irq_map, ARRAY_SIZE(au1xxx_irq_map));
90}
diff --git a/arch/mips/alchemy/devboards/pb1000/board_setup.c b/arch/mips/alchemy/devboards/pb1000/board_setup.c
index cd273545e810..f1cafea18655 100644
--- a/arch/mips/alchemy/devboards/pb1000/board_setup.c
+++ b/arch/mips/alchemy/devboards/pb1000/board_setup.c
@@ -32,11 +32,6 @@
32#include <prom.h> 32#include <prom.h>
33 33
34 34
35struct au1xxx_irqmap __initdata au1xxx_irq_map[] = {
36 { AU1000_GPIO_15, IRQF_TRIGGER_LOW, 0 },
37};
38
39
40const char *get_system_type(void) 35const char *get_system_type(void)
41{ 36{
42 return "Alchemy Pb1000"; 37 return "Alchemy Pb1000";
@@ -46,11 +41,6 @@ void board_reset(void)
46{ 41{
47} 42}
48 43
49void __init board_init_irq(void)
50{
51 au1xxx_setup_irqmap(au1xxx_irq_map, ARRAY_SIZE(au1xxx_irq_map));
52}
53
54void __init board_setup(void) 44void __init board_setup(void)
55{ 45{
56 u32 pin_func, static_cfg0; 46 u32 pin_func, static_cfg0;
@@ -193,3 +183,10 @@ void __init board_setup(void)
193 break; 183 break;
194 } 184 }
195} 185}
186
187static int __init pb1000_init_irq(void)
188{
189 set_irq_type(AU1000_GPIO_15, IRQF_TRIGGER_LOW);
190 return 0;
191}
192arch_initcall(pb1000_init_irq);
diff --git a/arch/mips/alchemy/devboards/pb1100/board_setup.c b/arch/mips/alchemy/devboards/pb1100/board_setup.c
index eb749fb9daa1..aad424a5f45e 100644
--- a/arch/mips/alchemy/devboards/pb1100/board_setup.c
+++ b/arch/mips/alchemy/devboards/pb1100/board_setup.c
@@ -35,14 +35,6 @@
35#include <prom.h> 35#include <prom.h>
36 36
37 37
38struct au1xxx_irqmap __initdata au1xxx_irq_map[] = {
39 { AU1000_GPIO_9, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card Fully_Inserted# */
40 { AU1000_GPIO_10, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card STSCHG# */
41 { AU1000_GPIO_11, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card IRQ# */
42 { AU1000_GPIO_13, IRQF_TRIGGER_LOW, 0 }, /* DC_IRQ# */
43};
44
45
46const char *get_system_type(void) 38const char *get_system_type(void)
47{ 39{
48 return "Alchemy Pb1100"; 40 return "Alchemy Pb1100";
@@ -53,11 +45,6 @@ void board_reset(void)
53 bcsr_write(BCSR_SYSTEM, 0); 45 bcsr_write(BCSR_SYSTEM, 0);
54} 46}
55 47
56void __init board_init_irq(void)
57{
58 au1xxx_setup_irqmap(au1xxx_irq_map, ARRAY_SIZE(au1xxx_irq_map));
59}
60
61void __init board_setup(void) 48void __init board_setup(void)
62{ 49{
63 volatile void __iomem *base = (volatile void __iomem *)0xac000000UL; 50 volatile void __iomem *base = (volatile void __iomem *)0xac000000UL;
@@ -158,3 +145,14 @@ void __init board_setup(void)
158 au_sync(); 145 au_sync();
159 } 146 }
160} 147}
148
149static int __init pb1100_init_irq(void)
150{
151 set_irq_type(AU1000_GPIO_9, IRQF_TRIGGER_LOW); /* PCCD# */
152 set_irq_type(AU1000_GPIO_10, IRQF_TRIGGER_LOW); /* PCSTSCHG# */
153 set_irq_type(AU1000_GPIO_11, IRQF_TRIGGER_LOW); /* PCCard# */
154 set_irq_type(AU1000_GPIO_13, IRQF_TRIGGER_LOW); /* DC_IRQ# */
155
156 return 0;
157}
158arch_initcall(pb1100_init_irq);
diff --git a/arch/mips/alchemy/devboards/pb1200/Makefile b/arch/mips/alchemy/devboards/pb1200/Makefile
index c8c3a99fb68a..2ea9b02ef09f 100644
--- a/arch/mips/alchemy/devboards/pb1200/Makefile
+++ b/arch/mips/alchemy/devboards/pb1200/Makefile
@@ -2,6 +2,6 @@
2# Makefile for the Alchemy Semiconductor Pb1200/DBAu1200 boards. 2# Makefile for the Alchemy Semiconductor Pb1200/DBAu1200 boards.
3# 3#
4 4
5obj-y := board_setup.o irqmap.o platform.o 5obj-y := board_setup.o platform.o
6 6
7EXTRA_CFLAGS += -Werror 7EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/alchemy/devboards/pb1200/board_setup.c b/arch/mips/alchemy/devboards/pb1200/board_setup.c
index db563800c31d..675357a7976e 100644
--- a/arch/mips/alchemy/devboards/pb1200/board_setup.c
+++ b/arch/mips/alchemy/devboards/pb1200/board_setup.c
@@ -25,13 +25,23 @@
25 */ 25 */
26 26
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/interrupt.h>
28#include <linux/sched.h> 29#include <linux/sched.h>
29 30
31#include <asm/mach-au1x00/au1000.h>
30#include <asm/mach-db1x00/bcsr.h> 32#include <asm/mach-db1x00/bcsr.h>
31 33
32#include <prom.h> 34#ifdef CONFIG_MIPS_PB1200
33#include <au1xxx.h> 35#include <asm/mach-pb1x00/pb1200.h>
36#endif
34 37
38#ifdef CONFIG_MIPS_DB1200
39#include <asm/mach-db1x00/db1200.h>
40#define PB1200_INT_BEGIN DB1200_INT_BEGIN
41#define PB1200_INT_END DB1200_INT_END
42#endif
43
44#include <prom.h>
35 45
36const char *get_system_type(void) 46const char *get_system_type(void)
37{ 47{
@@ -137,6 +147,38 @@ void __init board_setup(void)
137 au_sync(); 147 au_sync();
138} 148}
139 149
150static int __init pb1200_init_irq(void)
151{
152#ifdef CONFIG_MIPS_PB1200
153 /* We have a problem with CPLD rev 3. */
154 if (BCSR_WHOAMI_CPLD(bcsr_read(BCSR_WHOAMI)) <= 3) {
155 printk(KERN_ERR "WARNING!!!\n");
156 printk(KERN_ERR "WARNING!!!\n");
157 printk(KERN_ERR "WARNING!!!\n");
158 printk(KERN_ERR "WARNING!!!\n");
159 printk(KERN_ERR "WARNING!!!\n");
160 printk(KERN_ERR "WARNING!!!\n");
161 printk(KERN_ERR "Pb1200 must be at CPLD rev 4. Please have Pb1200\n");
162 printk(KERN_ERR "updated to latest revision. This software will\n");
163 printk(KERN_ERR "not work on anything less than CPLD rev 4.\n");
164 printk(KERN_ERR "WARNING!!!\n");
165 printk(KERN_ERR "WARNING!!!\n");
166 printk(KERN_ERR "WARNING!!!\n");
167 printk(KERN_ERR "WARNING!!!\n");
168 printk(KERN_ERR "WARNING!!!\n");
169 printk(KERN_ERR "WARNING!!!\n");
170 panic("Game over. Your score is 0.");
171 }
172#endif
173
174 set_irq_type(AU1000_GPIO_7, IRQF_TRIGGER_LOW);
175 bcsr_init_irq(PB1200_INT_BEGIN, PB1200_INT_END, AU1000_GPIO_7);
176
177 return 0;
178}
179arch_initcall(pb1200_init_irq);
180
181
140int board_au1200fb_panel(void) 182int board_au1200fb_panel(void)
141{ 183{
142 return (bcsr_read(BCSR_SWITCHES) >> 8) & 0x0f; 184 return (bcsr_read(BCSR_SWITCHES) >> 8) & 0x0f;
diff --git a/arch/mips/alchemy/devboards/pb1200/irqmap.c b/arch/mips/alchemy/devboards/pb1200/irqmap.c
deleted file mode 100644
index 3beb8046667b..000000000000
--- a/arch/mips/alchemy/devboards/pb1200/irqmap.c
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * BRIEF MODULE DESCRIPTION
3 * Au1xxx irq map table
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
11 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
13 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
14 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
16 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
17 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
19 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20 *
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26#include <linux/init.h>
27#include <linux/interrupt.h>
28
29#include <asm/mach-au1x00/au1000.h>
30
31#ifdef CONFIG_MIPS_PB1200
32#include <asm/mach-pb1x00/pb1200.h>
33#endif
34
35#ifdef CONFIG_MIPS_DB1200
36#include <asm/mach-db1x00/db1200.h>
37#define PB1200_INT_BEGIN DB1200_INT_BEGIN
38#define PB1200_INT_END DB1200_INT_END
39#endif
40
41#include <asm/mach-db1x00/bcsr.h>
42
43struct au1xxx_irqmap __initdata au1xxx_irq_map[] = {
44 /* This is external interrupt cascade */
45 { AU1000_GPIO_7, IRQF_TRIGGER_LOW, 0 },
46};
47
48void __init board_init_irq(void)
49{
50 au1xxx_setup_irqmap(au1xxx_irq_map, ARRAY_SIZE(au1xxx_irq_map));
51
52#ifdef CONFIG_MIPS_PB1200
53 /* We have a problem with CPLD rev 3. */
54 if (BCSR_WHOAMI_CPLD(bcsr_read(BCSR_WHOAMI)) <= 3) {
55 printk(KERN_ERR "WARNING!!!\n");
56 printk(KERN_ERR "WARNING!!!\n");
57 printk(KERN_ERR "WARNING!!!\n");
58 printk(KERN_ERR "WARNING!!!\n");
59 printk(KERN_ERR "WARNING!!!\n");
60 printk(KERN_ERR "WARNING!!!\n");
61 printk(KERN_ERR "Pb1200 must be at CPLD rev 4. Please have Pb1200\n");
62 printk(KERN_ERR "updated to latest revision. This software will\n");
63 printk(KERN_ERR "not work on anything less than CPLD rev 4.\n");
64 printk(KERN_ERR "WARNING!!!\n");
65 printk(KERN_ERR "WARNING!!!\n");
66 printk(KERN_ERR "WARNING!!!\n");
67 printk(KERN_ERR "WARNING!!!\n");
68 printk(KERN_ERR "WARNING!!!\n");
69 printk(KERN_ERR "WARNING!!!\n");
70 panic("Game over. Your score is 0.");
71 }
72#endif
73
74 bcsr_init_irq(PB1200_INT_BEGIN, PB1200_INT_END, AU1000_GPIO_7);
75}
diff --git a/arch/mips/alchemy/devboards/pb1500/board_setup.c b/arch/mips/alchemy/devboards/pb1500/board_setup.c
index c5389e5afb93..bf8e14906ea4 100644
--- a/arch/mips/alchemy/devboards/pb1500/board_setup.c
+++ b/arch/mips/alchemy/devboards/pb1500/board_setup.c
@@ -40,14 +40,6 @@ char irq_tab_alchemy[][5] __initdata = {
40 [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot */ 40 [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot */
41}; 41};
42 42
43struct au1xxx_irqmap __initdata au1xxx_irq_map[] = {
44 { AU1500_GPIO_204, IRQF_TRIGGER_HIGH, 0 },
45 { AU1500_GPIO_201, IRQF_TRIGGER_LOW, 0 },
46 { AU1500_GPIO_202, IRQF_TRIGGER_LOW, 0 },
47 { AU1500_GPIO_203, IRQF_TRIGGER_LOW, 0 },
48 { AU1500_GPIO_205, IRQF_TRIGGER_LOW, 0 },
49};
50
51 43
52const char *get_system_type(void) 44const char *get_system_type(void)
53{ 45{
@@ -59,11 +51,6 @@ void board_reset(void)
59 bcsr_write(BCSR_SYSTEM, 0); 51 bcsr_write(BCSR_SYSTEM, 0);
60} 52}
61 53
62void __init board_init_irq(void)
63{
64 au1xxx_setup_irqmap(au1xxx_irq_map, ARRAY_SIZE(au1xxx_irq_map));
65}
66
67void __init board_setup(void) 54void __init board_setup(void)
68{ 55{
69 u32 pin_func; 56 u32 pin_func;
@@ -166,3 +153,15 @@ void __init board_setup(void)
166 au_sync(); 153 au_sync();
167 } 154 }
168} 155}
156
157static int __init pb1500_init_irq(void)
158{
159 set_irq_type(AU1500_GPIO_204, IRQF_TRIGGER_HIGH);
160 set_irq_type(AU1500_GPIO_201, IRQF_TRIGGER_LOW);
161 set_irq_type(AU1500_GPIO_202, IRQF_TRIGGER_LOW);
162 set_irq_type(AU1500_GPIO_203, IRQF_TRIGGER_LOW);
163 set_irq_type(AU1500_GPIO_205, IRQF_TRIGGER_LOW);
164
165 return 0;
166}
167arch_initcall(pb1500_init_irq);
diff --git a/arch/mips/alchemy/devboards/pb1550/board_setup.c b/arch/mips/alchemy/devboards/pb1550/board_setup.c
index af7a1b5fe7c7..64f1ff9e0131 100644
--- a/arch/mips/alchemy/devboards/pb1550/board_setup.c
+++ b/arch/mips/alchemy/devboards/pb1550/board_setup.c
@@ -42,11 +42,6 @@ char irq_tab_alchemy[][5] __initdata = {
42 [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot 1 (right) */ 42 [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot 1 (right) */
43}; 43};
44 44
45struct au1xxx_irqmap __initdata au1xxx_irq_map[] = {
46 { AU1000_GPIO_0, IRQF_TRIGGER_LOW, 0 },
47 { AU1000_GPIO_1, IRQF_TRIGGER_LOW, 0 },
48};
49
50const char *get_system_type(void) 45const char *get_system_type(void)
51{ 46{
52 return "Alchemy Pb1550"; 47 return "Alchemy Pb1550";
@@ -57,11 +52,6 @@ void board_reset(void)
57 bcsr_write(BCSR_SYSTEM, 0); 52 bcsr_write(BCSR_SYSTEM, 0);
58} 53}
59 54
60void __init board_init_irq(void)
61{
62 au1xxx_setup_irqmap(au1xxx_irq_map, ARRAY_SIZE(au1xxx_irq_map));
63}
64
65void __init board_setup(void) 55void __init board_setup(void)
66{ 56{
67 u32 pin_func; 57 u32 pin_func;
@@ -93,3 +83,12 @@ void __init board_setup(void)
93 83
94 printk(KERN_INFO "AMD Alchemy Pb1550 Board\n"); 84 printk(KERN_INFO "AMD Alchemy Pb1550 Board\n");
95} 85}
86
87static int __init pb1550_init_irq(void)
88{
89 set_irq_type(AU1000_GPIO_0, IRQF_TRIGGER_LOW);
90 set_irq_type(AU1000_GPIO_1, IRQF_TRIGGER_LOW);
91
92 return 0;
93}
94arch_initcall(pb1550_init_irq);