projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
335dd55
)
i2c: i2c-bfin-twi: Always access 16 bit MMR by bfin 16 bit access Macro.
author
Sonic Zhang
<
[email protected]
>
Tue, 5 Jun 2012 05:20:06 +0000
(13:20 +0800)
committer
Bob Liu
<
[email protected]
>
Tue, 24 Jul 2012 05:39:50 +0000
(13:39 +0800)
Otherwise, the compiler may optimize assemble code into 8bit access instruction
when target register is 8 bit width.
Signed-off-by: Sonic Zhang <
[email protected]
>
Signed-off-by: Bob Liu <
[email protected]
>
arch/blackfin/include/asm/bfin_twi.h
patch
|
blob
|
history
diff --git
a/arch/blackfin/include/asm/bfin_twi.h
b/arch/blackfin/include/asm/bfin_twi.h
index 2f3339a47626e7e57074f142af8cc28faccdc1dc..e3b40e2856f2a51a5c462f8350a54ec5375ac2f8 100644
(file)
--- a/
arch/blackfin/include/asm/bfin_twi.h
+++ b/
arch/blackfin/include/asm/bfin_twi.h
@@
-66,9
+66,9
@@
struct bfin_twi_iface {
#define DEFINE_TWI_REG(reg_name, reg) \
static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
- { return
iface->regs_base->reg
; } \
+ { return
bfin_read16(&iface->regs_base->reg)
; } \
static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
- {
iface->regs_base->reg = v
; }
+ {
bfin_write16(&iface->regs_base->reg, v)
; }
DEFINE_TWI_REG(CLKDIV, clkdiv)
DEFINE_TWI_REG(CONTROL, control)