diff options
Diffstat (limited to 'arch/blackfin/include/asm/bfin_twi.h')
-rw-r--r-- | arch/blackfin/include/asm/bfin_twi.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/blackfin/include/asm/bfin_twi.h b/arch/blackfin/include/asm/bfin_twi.h index 2f3339a47626..f4a072787436 100644 --- a/arch/blackfin/include/asm/bfin_twi.h +++ b/arch/blackfin/include/asm/bfin_twi.h | |||
@@ -66,9 +66,9 @@ struct bfin_twi_iface { | |||
66 | 66 | ||
67 | #define DEFINE_TWI_REG(reg_name, reg) \ | 67 | #define DEFINE_TWI_REG(reg_name, reg) \ |
68 | static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \ | 68 | static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \ |
69 | { return iface->regs_base->reg; } \ | 69 | { return bfin_read16(&iface->regs_base->reg); } \ |
70 | static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \ | 70 | static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \ |
71 | { iface->regs_base->reg = v; } | 71 | { bfin_write16(&iface->regs_base->reg, v); } |
72 | 72 | ||
73 | DEFINE_TWI_REG(CLKDIV, clkdiv) | 73 | DEFINE_TWI_REG(CLKDIV, clkdiv) |
74 | DEFINE_TWI_REG(CONTROL, control) | 74 | DEFINE_TWI_REG(CONTROL, control) |
@@ -84,7 +84,7 @@ DEFINE_TWI_REG(FIFO_CTL, fifo_ctl) | |||
84 | DEFINE_TWI_REG(FIFO_STAT, fifo_stat) | 84 | DEFINE_TWI_REG(FIFO_STAT, fifo_stat) |
85 | DEFINE_TWI_REG(XMT_DATA8, xmt_data8) | 85 | DEFINE_TWI_REG(XMT_DATA8, xmt_data8) |
86 | DEFINE_TWI_REG(XMT_DATA16, xmt_data16) | 86 | DEFINE_TWI_REG(XMT_DATA16, xmt_data16) |
87 | #if !ANOMALY_05001001 | 87 | #if !ANOMALY_16000030 |
88 | DEFINE_TWI_REG(RCV_DATA8, rcv_data8) | 88 | DEFINE_TWI_REG(RCV_DATA8, rcv_data8) |
89 | DEFINE_TWI_REG(RCV_DATA16, rcv_data16) | 89 | DEFINE_TWI_REG(RCV_DATA16, rcv_data16) |
90 | #else | 90 | #else |
@@ -94,7 +94,7 @@ static inline u16 read_RCV_DATA8(struct bfin_twi_iface *iface) | |||
94 | unsigned long flags; | 94 | unsigned long flags; |
95 | 95 | ||
96 | flags = hard_local_irq_save(); | 96 | flags = hard_local_irq_save(); |
97 | ret = iface->regs_base->rcv_data8; | 97 | ret = bfin_read16(&iface->regs_base->rcv_data8); |
98 | hard_local_irq_restore(flags); | 98 | hard_local_irq_restore(flags); |
99 | 99 | ||
100 | return ret; | 100 | return ret; |
@@ -106,7 +106,7 @@ static inline u16 read_RCV_DATA16(struct bfin_twi_iface *iface) | |||
106 | unsigned long flags; | 106 | unsigned long flags; |
107 | 107 | ||
108 | flags = hard_local_irq_save(); | 108 | flags = hard_local_irq_save(); |
109 | ret = iface->regs_base->rcv_data16; | 109 | ret = bfin_read16(&iface->regs_base->rcv_data16); |
110 | hard_local_irq_restore(flags); | 110 | hard_local_irq_restore(flags); |
111 | 111 | ||
112 | return ret; | 112 | return ret; |