hw_irq.h 915 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ASM_SH_HW_IRQ_H
  3. #define __ASM_SH_HW_IRQ_H
  4. #include <linux/init.h>
  5. #include <linux/sh_intc.h>
  6. #include <linux/atomic.h>
  7. extern atomic_t irq_err_count;
  8. struct ipr_data {
  9. unsigned char irq;
  10. unsigned char ipr_idx; /* Index for the IPR registered */
  11. unsigned char shift; /* Number of bits to shift the data */
  12. unsigned char priority; /* The priority */
  13. };
  14. struct ipr_desc {
  15. unsigned long *ipr_offsets;
  16. unsigned int nr_offsets;
  17. struct ipr_data *ipr_data;
  18. unsigned int nr_irqs;
  19. struct irq_chip chip;
  20. };
  21. void register_ipr_controller(struct ipr_desc *);
  22. void __init plat_irq_setup(void);
  23. void __init plat_irq_setup_sh3(void);
  24. void __init plat_irq_setup_pins(int mode);
  25. enum { IRQ_MODE_IRQ, IRQ_MODE_IRQ7654, IRQ_MODE_IRQ3210,
  26. IRQ_MODE_IRL7654_MASK, IRQ_MODE_IRL3210_MASK,
  27. IRQ_MODE_IRL7654, IRQ_MODE_IRL3210 };
  28. #endif /* __ASM_SH_HW_IRQ_H */