Commit cca72333e71e348995859b88628c1abcb58b759e
1 parent
64651309a1
Exists in
master
and in
7 other branches
[MIPS] Ocelot C: Fix large number of warnings.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Showing 1 changed file with 4 additions and 2 deletions Side-by-side Diff
arch/mips/momentum/ocelot_c/ocelot_c_fpga.h
... | ... | @@ -53,8 +53,10 @@ |
53 | 53 | #define OCELOT_C_REG_INTSET 0xe |
54 | 54 | #define OCELOT_C_REG_INTCLR 0xf |
55 | 55 | |
56 | -#define OCELOT_FPGA_WRITE(x, y) writeb(x, OCELOT_C_CS0_ADDR + OCELOT_C_REG_##y) | |
57 | -#define OCELOT_FPGA_READ(x) readb(OCELOT_C_CS0_ADDR + OCELOT_C_REG_##x) | |
56 | +#define __FPGA_REG_TO_ADDR(reg) \ | |
57 | + ((void *) OCELOT_C_CS0_ADDR + OCELOT_C_REG_##reg) | |
58 | +#define OCELOT_FPGA_WRITE(x, reg) writeb(x, __FPGA_REG_TO_ADDR(reg)) | |
59 | +#define OCELOT_FPGA_READ(reg) readb(__FPGA_REG_TO_ADDR(reg)) | |
58 | 60 | |
59 | 61 | #endif |