blackfin: twi: read twi mmr via bfin_read macro
authorSonic Zhang <sonic.zhang@analog.com>
Wed, 18 Jul 2012 10:22:45 +0000 (18:22 +0800)
committerBob Liu <lliubbo@gmail.com>
Tue, 24 Jul 2012 05:39:53 +0000 (13:39 +0800)
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
arch/blackfin/include/asm/bfin_twi.h

index c0fe6625777397ae75bb4ffa9d68ea31fde5e26b..f4a0727874365bc748cfb80a72cd5d8e1e850a6b 100644 (file)
@@ -94,7 +94,7 @@ static inline u16 read_RCV_DATA8(struct bfin_twi_iface *iface)
        unsigned long flags;
 
        flags = hard_local_irq_save();
-       ret = iface->regs_base->rcv_data8;
+       ret = bfin_read16(&iface->regs_base->rcv_data8);
        hard_local_irq_restore(flags);
 
        return ret;
@@ -106,7 +106,7 @@ static inline u16 read_RCV_DATA16(struct bfin_twi_iface *iface)
        unsigned long flags;
 
        flags = hard_local_irq_save();
-       ret = iface->regs_base->rcv_data16;
+       ret = bfin_read16(&iface->regs_base->rcv_data16);
        hard_local_irq_restore(flags);
 
        return ret;