xref: /linux/arch/sh/include/asm/bl_bit_32.h (revision da1d9caf95def6f0320819cf941c9fd1069ba9e1)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SH_BL_BIT_32_H
3 #define __ASM_SH_BL_BIT_32_H
4 
5 static inline void set_bl_bit(void)
6 {
7 	unsigned long __dummy0, __dummy1;
8 
9 	__asm__ __volatile__ (
10 		"stc	sr, %0\n\t"
11 		"or	%2, %0\n\t"
12 		"and	%3, %0\n\t"
13 		"ldc	%0, sr\n\t"
14 		: "=&r" (__dummy0), "=r" (__dummy1)
15 		: "r" (0x10000000), "r" (0xffffff0f)
16 		: "memory"
17 	);
18 }
19 
20 static inline void clear_bl_bit(void)
21 {
22 	unsigned long __dummy0, __dummy1;
23 
24 	__asm__ __volatile__ (
25 		"stc	sr, %0\n\t"
26 		"and	%2, %0\n\t"
27 		"ldc	%0, sr\n\t"
28 		: "=&r" (__dummy0), "=r" (__dummy1)
29 		: "1" (~0x10000000)
30 		: "memory"
31 	);
32 }
33 
34 #endif /* __ASM_SH_BL_BIT_32_H */
35