bl_bit_32.h 639 B

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