diff options
author | Robin Getz <robin.getz@analog.com> | 2007-06-20 23:34:16 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-06-20 23:34:16 -0400 |
commit | 4bf3f3cbb6add01d3e6a18c73f594b73113b14f2 (patch) | |
tree | a80839f98a64052f4d004a5207da2731fe556908 /include/asm-blackfin/blackfin.h | |
parent | 0864a4e201b1ea442f4c8b887418a29f67e24d30 (diff) |
Blackfin arch: update ANOMALY handling
update lists for 533, 537, and add SSYNC workaround into assembly files.
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'include/asm-blackfin/blackfin.h')
-rw-r--r-- | include/asm-blackfin/blackfin.h | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/include/asm-blackfin/blackfin.h b/include/asm-blackfin/blackfin.h index db3b615ffbab..25b934b7f829 100644 --- a/include/asm-blackfin/blackfin.h +++ b/include/asm-blackfin/blackfin.h | |||
@@ -39,7 +39,9 @@ static inline void SSYNC (void) | |||
39 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) | 39 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) |
40 | static inline void SSYNC (void) | 40 | static inline void SSYNC (void) |
41 | { | 41 | { |
42 | __builtin_bfin_ssync(); | 42 | __asm__ __volatile__ ("nop; nop; nop;\n\t" |
43 | "ssync;\n\t" | ||
44 | ::); | ||
43 | } | 45 | } |
44 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) | 46 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) |
45 | static inline void SSYNC (void) | 47 | static inline void SSYNC (void) |
@@ -71,7 +73,9 @@ static inline void CSYNC (void) | |||
71 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) | 73 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) |
72 | static inline void CSYNC (void) | 74 | static inline void CSYNC (void) |
73 | { | 75 | { |
74 | __builtin_bfin_csync(); | 76 | __asm__ __volatile__ ("nop; nop; nop;\n\t" |
77 | "ssync;\n\t" | ||
78 | ::); | ||
75 | } | 79 | } |
76 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) | 80 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) |
77 | static inline void CSYNC (void) | 81 | static inline void CSYNC (void) |
@@ -80,6 +84,31 @@ static inline void CSYNC (void) | |||
80 | } | 84 | } |
81 | #endif | 85 | #endif |
82 | 86 | ||
87 | #else /* __ASSEMBLY__ */ | ||
88 | |||
89 | /* SSYNC & CSYNC implementations for assembly files */ | ||
90 | |||
91 | #define ssync(x) SSYNC(x) | ||
92 | #define csync(x) CSYNC(x) | ||
93 | |||
94 | #if defined(ANOMALY_05000312) && defined(ANOMALY_05000244) | ||
95 | #define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch; | ||
96 | #define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch; | ||
97 | |||
98 | #elif defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) | ||
99 | #define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch; | ||
100 | #define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch; | ||
101 | |||
102 | #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) | ||
103 | #define SSYNC(scratch) nop; nop; nop; SSYNC; | ||
104 | #define CSYNC(scratch) nop; nop; nop; CSYNC; | ||
105 | |||
106 | #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) | ||
107 | #define SSYNC(scratch) SSYNC; | ||
108 | #define CSYNC(scratch) CSYNC; | ||
109 | |||
110 | #endif /* ANOMALY_05000312 & ANOMALY_05000244 handling */ | ||
111 | |||
83 | #endif /* __ASSEMBLY__ */ | 112 | #endif /* __ASSEMBLY__ */ |
84 | 113 | ||
85 | #endif /* _BLACKFIN_H_ */ | 114 | #endif /* _BLACKFIN_H_ */ |