diff options
author | Kevin Cernekee <cernekee@gmail.com> | 2014-11-25 19:49:49 -0500 |
---|---|---|
committer | Florian Fainelli <f.fainelli@gmail.com> | 2014-11-28 18:44:42 -0500 |
commit | dd1d78a11aecd68f5c688c3259c48b8ea4130aaa (patch) | |
tree | bfe3cbf47145c0e7bacffe8e3fb0dc4d89e6546c | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) |
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: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
-rw-r--r-- | drivers/bus/Kconfig | 2 | ||||
-rw-r--r-- | drivers/bus/brcmstb_gisb.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig index 603eb1be4f6a..b99729e36860 100644 --- a/drivers/bus/Kconfig +++ b/drivers/bus/Kconfig | |||
@@ -6,7 +6,7 @@ menu "Bus devices" | |||
6 | 6 | ||
7 | config BRCMSTB_GISB_ARB | 7 | config BRCMSTB_GISB_ARB |
8 | bool "Broadcom STB GISB bus arbiter" | 8 | bool "Broadcom STB GISB bus arbiter" |
9 | depends on ARM | 9 | depends on ARM || MIPS |
10 | help | 10 | help |
11 | Driver for the Broadcom Set Top Box System-on-a-chip internal bus | 11 | Driver for the Broadcom Set Top Box System-on-a-chip internal bus |
12 | arbiter. This driver provides timeout and target abort error handling | 12 | arbiter. This driver provides timeout and target abort error handling |
diff --git a/drivers/bus/brcmstb_gisb.c b/drivers/bus/brcmstb_gisb.c index f2cd6a2d40b4..5da935ad8d8b 100644 --- a/drivers/bus/brcmstb_gisb.c +++ b/drivers/bus/brcmstb_gisb.c | |||
@@ -24,8 +24,10 @@ | |||
24 | #include <linux/of.h> | 24 | #include <linux/of.h> |
25 | #include <linux/bitops.h> | 25 | #include <linux/bitops.h> |
26 | 26 | ||
27 | #ifdef CONFIG_ARM | ||
27 | #include <asm/bug.h> | 28 | #include <asm/bug.h> |
28 | #include <asm/signal.h> | 29 | #include <asm/signal.h> |
30 | #endif | ||
29 | 31 | ||
30 | #define ARB_TIMER 0x008 | 32 | #define ARB_TIMER 0x008 |
31 | #define ARB_ERR_CAP_CLR 0x7e4 | 33 | #define ARB_ERR_CAP_CLR 0x7e4 |
@@ -141,6 +143,7 @@ static int brcmstb_gisb_arb_decode_addr(struct brcmstb_gisb_arb_device *gdev, | |||
141 | return 0; | 143 | return 0; |
142 | } | 144 | } |
143 | 145 | ||
146 | #ifdef CONFIG_ARM | ||
144 | static int brcmstb_bus_error_handler(unsigned long addr, unsigned int fsr, | 147 | static int brcmstb_bus_error_handler(unsigned long addr, unsigned int fsr, |
145 | struct pt_regs *regs) | 148 | struct pt_regs *regs) |
146 | { | 149 | { |
@@ -165,6 +168,7 @@ void __init brcmstb_hook_fault_code(void) | |||
165 | hook_fault_code(22, brcmstb_bus_error_handler, SIGBUS, 0, | 168 | hook_fault_code(22, brcmstb_bus_error_handler, SIGBUS, 0, |
166 | "imprecise external abort"); | 169 | "imprecise external abort"); |
167 | } | 170 | } |
171 | #endif | ||
168 | 172 | ||
169 | static irqreturn_t brcmstb_gisb_timeout_handler(int irq, void *dev_id) | 173 | static irqreturn_t brcmstb_gisb_timeout_handler(int irq, void *dev_id) |
170 | { | 174 | { |