aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-08-19 09:55:16 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-10-11 11:18:44 -0400
commitce8e74112b1b1215aa5bbe261ed751498ce65434 (patch)
treed776c0c773dd0c9bf020f37c5adc07d8785c501d /arch/mips/txx9
parent496a3b5c2c188e8af07261792b3d4e6cf1c1dab9 (diff)
MIPS: TXx9: Add board_be_init for TX4927/TX4938
Setup default board_be_handler for TX4927/TX4938. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/txx9')
-rw-r--r--arch/mips/txx9/generic/setup_tx4927.c23
-rw-r--r--arch/mips/txx9/generic/setup_tx4938.c23
2 files changed, 46 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup_tx4927.c b/arch/mips/txx9/generic/setup_tx4927.c
index 7189675f6a29..c4248cbbd84a 100644
--- a/arch/mips/txx9/generic/setup_tx4927.c
+++ b/arch/mips/txx9/generic/setup_tx4927.c
@@ -14,8 +14,10 @@
14#include <linux/ioport.h> 14#include <linux/ioport.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/param.h> 16#include <linux/param.h>
17#include <linux/ptrace.h>
17#include <linux/mtd/physmap.h> 18#include <linux/mtd/physmap.h>
18#include <asm/reboot.h> 19#include <asm/reboot.h>
20#include <asm/traps.h>
19#include <asm/txx9irq.h> 21#include <asm/txx9irq.h>
20#include <asm/txx9tmr.h> 22#include <asm/txx9tmr.h>
21#include <asm/txx9pio.h> 23#include <asm/txx9pio.h>
@@ -60,6 +62,26 @@ static void tx4927_machine_restart(char *command)
60 (*_machine_halt)(); 62 (*_machine_halt)();
61} 63}
62 64
65void show_registers(struct pt_regs *regs);
66static int tx4927_be_handler(struct pt_regs *regs, int is_fixup)
67{
68 int data = regs->cp0_cause & 4;
69 console_verbose();
70 pr_err("%cBE exception at %#lx\n", data ? 'D' : 'I', regs->cp0_epc);
71 pr_err("ccfg:%llx, toea:%llx\n",
72 (unsigned long long)____raw_readq(&tx4927_ccfgptr->ccfg),
73 (unsigned long long)____raw_readq(&tx4927_ccfgptr->toea));
74#ifdef CONFIG_PCI
75 tx4927_report_pcic_status();
76#endif
77 show_registers(regs);
78 panic("BusError!");
79}
80static void __init tx4927_be_init(void)
81{
82 board_be_handler = tx4927_be_handler;
83}
84
63static struct resource tx4927_sdram_resource[4]; 85static struct resource tx4927_sdram_resource[4];
64 86
65void __init tx4927_setup(void) 87void __init tx4927_setup(void)
@@ -197,6 +219,7 @@ void __init tx4927_setup(void)
197 __raw_writel(0, &tx4927_pioptr->maskext); 219 __raw_writel(0, &tx4927_pioptr->maskext);
198 220
199 _machine_restart = tx4927_machine_restart; 221 _machine_restart = tx4927_machine_restart;
222 board_be_init = tx4927_be_init;
200} 223}
201 224
202void __init tx4927_time_init(unsigned int tmrnr) 225void __init tx4927_time_init(unsigned int tmrnr)
diff --git a/arch/mips/txx9/generic/setup_tx4938.c b/arch/mips/txx9/generic/setup_tx4938.c
index 4fbc85a8597f..0d8517ad3ad0 100644
--- a/arch/mips/txx9/generic/setup_tx4938.c
+++ b/arch/mips/txx9/generic/setup_tx4938.c
@@ -14,8 +14,10 @@
14#include <linux/ioport.h> 14#include <linux/ioport.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/param.h> 16#include <linux/param.h>
17#include <linux/ptrace.h>
17#include <linux/mtd/physmap.h> 18#include <linux/mtd/physmap.h>
18#include <asm/reboot.h> 19#include <asm/reboot.h>
20#include <asm/traps.h>
19#include <asm/txx9irq.h> 21#include <asm/txx9irq.h>
20#include <asm/txx9tmr.h> 22#include <asm/txx9tmr.h>
21#include <asm/txx9pio.h> 23#include <asm/txx9pio.h>
@@ -60,6 +62,26 @@ static void tx4938_machine_restart(char *command)
60 (*_machine_halt)(); 62 (*_machine_halt)();
61} 63}
62 64
65void show_registers(struct pt_regs *regs);
66static int tx4938_be_handler(struct pt_regs *regs, int is_fixup)
67{
68 int data = regs->cp0_cause & 4;
69 console_verbose();
70 pr_err("%cBE exception at %#lx\n", data ? 'D' : 'I', regs->cp0_epc);
71 pr_err("ccfg:%llx, toea:%llx\n",
72 (unsigned long long)____raw_readq(&tx4938_ccfgptr->ccfg),
73 (unsigned long long)____raw_readq(&tx4938_ccfgptr->toea));
74#ifdef CONFIG_PCI
75 tx4927_report_pcic_status();
76#endif
77 show_registers(regs);
78 panic("BusError!");
79}
80static void __init tx4938_be_init(void)
81{
82 board_be_handler = tx4938_be_handler;
83}
84
63static struct resource tx4938_sdram_resource[4]; 85static struct resource tx4938_sdram_resource[4];
64static struct resource tx4938_sram_resource; 86static struct resource tx4938_sram_resource;
65 87
@@ -257,6 +279,7 @@ void __init tx4938_setup(void)
257 } 279 }
258 280
259 _machine_restart = tx4938_machine_restart; 281 _machine_restart = tx4938_machine_restart;
282 board_be_init = tx4938_be_init;
260} 283}
261 284
262void __init tx4938_time_init(unsigned int tmrnr) 285void __init tx4938_time_init(unsigned int tmrnr)