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 static inline void SSYNC(void)
23 if (ANOMALY_05000312 && ANOMALY_05000244)
32 else if (ANOMALY_05000312 && !ANOMALY_05000244)
39 else if (!ANOMALY_05000312 && ANOMALY_05000244)
47 __asm__ __volatile__("ssync;");
50 /* CSYNC implementation for C file */
51 static inline void CSYNC(void)
54 if (ANOMALY_05000312 && ANOMALY_05000244)
63 else if (ANOMALY_05000312 && !ANOMALY_05000244)
70 else if (!ANOMALY_05000312 && ANOMALY_05000244)
78 __asm__ __volatile__("csync;");
81 #else /* __ASSEMBLY__ */
83 /* SSYNC & CSYNC implementations for assembly files */
85 #define ssync(x) SSYNC(x)
86 #define csync(x) CSYNC(x)
88 #if ANOMALY_05000312 && ANOMALY_05000244
89 #define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch;
90 #define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch;
92 #elif ANOMALY_05000312 && !ANOMALY_05000244
93 #define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch;
94 #define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch;
96 #elif !ANOMALY_05000312 && ANOMALY_05000244
97 #define SSYNC(scratch) nop; nop; nop; SSYNC;
98 #define CSYNC(scratch) nop; nop; nop; CSYNC;
100 #elif !ANOMALY_05000312 && !ANOMALY_05000244
101 #define SSYNC(scratch) SSYNC;
102 #define CSYNC(scratch) CSYNC;
104 #endif /* ANOMALY_05000312 & ANOMALY_05000244 handling */
106 #endif /* __ASSEMBLY__ */
108 #endif /* _BLACKFIN_H_ */