]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
MIPS: Sibyte: Fix bus watcher build for BCM1x55 and BCM1x80.
authorRalf Baechle <ralf@linux-mips.org>
Wed, 19 Jun 2013 18:18:55 +0000 (20:18 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 21 Jun 2013 16:07:02 +0000 (18:07 +0200)
  CC      arch/mips/sibyte/bcm1480/bus_watcher.o
  CHK     kernel/config_data.h
arch/mips/sibyte/bcm1480/bus_watcher.c: In function ‘check_bus_watcher’:
arch/mips/sibyte/bcm1480/bus_watcher.c:86:82: error: ‘A_SCD_BUS_ERR_STATUS_DEBUG’ undeclared (first use in this function)
arch/mips/sibyte/bcm1480/bus_watcher.c:86:82: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [arch/mips/sibyte/bcm1480/bus_watcher.o] Error 1
make[2]: *** [arch/mips/sibyte/bcm1480] Error 2
make[1]: *** [arch/mips/sibyte] Error 2
make: *** [arch/mips] Error 2

The register moved around though it's otherwise the same but because of
the changed address it now also has a different name.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/5514/
Reported-by: Markos Chandras <markos.chandras@imgtec.com>
arch/mips/sibyte/common/Makefile
arch/mips/sibyte/common/bus_watcher.c [moved from arch/mips/sibyte/sb1250/bus_watcher.c with 94% similarity]
arch/mips/sibyte/sb1250/Makefile

index 36aa700cc40c6773954306ac6ba49e8f77f0019d..b3d6bf23a6620c5837f3ac9fcc2fb3d6357cfba3 100644 (file)
@@ -1,3 +1,4 @@
 obj-y := cfe.o
+obj-$(CONFIG_SIBYTE_BUS_WATCHER)       += bus_watcher.o
 obj-$(CONFIG_SIBYTE_CFE_CONSOLE)       += cfe_console.o
 obj-$(CONFIG_SIBYTE_TBPROF)            += sb_tbprof.o
similarity index 94%
rename from arch/mips/sibyte/sb1250/bus_watcher.c
rename to arch/mips/sibyte/common/bus_watcher.c
index d0ca7b91c417f08680e1a646ca4c676b20246af9..5581844c9194bc85719554789b58f1121c711eca 100644 (file)
@@ -37,6 +37,9 @@
 #include <asm/sibyte/sb1250_regs.h>
 #include <asm/sibyte/sb1250_int.h>
 #include <asm/sibyte/sb1250_scd.h>
+#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80)
+#include <asm/sibyte/bcm1480_regs.h>
+#endif
 
 
 struct bw_stats_struct {
@@ -81,9 +84,15 @@ void check_bus_watcher(void)
 #ifdef CONFIG_SB1_PASS_1_WORKAROUNDS
        /* Destructive read, clears register and interrupt */
        status = csr_in32(IOADDR(A_SCD_BUS_ERR_STATUS));
-#else
+#elif defined(CONFIG_SIBYTE_BCM112X) || defined(CONFIG_SIBYTE_SB1250)
        /* Use non-destructive register */
        status = csr_in32(IOADDR(A_SCD_BUS_ERR_STATUS_DEBUG));
+#elif defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80)
+       /* Use non-destructive register */
+       /* Same as 1250 except BUS_ERR_STATUS_DEBUG is in a different place. */
+       status = csr_in32(IOADDR(A_BCM1480_BUS_ERR_STATUS_DEBUG));
+#else
+#error bus watcher being built for unknown Sibyte SOC!
 #endif
        if (!(status & 0x7fffffff)) {
                printk("Using last values reaped by bus watcher driver\n");
index d3d969de407ba6be81175085a1577f566c94b088..cdc4c56c3e29238158cafa0e09422780e46af1ac 100644 (file)
@@ -1,4 +1,3 @@
 obj-y := setup.o irq.o time.o
 
 obj-$(CONFIG_SMP)                      += smp.o
-obj-$(CONFIG_SIBYTE_BUS_WATCHER)       += bus_watcher.o