Commit ce8e7411 authored by Atsushi Nemoto's avatar Atsushi Nemoto Committed by Ralf Baechle

MIPS: TXx9: Add board_be_init for TX4927/TX4938

Setup default board_be_handler for TX4927/TX4938.
Signed-off-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 496a3b5c
...@@ -14,8 +14,10 @@ ...@@ -14,8 +14,10 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/param.h> #include <linux/param.h>
#include <linux/ptrace.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <asm/reboot.h> #include <asm/reboot.h>
#include <asm/traps.h>
#include <asm/txx9irq.h> #include <asm/txx9irq.h>
#include <asm/txx9tmr.h> #include <asm/txx9tmr.h>
#include <asm/txx9pio.h> #include <asm/txx9pio.h>
...@@ -60,6 +62,26 @@ static void tx4927_machine_restart(char *command) ...@@ -60,6 +62,26 @@ static void tx4927_machine_restart(char *command)
(*_machine_halt)(); (*_machine_halt)();
} }
void show_registers(struct pt_regs *regs);
static int tx4927_be_handler(struct pt_regs *regs, int is_fixup)
{
int data = regs->cp0_cause & 4;
console_verbose();
pr_err("%cBE exception at %#lx\n", data ? 'D' : 'I', regs->cp0_epc);
pr_err("ccfg:%llx, toea:%llx\n",
(unsigned long long)____raw_readq(&tx4927_ccfgptr->ccfg),
(unsigned long long)____raw_readq(&tx4927_ccfgptr->toea));
#ifdef CONFIG_PCI
tx4927_report_pcic_status();
#endif
show_registers(regs);
panic("BusError!");
}
static void __init tx4927_be_init(void)
{
board_be_handler = tx4927_be_handler;
}
static struct resource tx4927_sdram_resource[4]; static struct resource tx4927_sdram_resource[4];
void __init tx4927_setup(void) void __init tx4927_setup(void)
...@@ -197,6 +219,7 @@ void __init tx4927_setup(void) ...@@ -197,6 +219,7 @@ void __init tx4927_setup(void)
__raw_writel(0, &tx4927_pioptr->maskext); __raw_writel(0, &tx4927_pioptr->maskext);
_machine_restart = tx4927_machine_restart; _machine_restart = tx4927_machine_restart;
board_be_init = tx4927_be_init;
} }
void __init tx4927_time_init(unsigned int tmrnr) void __init tx4927_time_init(unsigned int tmrnr)
......
...@@ -14,8 +14,10 @@ ...@@ -14,8 +14,10 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/param.h> #include <linux/param.h>
#include <linux/ptrace.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <asm/reboot.h> #include <asm/reboot.h>
#include <asm/traps.h>
#include <asm/txx9irq.h> #include <asm/txx9irq.h>
#include <asm/txx9tmr.h> #include <asm/txx9tmr.h>
#include <asm/txx9pio.h> #include <asm/txx9pio.h>
...@@ -60,6 +62,26 @@ static void tx4938_machine_restart(char *command) ...@@ -60,6 +62,26 @@ static void tx4938_machine_restart(char *command)
(*_machine_halt)(); (*_machine_halt)();
} }
void show_registers(struct pt_regs *regs);
static int tx4938_be_handler(struct pt_regs *regs, int is_fixup)
{
int data = regs->cp0_cause & 4;
console_verbose();
pr_err("%cBE exception at %#lx\n", data ? 'D' : 'I', regs->cp0_epc);
pr_err("ccfg:%llx, toea:%llx\n",
(unsigned long long)____raw_readq(&tx4938_ccfgptr->ccfg),
(unsigned long long)____raw_readq(&tx4938_ccfgptr->toea));
#ifdef CONFIG_PCI
tx4927_report_pcic_status();
#endif
show_registers(regs);
panic("BusError!");
}
static void __init tx4938_be_init(void)
{
board_be_handler = tx4938_be_handler;
}
static struct resource tx4938_sdram_resource[4]; static struct resource tx4938_sdram_resource[4];
static struct resource tx4938_sram_resource; static struct resource tx4938_sram_resource;
...@@ -257,6 +279,7 @@ void __init tx4938_setup(void) ...@@ -257,6 +279,7 @@ void __init tx4938_setup(void)
} }
_machine_restart = tx4938_machine_restart; _machine_restart = tx4938_machine_restart;
board_be_init = tx4938_be_init;
} }
void __init tx4938_time_init(unsigned int tmrnr) void __init tx4938_time_init(unsigned int tmrnr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment