[MIPS] Add gpio support to the BCM47XX platform
[deliverable/linux.git] / include / asm-blackfin / blackfin.h
CommitLineData
1394f032
BW
1/*
2 * Common header file for blackfin family of processors.
3 *
4 */
5
6#ifndef _BLACKFIN_H_
7#define _BLACKFIN_H_
8
df30b117
MF
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)
13
1394f032
BW
14#include <asm/mach/blackfin.h>
15#include <asm/bfin-global.h>
16
17#ifndef __ASSEMBLY__
18
19/* SSYNC implementation for C file */
20#if defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
21static inline void SSYNC (void)
22{
23 int _tmp;
24 __asm__ __volatile__ ("cli %0;\n\t"
25 "nop;nop;\n\t"
26 "ssync;\n\t"
27 "sti %0;\n\t"
28 :"=d"(_tmp):);
29}
30#elif defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
31static inline void SSYNC (void)
32{
33 int _tmp;
34 __asm__ __volatile__ ("cli %0;\n\t"
35 "ssync;\n\t"
36 "sti %0;\n\t"
37 :"=d"(_tmp):);
38}
39#elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
40static inline void SSYNC (void)
41{
4bf3f3cb
RG
42 __asm__ __volatile__ ("nop; nop; nop;\n\t"
43 "ssync;\n\t"
44 ::);
1394f032
BW
45}
46#elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
47static inline void SSYNC (void)
48{
49 __asm__ __volatile__ ("ssync;\n\t");
50}
51#endif
52
53/* CSYNC implementation for C file */
54#if defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
55static inline void CSYNC (void)
56{
57 int _tmp;
58 __asm__ __volatile__ ("cli %0;\n\t"
59 "nop;nop;\n\t"
60 "csync;\n\t"
61 "sti %0;\n\t"
62 :"=d"(_tmp):);
63}
64#elif defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
65static inline void CSYNC (void)
66{
67 int _tmp;
68 __asm__ __volatile__ ("cli %0;\n\t"
69 "csync;\n\t"
70 "sti %0;\n\t"
71 :"=d"(_tmp):);
72}
73#elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
74static inline void CSYNC (void)
75{
4bf3f3cb
RG
76 __asm__ __volatile__ ("nop; nop; nop;\n\t"
77 "ssync;\n\t"
78 ::);
1394f032
BW
79}
80#elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
81static inline void CSYNC (void)
82{
83 __asm__ __volatile__ ("csync;\n\t");
84}
85#endif
86
4bf3f3cb
RG
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
1394f032
BW
112#endif /* __ASSEMBLY__ */
113
114#endif /* _BLACKFIN_H_ */
This page took 0.124715 seconds and 5 git commands to generate.