aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-blackfin
diff options
context:
space:
mode:
authorRoy Huang <roy.huang@analog.com>2007-06-14 00:54:44 -0400
committerBryan Wu <bryan.wu@analog.com>2007-06-14 00:54:44 -0400
commit75ed405c63b3fc2402fb8ff825b0ebffcff26b57 (patch)
tree6f583137c2e84155f606047d9acda4ca8674a5e3 /include/asm-blackfin
parentd2d50aa97d695d83ccb2341488d977e8cfe36555 (diff)
Blackfin arch: fix bug ad1836 fails to build properly for BF533-EZKIT
bug log here: http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3166 Signed-off-by: Roy Huang <roy.huang@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'include/asm-blackfin')
-rw-r--r--include/asm-blackfin/mach-common/def_LPBlackfin.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asm-blackfin/mach-common/def_LPBlackfin.h b/include/asm-blackfin/mach-common/def_LPBlackfin.h
index 76103526aec1..be1ece8c0c27 100644
--- a/include/asm-blackfin/mach-common/def_LPBlackfin.h
+++ b/include/asm-blackfin/mach-common/def_LPBlackfin.h
@@ -42,6 +42,12 @@
42 42
43#if defined(ANOMALY_05000198) 43#if defined(ANOMALY_05000198)
44 44
45#define bfin_read8(addr) ({ unsigned char __v; \
46 __asm__ __volatile__ ("NOP;\n\t" \
47 "%0 = b[%1] (z);\n\t" \
48 : "=d"(__v) : "a"(addr)); \
49 __v; })
50
45#define bfin_read16(addr) ({ unsigned __v; \ 51#define bfin_read16(addr) ({ unsigned __v; \
46 __asm__ __volatile__ ("NOP;\n\t"\ 52 __asm__ __volatile__ ("NOP;\n\t"\
47 "%0 = w[%1] (z);\n\t"\ 53 "%0 = w[%1] (z);\n\t"\
@@ -52,6 +58,11 @@
52 "%0 = [%1];\n\t"\ 58 "%0 = [%1];\n\t"\
53 : "=d"(__v) : "a"(addr)); __v; }) 59 : "=d"(__v) : "a"(addr)); __v; })
54 60
61#define bfin_write8(addr, val) ({ \
62 __asm__ __volatile__ ("NOP;\n\t" \
63 "b[%0] = %1;\n\t" \
64 : : "a"(addr), "d"(val) : "memory");})
65
55#define bfin_write16(addr,val) ({\ 66#define bfin_write16(addr,val) ({\
56 __asm__ __volatile__ ("NOP;\n\t"\ 67 __asm__ __volatile__ ("NOP;\n\t"\
57 "w[%0] = %1;\n\t"\ 68 "w[%0] = %1;\n\t"\
@@ -64,6 +75,12 @@
64 75
65#else 76#else
66 77
78#define bfin_read8(addr) ({ unsigned char __v; \
79 __asm__ __volatile__ ( \
80 "%0 = b[%1] (z);\n\t" \
81 :"=d"(__v) : "a"(addr)); \
82 __v; })
83
67#define bfin_read16(addr) ({ unsigned __v; \ 84#define bfin_read16(addr) ({ unsigned __v; \
68 __asm__ __volatile__ (\ 85 __asm__ __volatile__ (\
69 "%0 = w[%1] (z);\n\t"\ 86 "%0 = w[%1] (z);\n\t"\
@@ -74,6 +91,11 @@
74 "%0 = [%1];\n\t"\ 91 "%0 = [%1];\n\t"\
75 : "=d"(__v) : "a"(addr)); __v; }) 92 : "=d"(__v) : "a"(addr)); __v; })
76 93
94#define bfin_write8(addr, val) ({ \
95 __asm__ __volatile__ ( \
96 "b[%0] = %1; \n\t" \
97 ::"a"(addr), "d"(val) : "memory");})
98
77#define bfin_write16(addr,val) ({\ 99#define bfin_write16(addr,val) ({\
78 __asm__ __volatile__ (\ 100 __asm__ __volatile__ (\
79 "w[%0] = %1;\n\t"\ 101 "w[%0] = %1;\n\t"\