2 * Common header file for blackfin family of processors.
9 #define LO(con32) ((con32) & 0xFFFF)
10 #define lo(con32) ((con32) & 0xFFFF)
11 #define HI(con32) (((con32) >> 16) & 0xFFFF)
12 #define hi(con32) (((con32) >> 16) & 0xFFFF)
14 #include <asm/mach/blackfin.h>
15 #include <asm/bfin-global.h>
19 /* SSYNC implementation for C file */
20 #if defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
21 static inline void SSYNC (void)
24 __asm__
__volatile__ ("cli %0;\n\t"
30 #elif defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
31 static inline void SSYNC (void)
34 __asm__
__volatile__ ("cli %0;\n\t"
39 #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
40 static inline void SSYNC (void)
42 __asm__
__volatile__ ("nop; nop; nop;\n\t"
46 #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
47 static inline void SSYNC (void)
49 __asm__
__volatile__ ("ssync;\n\t");
53 /* CSYNC implementation for C file */
54 #if defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
55 static inline void CSYNC (void)
58 __asm__
__volatile__ ("cli %0;\n\t"
64 #elif defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
65 static inline void CSYNC (void)
68 __asm__
__volatile__ ("cli %0;\n\t"
73 #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
74 static inline void CSYNC (void)
76 __asm__
__volatile__ ("nop; nop; nop;\n\t"
80 #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
81 static inline void CSYNC (void)
83 __asm__
__volatile__ ("csync;\n\t");
87 #else /* __ASSEMBLY__ */
89 /* SSYNC & CSYNC implementations for assembly files */
91 #define ssync(x) SSYNC(x)
92 #define csync(x) CSYNC(x)
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;
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;
102 #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
103 #define SSYNC(scratch) nop; nop; nop; SSYNC;
104 #define CSYNC(scratch) nop; nop; nop; CSYNC;
106 #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
107 #define SSYNC(scratch) SSYNC;
108 #define CSYNC(scratch) CSYNC;
110 #endif /* ANOMALY_05000312 & ANOMALY_05000244 handling */
112 #endif /* __ASSEMBLY__ */
114 #endif /* _BLACKFIN_H_ */