Commit dd1d78a1 authored by Kevin Cernekee's avatar Kevin Cernekee Committed by Florian Fainelli

bus: brcmstb_gisb: Make the driver buildable on MIPS

BCM7xxx ARM and MIPS platforms share a similar hardware block for
reporting GISB errors, so they both benefit from the use of this driver.
Conditionally compile the ARM-specific bus error handler so that the
GISB error IRQ handler works on other architectures.
Signed-off-by: default avatarKevin Cernekee <cernekee@gmail.com>
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
parent f114040e
...@@ -6,7 +6,7 @@ menu "Bus devices" ...@@ -6,7 +6,7 @@ menu "Bus devices"
config BRCMSTB_GISB_ARB config BRCMSTB_GISB_ARB
bool "Broadcom STB GISB bus arbiter" bool "Broadcom STB GISB bus arbiter"
depends on ARM depends on ARM || MIPS
help help
Driver for the Broadcom Set Top Box System-on-a-chip internal bus Driver for the Broadcom Set Top Box System-on-a-chip internal bus
arbiter. This driver provides timeout and target abort error handling arbiter. This driver provides timeout and target abort error handling
......
...@@ -24,8 +24,10 @@ ...@@ -24,8 +24,10 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#ifdef CONFIG_ARM
#include <asm/bug.h> #include <asm/bug.h>
#include <asm/signal.h> #include <asm/signal.h>
#endif
#define ARB_TIMER 0x008 #define ARB_TIMER 0x008
#define ARB_ERR_CAP_CLR 0x7e4 #define ARB_ERR_CAP_CLR 0x7e4
...@@ -141,6 +143,7 @@ static int brcmstb_gisb_arb_decode_addr(struct brcmstb_gisb_arb_device *gdev, ...@@ -141,6 +143,7 @@ static int brcmstb_gisb_arb_decode_addr(struct brcmstb_gisb_arb_device *gdev,
return 0; return 0;
} }
#ifdef CONFIG_ARM
static int brcmstb_bus_error_handler(unsigned long addr, unsigned int fsr, static int brcmstb_bus_error_handler(unsigned long addr, unsigned int fsr,
struct pt_regs *regs) struct pt_regs *regs)
{ {
...@@ -165,6 +168,7 @@ void __init brcmstb_hook_fault_code(void) ...@@ -165,6 +168,7 @@ void __init brcmstb_hook_fault_code(void)
hook_fault_code(22, brcmstb_bus_error_handler, SIGBUS, 0, hook_fault_code(22, brcmstb_bus_error_handler, SIGBUS, 0,
"imprecise external abort"); "imprecise external abort");
} }
#endif
static irqreturn_t brcmstb_gisb_timeout_handler(int irq, void *dev_id) static irqreturn_t brcmstb_gisb_timeout_handler(int irq, void *dev_id)
{ {
......
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