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/anomaly.h>
18 /* SSYNC implementation for C file */
19 static inline void SSYNC(void)
22 if (ANOMALY_05000312 && ANOMALY_05000244)
31 else if (ANOMALY_05000312 && !ANOMALY_05000244)
38 else if (!ANOMALY_05000312 && ANOMALY_05000244)
46 __asm__ __volatile__("ssync;");
49 /* CSYNC implementation for C file */
50 static inline void CSYNC(void)
53 if (ANOMALY_05000312 && ANOMALY_05000244)
62 else if (ANOMALY_05000312 && !ANOMALY_05000244)
69 else if (!ANOMALY_05000312 && ANOMALY_05000244)
77 __asm__ __volatile__("csync;");
80 #else /* __ASSEMBLY__ */
82 /* SSYNC & CSYNC implementations for assembly files */
84 #define ssync(x) SSYNC(x)
85 #define csync(x) CSYNC(x)
87 #if ANOMALY_05000312 && ANOMALY_05000244
88 #define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch;
89 #define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch;
91 #elif ANOMALY_05000312 && !ANOMALY_05000244
92 #define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch;
93 #define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch;
95 #elif !ANOMALY_05000312 && ANOMALY_05000244
96 #define SSYNC(scratch) nop; nop; nop; SSYNC;
97 #define CSYNC(scratch) nop; nop; nop; CSYNC;
99 #elif !ANOMALY_05000312 && !ANOMALY_05000244
100 #define SSYNC(scratch) SSYNC;
101 #define CSYNC(scratch) CSYNC;
103 #endif /* ANOMALY_05000312 & ANOMALY_05000244 handling */
105 #endif /* __ASSEMBLY__ */
107 #include <asm/mach/blackfin.h>
108 #include <asm/bfin-global.h>
110 #endif /* _BLACKFIN_H_ */