]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
bus: brcmstb_gisb: Make the driver buildable on MIPS
authorKevin Cernekee <cernekee@gmail.com>
Wed, 26 Nov 2014 00:49:49 +0000 (16:49 -0800)
committerFlorian Fainelli <f.fainelli@gmail.com>
Fri, 28 Nov 2014 23:44:42 +0000 (15:44 -0800)
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>
drivers/bus/Kconfig
drivers/bus/brcmstb_gisb.c

index 603eb1be4f6aa6bc79e0d3b9aeb31d92356018ff..b99729e368608bda800d03f2e2f339d86f2e4d6c 100644 (file)
@@ -6,7 +6,7 @@ menu "Bus devices"
 
 config BRCMSTB_GISB_ARB
        bool "Broadcom STB GISB bus arbiter"
-       depends on ARM
+       depends on ARM || MIPS
        help
          Driver for the Broadcom Set Top Box System-on-a-chip internal bus
          arbiter. This driver provides timeout and target abort error handling
index f2cd6a2d40b4e5fa1c40b7d1da99d204fafb080d..5da935ad8d8b10cf0b08752585fd4d255d966de1 100644 (file)
 #include <linux/of.h>
 #include <linux/bitops.h>
 
+#ifdef CONFIG_ARM
 #include <asm/bug.h>
 #include <asm/signal.h>
+#endif
 
 #define ARB_TIMER                      0x008
 #define ARB_ERR_CAP_CLR                        0x7e4
@@ -141,6 +143,7 @@ static int brcmstb_gisb_arb_decode_addr(struct brcmstb_gisb_arb_device *gdev,
        return 0;
 }
 
+#ifdef CONFIG_ARM
 static int brcmstb_bus_error_handler(unsigned long addr, unsigned int fsr,
                                     struct pt_regs *regs)
 {
@@ -165,6 +168,7 @@ void __init brcmstb_hook_fault_code(void)
        hook_fault_code(22, brcmstb_bus_error_handler, SIGBUS, 0,
                        "imprecise external abort");
 }
+#endif
 
 static irqreturn_t brcmstb_gisb_timeout_handler(int irq, void *dev_id)
 {