-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Blackfin: bfin_twi.h: start a common TWI header
Start one place for TWI definitions. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
- Loading branch information
Mike Frysinger
committed
Oct 25, 2010
1 parent
02460d0
commit 61c16b5
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |