aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/include/asm/bfin_twi.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/bfin_twi.h b/arch/blackfin/include/asm/bfin_twi.h
index 72092108df1c..87e6007b8f4a 100644
--- a/arch/blackfin/include/asm/bfin_twi.h
+++ b/arch/blackfin/include/asm/bfin_twi.h
@@ -83,8 +83,35 @@ DEFINE_TWI_REG(FIFO_CTL, fifo_ctl)
83DEFINE_TWI_REG(FIFO_STAT, fifo_stat) 83DEFINE_TWI_REG(FIFO_STAT, fifo_stat)
84DEFINE_TWI_REG(XMT_DATA8, xmt_data8) 84DEFINE_TWI_REG(XMT_DATA8, xmt_data8)
85DEFINE_TWI_REG(XMT_DATA16, xmt_data16) 85DEFINE_TWI_REG(XMT_DATA16, xmt_data16)
86#if !ANOMALY_05001001
86DEFINE_TWI_REG(RCV_DATA8, rcv_data8) 87DEFINE_TWI_REG(RCV_DATA8, rcv_data8)
87DEFINE_TWI_REG(RCV_DATA16, rcv_data16) 88DEFINE_TWI_REG(RCV_DATA16, rcv_data16)
89#else
90static inline u16 read_RCV_DATA8(struct bfin_twi_iface *iface)
91{
92 u16 ret;
93 unsigned long flags;
94
95 flags = hard_local_irq_save();
96 ret = iface->regs_base->rcv_data8;
97 hard_local_irq_restore(flags);
98
99 return ret;
100}
101
102static inline u16 read_RCV_DATA16(struct bfin_twi_iface *iface)
103{
104 u16 ret;
105 unsigned long flags;
106
107 flags = hard_local_irq_save();
108 ret = iface->regs_base->rcv_data16;
109 hard_local_irq_restore(flags);
110
111 return ret;
112}
113#endif
114
88 115
89/* ******************** TWO-WIRE INTERFACE (TWI) MASKS ***********************/ 116/* ******************** TWO-WIRE INTERFACE (TWI) MASKS ***********************/
90/* TWI_CLKDIV Macros (Use: *pTWI_CLKDIV = CLKLOW(x)|CLKHI(y); ) */ 117/* TWI_CLKDIV Macros (Use: *pTWI_CLKDIV = CLKLOW(x)|CLKHI(y); ) */