diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 18:41:32 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 18:41:32 -0700 |
| commit | 4833c16dea61cb30d6f77dfec3067a08ba79b361 (patch) | |
| tree | fdf6cd3a851bca2c8c9db2e751abd5eddfcb2f66 /arch/blackfin/include/asm/bfin_twi.h | |
| parent | e0e170bd7ded2ec16e2813d63c0faff43193fde8 (diff) | |
| parent | ad3e01a331435a06055cdaf19cc973dd138dc925 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin:
Blackfin: fix inverted anomaly 05000481 logic
Blackfin: drop unused irq_panic()/DEBUG_ICACHE_CHECK
Blackfin: ppi/spi/twi headers: add missing __BFP undef
Blackfin: update defconfigs
Blackfin: bfin_twi.h: start a common TWI header
netdev: bfin_mac: push settings to platform resources
Diffstat (limited to 'arch/blackfin/include/asm/bfin_twi.h')
| -rw-r--r-- | arch/blackfin/include/asm/bfin_twi.h | 45 |
1 files changed, 45 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 00000000000..e767d649dfc --- /dev/null +++ b/arch/blackfin/include/asm/bfin_twi.h @@ -0,0 +1,45 @@ +/* + * 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); +}; + +#undef __BFP + +#endif |
