Commit 433b5887 authored by Sonic Zhang's avatar Sonic Zhang Committed by Bob Liu

blackfin: twi: read twi mmr via bfin_read macro

Signed-off-by: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarBob Liu <lliubbo@gmail.com>
parent 68bcdd48
...@@ -94,7 +94,7 @@ static inline u16 read_RCV_DATA8(struct bfin_twi_iface *iface) ...@@ -94,7 +94,7 @@ static inline u16 read_RCV_DATA8(struct bfin_twi_iface *iface)
unsigned long flags; unsigned long flags;
flags = hard_local_irq_save(); flags = hard_local_irq_save();
ret = iface->regs_base->rcv_data8; ret = bfin_read16(&iface->regs_base->rcv_data8);
hard_local_irq_restore(flags); hard_local_irq_restore(flags);
return ret; return ret;
...@@ -106,7 +106,7 @@ static inline u16 read_RCV_DATA16(struct bfin_twi_iface *iface) ...@@ -106,7 +106,7 @@ static inline u16 read_RCV_DATA16(struct bfin_twi_iface *iface)
unsigned long flags; unsigned long flags;
flags = hard_local_irq_save(); flags = hard_local_irq_save();
ret = iface->regs_base->rcv_data16; ret = bfin_read16(&iface->regs_base->rcv_data16);
hard_local_irq_restore(flags); hard_local_irq_restore(flags);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment