[ar71xx] init mac address on the WRT160NL board (thanks to Gerry Rozema for testing)
[openwrt.git] / target / linux / coldfire / patches / 020-mcfv4e_inline_memory_params.patch
1 From 3f698a1cf08cc02911cdb2ca3217be77eeba794b Mon Sep 17 00:00:00 2001
2 From: Kurt Mahan <kmahan@freescale.com>
3 Date: Tue, 27 Nov 2007 23:17:53 -0700
4 Subject: [PATCH] Change inline assembly memory params.
5
6 For various routines change how the assembly memory pointer
7 is passed in.
8
9 LTIBName: mcfv4e-inline-memory-params
10 Signed-off-by: Kurt Mahan <kmahan@freescale.com>
11 ---
12 include/asm-m68k/bitops.h | 68 ++++++++++++++++++++++++++++++++++++++++++++-
13 1 files changed, 67 insertions(+), 1 deletions(-)
14
15 --- a/include/asm-m68k/bitops.h
16 +++ b/include/asm-m68k/bitops.h
17 @@ -465,7 +465,7 @@ static inline int ext2_find_next_bit(con
18 __constant_coldfire_test_and_set_bit(nr, vaddr) : \
19 __generic_coldfire_test_and_set_bit(nr, vaddr))
20
21 -
22 +#if 0
23 static __inline__ int __constant_coldfire_test_and_set_bit(int nr,
24 volatile void *vaddr)
25 {
26 @@ -477,6 +477,17 @@ static __inline__ int __constant_coldfir
27 : "di" (nr & 7));
28 return retval;
29 }
30 +#else
31 +static __inline__ int __constant_coldfire_test_and_set_bit(int nr,volatile void * vaddr)
32 +{
33 + char retval;
34 + volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3];
35 + __asm__ __volatile__ ("bset %2,(%4); sne %0"
36 + : "=d" (retval), "=m" (*p)
37 + : "di" (nr & 7), "m" (*p), "a" (p));
38 + return retval;
39 +}
40 +#endif
41
42 static __inline__ int __generic_coldfire_test_and_set_bit(int nr,
43 volatile void *vaddr)
44 @@ -496,6 +507,7 @@ static __inline__ int __generic_coldfire
45 __constant_coldfire_set_bit(nr, vaddr) : \
46 __generic_coldfire_set_bit(nr, vaddr))
47
48 +#if 0
49 static __inline__ void __constant_coldfire_set_bit(int nr,
50 volatile void *vaddr)
51 {
52 @@ -503,6 +515,14 @@ static __inline__ void __constant_coldfi
53 __asm__ __volatile__ ("bset %1,%0"
54 : "+QUd" (*p) : "di" (nr & 7));
55 }
56 +#else
57 +static __inline__ void __constant_coldfire_set_bit(int nr, volatile void * vaddr)
58 +{
59 + volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3];
60 + __asm__ __volatile__ ("bset %1,(%3)"
61 + : "=m" (*p) : "di" (nr & 7), "m" (*p), "a" (p));
62 +}
63 +#endif
64
65 static __inline__ void __generic_coldfire_set_bit(int nr, volatile void *vaddr)
66 {
67 @@ -518,6 +538,7 @@ static __inline__ void __generic_coldfir
68 __constant_coldfire_test_and_clear_bit(nr, vaddr) : \
69 __generic_coldfire_test_and_clear_bit(nr, vaddr))
70
71 +#if 0
72 static __inline__ int __constant_coldfire_test_and_clear_bit(int nr,
73 volatile void *vaddr)
74 {
75 @@ -530,6 +551,19 @@ static __inline__ int __constant_coldfir
76
77 return retval;
78 }
79 +#else
80 +static __inline__ int __constant_coldfire_test_and_clear_bit(int nr, volatile void *vaddr)
81 +{
82 + char retval;
83 + volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3];
84 +
85 + __asm__ __volatile__ ("bclr %2,(%4); sne %0"
86 + : "=d" (retval), "=m" (*p)
87 + : "id" (nr & 7), "m" (*p), "a" (p));
88 +
89 + return retval;
90 +}
91 +#endif
92
93 static __inline__ int __generic_coldfire_test_and_clear_bit(int nr,
94 volatile void *vaddr)
95 @@ -556,6 +590,7 @@ static __inline__ int __generic_coldfire
96 __constant_coldfire_clear_bit(nr, vaddr) : \
97 __generic_coldfire_clear_bit(nr, vaddr))
98
99 +#if 0
100 static __inline__ void __constant_coldfire_clear_bit(int nr,
101 volatile void *vaddr)
102 {
103 @@ -563,6 +598,14 @@ static __inline__ void __constant_coldfi
104 __asm__ __volatile__ ("bclr %1,%0"
105 : "+QUd" (*p) : "id" (nr & 7));
106 }
107 +#else
108 +static __inline__ void __constant_coldfire_clear_bit(int nr, volatile void * vaddr)
109 +{
110 + volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3];
111 + __asm__ __volatile__ ("bclr %1,(%3)"
112 + : "=m" (*p) : "id" (nr & 7), "m" (*p), "a" (p));
113 +}
114 +#endif
115
116 static __inline__ void __generic_coldfire_clear_bit(int nr,
117 volatile void *vaddr)
118 @@ -579,6 +622,7 @@ static __inline__ void __generic_coldfir
119 __constant_coldfire_test_and_change_bit(nr, vaddr) : \
120 __generic_coldfire_test_and_change_bit(nr, vaddr))
121
122 +#if 0
123 static __inline__ int __constant_coldfire_test_and_change_bit(int nr,
124 volatile void *vaddr)
125 {
126 @@ -591,6 +635,19 @@ static __inline__ int __constant_coldfir
127
128 return retval;
129 }
130 +#else
131 +static __inline__ int __constant_coldfire_test_and_change_bit(int nr, volatile void * vaddr)
132 +{
133 + char retval;
134 + volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3];
135 +
136 + __asm__ __volatile__ ("bchg %2,(%4); sne %0"
137 + : "=d" (retval), "=m" (*p)
138 + : "id" (nr & 7), "m" (*p), "a" (p));
139 +
140 + return retval;
141 +}
142 +#endif
143
144 static __inline__ int __generic_coldfire_test_and_change_bit(int nr,
145 volatile void *vaddr)
146 @@ -612,6 +669,7 @@ static __inline__ int __generic_coldfire
147 __constant_coldfire_change_bit(nr, vaddr) : \
148 __generic_coldfire_change_bit(nr, vaddr))
149
150 +#if 0
151 static __inline__ void __constant_coldfire_change_bit(int nr,
152 volatile void *vaddr)
153 {
154 @@ -619,6 +677,14 @@ static __inline__ void __constant_coldfi
155 __asm__ __volatile__ ("bchg %1,%0"
156 : "+QUd" (*p) : "id" (nr & 7));
157 }
158 +#else
159 +static __inline__ void __constant_coldfire_change_bit(int nr, volatile void * vaddr)
160 +{
161 + volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3];
162 + __asm__ __volatile__ ("bchg %1,(%3)"
163 + : "=m" (*p) : "id" (nr & 7), "m" (*p), "a" (p));
164 +}
165 +#endif
166
167 static __inline__ void __generic_coldfire_change_bit(int nr,
168 volatile void *vaddr)
This page took 0.045517 seconds and 5 git commands to generate.