summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2010-12-02 11:05:13 +0100
committerTobias Klauser <tklauser@distanz.ch>2010-12-02 11:05:13 +0100
commit09cc305ef5d604fc7e4c2753f0c9bb8c8ebe9078 (patch)
tree2774f13f4d82d0570eb5ee578fbd0a27a8f85066
parent9a1312e741193778718ed37b3779c2b964649e9d (diff)
Add OFF_TO_REG macro
-rw-r--r--device.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/device.h b/device.h
index da65a37..fed820e 100644
--- a/device.h
+++ b/device.h
@@ -55,6 +55,7 @@ struct io_register {
};
#define REG_TO_OFF(reg) ((reg) * sizeof(uint32_t))
+#define OFF_TO_REG(off) ((off) / sizeof(uint32_t))
extern void io_register_init(struct io_register *reg, uint32_t addr,
uint32_t valid, uint32_t readonly, uint32_t value);