diff options
author | Andriy Skulysh <askulysh@gmail.com> | 2006-09-27 03:20:22 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 03:20:22 -0400 |
commit | 3aa770e7972723f479122cf66b529017d2175289 (patch) | |
tree | f70d870381cec8034693704e346c53b311db688f /include/asm-sh/system.h | |
parent | ef48e8e3498605351f91f195cc9af0ef981b0dde (diff) |
sh: APM/PM support.
This adds some simple PM stubs and the basic APM interfaces,
primarily for use by hp6xx, where the existing userland
expects it.
Signed-off-by: Andriy Skulysh <askulysh@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/system.h')
-rw-r--r-- | include/asm-sh/system.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index bd7dc0554b11..477422afeb0d 100644 --- a/include/asm-sh/system.h +++ b/include/asm-sh/system.h | |||
@@ -172,6 +172,31 @@ static __inline__ void local_irq_disable(void) | |||
172 | : "memory"); | 172 | : "memory"); |
173 | } | 173 | } |
174 | 174 | ||
175 | static __inline__ void set_bl_bit(void) | ||
176 | { | ||
177 | unsigned long __dummy0, __dummy1; | ||
178 | |||
179 | __asm__ __volatile__ ("stc sr, %0\n\t" | ||
180 | "or %2, %0\n\t" | ||
181 | "and %3, %0\n\t" | ||
182 | "ldc %0, sr" | ||
183 | : "=&r" (__dummy0), "=r" (__dummy1) | ||
184 | : "r" (0x10000000), "r" (0xffffff0f) | ||
185 | : "memory"); | ||
186 | } | ||
187 | |||
188 | static __inline__ void clear_bl_bit(void) | ||
189 | { | ||
190 | unsigned long __dummy0, __dummy1; | ||
191 | |||
192 | __asm__ __volatile__ ("stc sr, %0\n\t" | ||
193 | "and %2, %0\n\t" | ||
194 | "ldc %0, sr" | ||
195 | : "=&r" (__dummy0), "=r" (__dummy1) | ||
196 | : "1" (~0x10000000) | ||
197 | : "memory"); | ||
198 | } | ||
199 | |||
175 | #define local_save_flags(x) \ | 200 | #define local_save_flags(x) \ |
176 | __asm__("stc sr, %0; and #0xf0, %0" : "=&z" (x) :/**/: "memory" ) | 201 | __asm__("stc sr, %0; and #0xf0, %0" : "=&z" (x) :/**/: "memory" ) |
177 | 202 | ||