[MIPS] Ocelot C: Fix large number of warnings.
authorRalf Baechle <ralf@linux-mips.org>
Fri, 3 Nov 2006 17:42:47 +0000 (17:42 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 6 Nov 2006 20:55:35 +0000 (20:55 +0000)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/momentum/ocelot_c/ocelot_c_fpga.h

index 7228cd19e5ea828822574e4562562531153c52b5..f0f5581dcb50065b06bf1e6d2991bbda8fbaca76 100644 (file)
@@ -53,7 +53,9 @@
 #define OCELOT_C_REG_INTSET            0xe
 #define OCELOT_C_REG_INTCLR            0xf
 
-#define OCELOT_FPGA_WRITE(x, y) writeb(x, OCELOT_C_CS0_ADDR + OCELOT_C_REG_##y)
-#define OCELOT_FPGA_READ(x) readb(OCELOT_C_CS0_ADDR + OCELOT_C_REG_##x)
+#define __FPGA_REG_TO_ADDR(reg)                                                \
+       ((void *) OCELOT_C_CS0_ADDR + OCELOT_C_REG_##reg)
+#define OCELOT_FPGA_WRITE(x, reg) writeb(x, __FPGA_REG_TO_ADDR(reg))
+#define OCELOT_FPGA_READ(reg) readb(__FPGA_REG_TO_ADDR(reg))
 
 #endif