Blackfin: gptimers: add structure for hardware register layout
authorMike Frysinger <vapier@gentoo.org>
Thu, 26 May 2011 21:26:58 +0000 (17:26 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 May 2011 21:02:55 +0000 (17:02 -0400)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/include/asm/gptimers.h

index c722acdda0d396cc3835001ebdc55c1da5435493..38657dac1235d4d4d8e2a3d8b66b364aa931ed79 100644 (file)
@@ -193,4 +193,22 @@ uint16_t get_enabled_gptimers(void);
 uint32_t get_gptimer_status(unsigned int group);
 void     set_gptimer_status(unsigned int group, uint32_t value);
 
+/*
+ * All Blackfin system MMRs are padded to 32bits even if the register
+ * itself is only 16bits.  So use a helper macro to streamline this.
+ */
+#define __BFP(m) u16 m; u16 __pad_##m
+
+/*
+ * bfin timer registers layout
+ */
+struct bfin_gptimer_regs {
+       __BFP(config);
+       u32 counter;
+       u32 period;
+       u32 width;
+};
+
+#undef __BFP
+
 #endif