aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/devboards/pb1200/board_setup.c
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/pb1200/board_setup.c
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/pb1200/board_setup.c')
-rw-r--r--arch/mips/alchemy/devboards/pb1200/board_setup.c46
1 files changed, 44 insertions, 2 deletions
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;