GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / blackfin / include / asm / blackfin.h
blobeb7c1441d8f9ebf846111f66f91c6ac03f38a490
1 /*
2 * Common header file for Blackfin family of processors.
4  * Copyright 2004-2009 Analog Devices Inc.
5  *
6  * Licensed under the GPL-2 or later.
7 */
9 #ifndef _BLACKFIN_H_
10 #define _BLACKFIN_H_
12 #include <mach/anomaly.h>
14 #ifndef __ASSEMBLY__
16 /* SSYNC implementation for C file */
17 static inline void SSYNC(void)
19 int _tmp;
20 if (ANOMALY_05000312)
21 __asm__ __volatile__(
22 "cli %0;"
23 "nop;"
24 "nop;"
25 "ssync;"
26 "sti %0;"
27 : "=d" (_tmp)
29 else if (ANOMALY_05000244)
30 __asm__ __volatile__(
31 "nop;"
32 "nop;"
33 "nop;"
34 "ssync;"
36 else
37 __asm__ __volatile__("ssync;");
40 /* CSYNC implementation for C file */
41 static inline void CSYNC(void)
43 int _tmp;
44 if (ANOMALY_05000312)
45 __asm__ __volatile__(
46 "cli %0;"
47 "nop;"
48 "nop;"
49 "csync;"
50 "sti %0;"
51 : "=d" (_tmp)
53 else if (ANOMALY_05000244)
54 __asm__ __volatile__(
55 "nop;"
56 "nop;"
57 "nop;"
58 "csync;"
60 else
61 __asm__ __volatile__("csync;");
64 #else /* __ASSEMBLY__ */
66 #define LO(con32) ((con32) & 0xFFFF)
67 #define lo(con32) ((con32) & 0xFFFF)
68 #define HI(con32) (((con32) >> 16) & 0xFFFF)
69 #define hi(con32) (((con32) >> 16) & 0xFFFF)
71 /* SSYNC & CSYNC implementations for assembly files */
73 #define ssync(x) SSYNC(x)
74 #define csync(x) CSYNC(x)
76 #if ANOMALY_05000312
77 #define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch;
78 #define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch;
80 #elif ANOMALY_05000244
81 #define SSYNC(scratch) nop; nop; nop; SSYNC;
82 #define CSYNC(scratch) nop; nop; nop; CSYNC;
84 #else
85 #define SSYNC(scratch) SSYNC;
86 #define CSYNC(scratch) CSYNC;
88 #endif /* ANOMALY_05000312 & ANOMALY_05000244 handling */
90 #endif /* __ASSEMBLY__ */
92 #include <asm/mem_map.h>
93 #include <mach/blackfin.h>
94 #include <asm/bfin-global.h>
96 #endif /* _BLACKFIN_H_ */