[MIPS] Ocelot 3: Fix large number of warnings.
authorRalf Baechle <ralf@linux-mips.org>
Sat, 4 Nov 2006 13:02:46 +0000 (13:02 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 6 Nov 2006 20:55:36 +0000 (20:55 +0000)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/momentum/ocelot_3/ocelot_3_fpga.h

index 227e429fe720edb0619b6373402061b1785e69c4..5710a9029f1c2f22504172795f07ccd90256db36 100644 (file)
@@ -51,7 +51,9 @@
 
 extern unsigned long ocelot_fpga_base;
 
-#define OCELOT_FPGA_WRITE(x, y) writeb(x, ocelot_fpga_base + OCELOT_3_REG_##y)
-#define OCELOT_FPGA_READ(x) readb(ocelot_fpga_base + OCELOT_3_REG_##x)
+#define __FPGA_REG_TO_ADDR(reg)                                                \
+       ((void *) ocelot_fpga_base + OCELOT_3_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