diff options
| author | Mike Frysinger <vapier@gentoo.org> | 2010-10-22 01:11:21 -0400 |
|---|---|---|
| committer | Mike Frysinger <vapier@gentoo.org> | 2010-10-25 04:54:32 -0400 |
| commit | 61c16b5c7414b6d0511dc384e0ea994e250e6339 (patch) | |
| tree | 6d3c198f42c931f4ecf7d3b0b5c668d582a1b794 | |
| parent | 02460d08930656b3a50381cfb119864efcd4eef9 (diff) | |
Blackfin: bfin_twi.h: start a common TWI header
Start one place for TWI definitions.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| -rw-r--r-- | arch/blackfin/include/asm/bfin_twi.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/bfin_twi.h b/arch/blackfin/include/asm/bfin_twi.h new file mode 100644 index 000000000000..cc155e14e55c --- /dev/null +++ b/arch/blackfin/include/asm/bfin_twi.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * bfin_twi.h - interface to Blackfin TWIs | ||
| 3 | * | ||
| 4 | * Copyright 2005-2010 Analog Devices Inc. | ||
| 5 | * | ||
| 6 | * Licensed under the GPL-2 or later. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef __ASM_BFIN_TWI_H__ | ||
| 10 | #define __ASM_BFIN_TWI_H__ | ||
| 11 | |||
| 12 | #include <linux/types.h> | ||
| 13 | |||
| 14 | /* | ||
| 15 | * All Blackfin system MMRs are padded to 32bits even if the register | ||
| 16 | * itself is only 16bits. So use a helper macro to streamline this. | ||
| 17 | */ | ||
| 18 | #define __BFP(m) u16 m; u16 __pad_##m | ||
| 19 | |||
| 20 | /* | ||
| 21 | * bfin twi registers layout | ||
| 22 | */ | ||
| 23 | struct bfin_twi_regs { | ||
| 24 | __BFP(clkdiv); | ||
| 25 | __BFP(control); | ||
| 26 | __BFP(slave_ctl); | ||
| 27 | __BFP(slave_stat); | ||
| 28 | __BFP(slave_addr); | ||
| 29 | __BFP(master_ctl); | ||
| 30 | __BFP(master_stat); | ||
| 31 | __BFP(master_addr); | ||
| 32 | __BFP(int_stat); | ||
| 33 | __BFP(int_mask); | ||
| 34 | __BFP(fifo_ctl); | ||
| 35 | __BFP(fifo_stat); | ||
| 36 | u32 __pad[20]; | ||
| 37 | __BFP(xmt_data8); | ||
| 38 | __BFP(xmt_data16); | ||
| 39 | __BFP(rcv_data8); | ||
| 40 | __BFP(rcv_data16); | ||
| 41 | }; | ||
| 42 | |||
| 43 | #endif | ||
