irq.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file COPYING in the main directory of this archive
  4. * for more details.
  5. *
  6. * Changed by HuTao Apr18, 2003
  7. *
  8. * Copyright was missing when I got the code so took from MIPS arch ...MaTed---
  9. * Copyright (C) 1994 by Waldorf GMBH, written by Ralf Baechle
  10. * Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 by Ralf Baechle
  11. *
  12. * Adapted for BlackFin (ADI) by Ted Ma <mated@sympatico.ca>
  13. * Copyright (c) 2002 Arcturus Networks Inc. (www.arcturusnetworks.com)
  14. * Copyright (c) 2002 Lineo, Inc. <mattw@lineo.com>
  15. */
  16. #ifndef _BFIN_IRQ_H_
  17. #define _BFIN_IRQ_H_
  18. #include <linux/irqflags.h>
  19. /* SYS_IRQS and NR_IRQS are defined in <mach-bf5xx/irq.h> */
  20. #include <mach/irq.h>
  21. /* Xenomai IPIPE helpers */
  22. #define local_irq_restore_hw(x) local_irq_restore(x)
  23. #define local_irq_save_hw(x) local_irq_save(x)
  24. #define local_irq_enable_hw(x) local_irq_enable(x)
  25. #define local_irq_disable_hw(x) local_irq_disable(x)
  26. #define irqs_disabled_hw(x) irqs_disabled(x)
  27. #if ANOMALY_05000244 && defined(CONFIG_BFIN_ICACHE)
  28. # define NOP_PAD_ANOMALY_05000244 "nop; nop;"
  29. #else
  30. # define NOP_PAD_ANOMALY_05000244
  31. #endif
  32. #define idle_with_irq_disabled() \
  33. __asm__ __volatile__( \
  34. NOP_PAD_ANOMALY_05000244 \
  35. ".align 8;" \
  36. "sti %0;" \
  37. "idle;" \
  38. : \
  39. : "d" (bfin_irq_flags) \
  40. )
  41. #include <asm-generic/irq.h>
  42. #endif /* _BFIN_IRQ_H_ */