aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/blackfin/include/asm/def_LPBlackfin.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/def_LPBlackfin.h b/arch/blackfin/include/asm/def_LPBlackfin.h
index f342ff0319df..4e562850021c 100644
--- a/arch/blackfin/include/asm/def_LPBlackfin.h
+++ b/arch/blackfin/include/asm/def_LPBlackfin.h
@@ -50,6 +50,23 @@
50#define bfin_write16(addr, val) _bfin_writeX(addr, val, 16, w) 50#define bfin_write16(addr, val) _bfin_writeX(addr, val, 16, w)
51#define bfin_write32(addr, val) _bfin_writeX(addr, val, 32, ) 51#define bfin_write32(addr, val) _bfin_writeX(addr, val, 32, )
52 52
53#define bfin_read(addr) \
54({ \
55 sizeof(*(addr)) == 1 ? bfin_read8(addr) : \
56 sizeof(*(addr)) == 2 ? bfin_read16(addr) : \
57 sizeof(*(addr)) == 4 ? bfin_read32(addr) : \
58 ({ BUG(); 0; }); \
59})
60#define bfin_write(addr, val) \
61({ \
62 switch (sizeof(*(addr))) { \
63 case 1: bfin_write8(addr, val); break; \
64 case 2: bfin_write16(addr, val); break; \
65 case 4: bfin_write32(addr, val); break; \
66 default: BUG(); \
67 } \
68})
69
53#endif /* __ASSEMBLY__ */ 70#endif /* __ASSEMBLY__ */
54 71
55/************************************************** 72/**************************************************