irq.h 1008 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright 2004-2009 Analog Devices Inc.
  3. * 2003 HuTao
  4. * 2002 Arcturus Networks Inc. (www.arcturusnetworks.com
  5. * Ted Ma <mated@sympatico.ca>
  6. *
  7. * Licensed under the GPL-2
  8. */
  9. #ifndef _BFIN_IRQ_H_
  10. #define _BFIN_IRQ_H_
  11. #include <linux/irqflags.h>
  12. /* IRQs that may be used by external irq_chip controllers */
  13. #define NR_SPARE_IRQS 32
  14. #include <mach/anomaly.h>
  15. /* SYS_IRQS and NR_IRQS are defined in <mach-bf5xx/irq.h> */
  16. #include <mach/irq.h>
  17. /*
  18. * pm save bfin pint registers
  19. */
  20. struct bfin_pm_pint_save {
  21. u32 mask_set;
  22. u32 assign;
  23. u32 edge_set;
  24. u32 invert_set;
  25. };
  26. #if ANOMALY_05000244 && defined(CONFIG_BFIN_ICACHE)
  27. # define NOP_PAD_ANOMALY_05000244 "nop; nop;"
  28. #else
  29. # define NOP_PAD_ANOMALY_05000244
  30. #endif
  31. #define idle_with_irq_disabled() \
  32. __asm__ __volatile__( \
  33. NOP_PAD_ANOMALY_05000244 \
  34. ".align 8;" \
  35. "sti %0;" \
  36. "idle;" \
  37. : \
  38. : "d" (bfin_irq_flags) \
  39. )
  40. #include <asm-generic/irq.h>
  41. #endif /* _BFIN_IRQ_H_ */