From d088fe2100bf1b40270325af5cc2dde8fbe0d409 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 4 Nov 2006 13:02:46 +0000 Subject: [PATCH] --- yaml --- r: 40775 b: refs/heads/master c: d19f7befe929d400df89699eb51b8d7f4ef1b2d8 h: refs/heads/master i: 40773: 7bc63df495148386c051132ba0dfe7117f130042 40771: db7099d77ac50aaacc28e62551e0aba8be01da5a 40767: 3f4864ceb099b69e52002a2122bf09544851fa47 v: v3 --- [refs] | 2 +- trunk/arch/mips/momentum/ocelot_3/ocelot_3_fpga.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index d8f18dc7836f..1fc90ca67c8f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ad0b365573718a4a83266f98c9a49305c8eaf0b8 +refs/heads/master: d19f7befe929d400df89699eb51b8d7f4ef1b2d8 diff --git a/trunk/arch/mips/momentum/ocelot_3/ocelot_3_fpga.h b/trunk/arch/mips/momentum/ocelot_3/ocelot_3_fpga.h index 227e429fe720..5710a9029f1c 100644 --- a/trunk/arch/mips/momentum/ocelot_3/ocelot_3_fpga.h +++ b/trunk/arch/mips/momentum/ocelot_3/ocelot_3_fpga.h @@ -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