summaryrefslogtreecommitdiffstats
path: root/sys/dev/gxemul/ether/gxreg.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/gxemul/ether/gxreg.h')
-rw-r--r--sys/dev/gxemul/ether/gxreg.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/gxemul/ether/gxreg.h b/sys/dev/gxemul/ether/gxreg.h
index e67f43d..a528250 100644
--- a/sys/dev/gxemul/ether/gxreg.h
+++ b/sys/dev/gxemul/ether/gxreg.h
@@ -40,10 +40,17 @@
#define GXEMUL_ETHER_DEV_COMMAND (0x4020)
#define GXEMUL_ETHER_DEV_MAC (0x4040)
+#ifdef _LP64
#define GXEMUL_ETHER_DEV_FUNCTION(f) \
(volatile uint64_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_ETHER_DEV_BASE + (f))
#define GXEMUL_ETHER_DEV_READ(f) \
(volatile uint64_t)*GXEMUL_ETHER_DEV_FUNCTION(f)
+#else
+#define GXEMUL_ETHER_DEV_FUNCTION(f) \
+ (volatile uint32_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_ETHER_DEV_BASE + (f))
+#define GXEMUL_ETHER_DEV_READ(f) \
+ (volatile uint32_t)*GXEMUL_ETHER_DEV_FUNCTION(f)
+#endif
#define GXEMUL_ETHER_DEV_WRITE(f, v) \
*GXEMUL_ETHER_DEV_FUNCTION(f) = (v)
OpenPOWER on IntegriCloud