Commit 75ed405c authored by Roy Huang's avatar Roy Huang Committed by Bryan Wu

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=3166Signed-off-by: default avatarRoy Huang <roy.huang@analog.com>
Signed-off-by: default avatarBryan Wu <bryan.wu@analog.com>
parent d2d50aa9
...@@ -42,6 +42,12 @@ ...@@ -42,6 +42,12 @@
#if defined(ANOMALY_05000198) #if defined(ANOMALY_05000198)
#define bfin_read8(addr) ({ unsigned char __v; \
__asm__ __volatile__ ("NOP;\n\t" \
"%0 = b[%1] (z);\n\t" \
: "=d"(__v) : "a"(addr)); \
__v; })
#define bfin_read16(addr) ({ unsigned __v; \ #define bfin_read16(addr) ({ unsigned __v; \
__asm__ __volatile__ ("NOP;\n\t"\ __asm__ __volatile__ ("NOP;\n\t"\
"%0 = w[%1] (z);\n\t"\ "%0 = w[%1] (z);\n\t"\
...@@ -52,6 +58,11 @@ ...@@ -52,6 +58,11 @@
"%0 = [%1];\n\t"\ "%0 = [%1];\n\t"\
: "=d"(__v) : "a"(addr)); __v; }) : "=d"(__v) : "a"(addr)); __v; })
#define bfin_write8(addr, val) ({ \
__asm__ __volatile__ ("NOP;\n\t" \
"b[%0] = %1;\n\t" \
: : "a"(addr), "d"(val) : "memory");})
#define bfin_write16(addr,val) ({\ #define bfin_write16(addr,val) ({\
__asm__ __volatile__ ("NOP;\n\t"\ __asm__ __volatile__ ("NOP;\n\t"\
"w[%0] = %1;\n\t"\ "w[%0] = %1;\n\t"\
...@@ -64,6 +75,12 @@ ...@@ -64,6 +75,12 @@
#else #else
#define bfin_read8(addr) ({ unsigned char __v; \
__asm__ __volatile__ ( \
"%0 = b[%1] (z);\n\t" \
:"=d"(__v) : "a"(addr)); \
__v; })
#define bfin_read16(addr) ({ unsigned __v; \ #define bfin_read16(addr) ({ unsigned __v; \
__asm__ __volatile__ (\ __asm__ __volatile__ (\
"%0 = w[%1] (z);\n\t"\ "%0 = w[%1] (z);\n\t"\
...@@ -74,6 +91,11 @@ ...@@ -74,6 +91,11 @@
"%0 = [%1];\n\t"\ "%0 = [%1];\n\t"\
: "=d"(__v) : "a"(addr)); __v; }) : "=d"(__v) : "a"(addr)); __v; })
#define bfin_write8(addr, val) ({ \
__asm__ __volatile__ ( \
"b[%0] = %1; \n\t" \
::"a"(addr), "d"(val) : "memory");})
#define bfin_write16(addr,val) ({\ #define bfin_write16(addr,val) ({\
__asm__ __volatile__ (\ __asm__ __volatile__ (\
"w[%0] = %1;\n\t"\ "w[%0] = %1;\n\t"\
......
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