Title: [9286] trunk/arch/blackfin/include/asm/bfin_twi.h: bfin: start a common twi header
Revision
9286
Author
vapier
Date
2010-10-22 01:11:21 -0400 (Fri, 22 Oct 2010)

Log Message

bfin: start a common twi header

Added Paths


Diff

Added: trunk/arch/blackfin/include/asm/bfin_twi.h (0 => 9286)


--- trunk/arch/blackfin/include/asm/bfin_twi.h	                        (rev 0)
+++ trunk/arch/blackfin/include/asm/bfin_twi.h	2010-10-22 05:11:21 UTC (rev 9286)
@@ -0,0 +1,43 @@
+/*
+ * bfin_twi.h - interface to Blackfin TWIs
+ *
+ * Copyright 2005-2010 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef __ASM_BFIN_TWI_H__
+#define __ASM_BFIN_TWI_H__
+
+#include <linux/types.h>
+
+/*
+ * 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 twi registers layout
+ */
+struct bfin_twi_regs {
+	__BFP(clkdiv);
+	__BFP(control);
+	__BFP(slave_ctl);
+	__BFP(slave_stat);
+	__BFP(slave_addr);
+	__BFP(master_ctl);
+	__BFP(master_stat);
+	__BFP(master_addr);
+	__BFP(int_stat);
+	__BFP(int_mask);
+	__BFP(fifo_ctl);
+	__BFP(fifo_stat);
+	u32 __pad[20];
+	__BFP(xmt_data8);
+	__BFP(xmt_data16);
+	__BFP(rcv_data8);
+	__BFP(rcv_data16);
+};
+
+#endif
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to