mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
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>
This commit is contained in:
parent
496a3b5c2c
commit
ce8e74112b
@ -14,8 +14,10 @@
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/param.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <asm/reboot.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/txx9irq.h>
|
||||
#include <asm/txx9tmr.h>
|
||||
#include <asm/txx9pio.h>
|
||||
@ -60,6 +62,26 @@ static void tx4927_machine_restart(char *command)
|
||||
(*_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];
|
||||
|
||||
void __init tx4927_setup(void)
|
||||
@ -197,6 +219,7 @@ void __init tx4927_setup(void)
|
||||
__raw_writel(0, &tx4927_pioptr->maskext);
|
||||
|
||||
_machine_restart = tx4927_machine_restart;
|
||||
board_be_init = tx4927_be_init;
|
||||
}
|
||||
|
||||
void __init tx4927_time_init(unsigned int tmrnr)
|
||||
|
@ -14,8 +14,10 @@
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/param.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <asm/reboot.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/txx9irq.h>
|
||||
#include <asm/txx9tmr.h>
|
||||
#include <asm/txx9pio.h>
|
||||
@ -60,6 +62,26 @@ static void tx4938_machine_restart(char *command)
|
||||
(*_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_sram_resource;
|
||||
|
||||
@ -257,6 +279,7 @@ void __init tx4938_setup(void)
|
||||
}
|
||||
|
||||
_machine_restart = tx4938_machine_restart;
|
||||
board_be_init = tx4938_be_init;
|
||||
}
|
||||
|
||||
void __init tx4938_time_init(unsigned int tmrnr)
|
||||
|
Loading…
Reference in New Issue
Block a user