[MIPS] TXx9: PCI error handling
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Date: Thu, 24 Jul 2008 00:25:16 +0900 Subject: [PATCH] txx9: PCI error handling Add more control and detailed report on PCI error interrupt. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
committed by
Ralf Baechle
parent
0751752922
commit
455cc256eb
@@ -37,8 +37,11 @@
|
||||
#include <linux/pci.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/txx9irq.h>
|
||||
#include <asm/txx9/pci.h>
|
||||
#include <asm/txx9/tx3927.h>
|
||||
|
||||
static int mkaddr(struct pci_bus *bus, unsigned char devfn, unsigned char where)
|
||||
@@ -194,3 +197,34 @@ void __init tx3927_pcic_setup(struct pci_controller *channel,
|
||||
PCI_COMMAND_PARITY | PCI_COMMAND_SERR;
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static irqreturn_t tx3927_pcierr_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
struct pt_regs *regs = get_irq_regs();
|
||||
|
||||
if (txx9_pci_err_action != TXX9_PCI_ERR_IGNORE) {
|
||||
printk(KERN_WARNING "PCI error interrupt at 0x%08lx.\n",
|
||||
regs->cp0_epc);
|
||||
printk(KERN_WARNING "pcistat:%02x, lbstat:%04lx\n",
|
||||
tx3927_pcicptr->pcistat, tx3927_pcicptr->lbstat);
|
||||
}
|
||||
if (txx9_pci_err_action != TXX9_PCI_ERR_PANIC) {
|
||||
/* clear all pci errors */
|
||||
tx3927_pcicptr->pcistat |= TX3927_PCIC_PCISTATIM_ALL;
|
||||
tx3927_pcicptr->istat = TX3927_PCIC_IIM_ALL;
|
||||
tx3927_pcicptr->tstat = TX3927_PCIC_TIM_ALL;
|
||||
tx3927_pcicptr->lbstat = TX3927_PCIC_LBIM_ALL;
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
console_verbose();
|
||||
panic("PCI error.");
|
||||
}
|
||||
|
||||
void __init tx3927_setup_pcierr_irq(void)
|
||||
{
|
||||
if (request_irq(TXX9_IRQ_BASE + TX3927_IR_PCI,
|
||||
tx3927_pcierr_interrupt,
|
||||
IRQF_DISABLED, "PCI error",
|
||||
(void *)TX3927_PCIC_REG))
|
||||
printk(KERN_WARNING "Failed to request irq for PCIERR\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user