htirq.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef LINUX_HTIRQ_H
  2. #define LINUX_HTIRQ_H
  3. struct pci_dev;
  4. struct irq_data;
  5. struct ht_irq_msg {
  6. u32 address_lo; /* low 32 bits of the ht irq message */
  7. u32 address_hi; /* high 32 bits of the it irq message */
  8. };
  9. typedef void (ht_irq_update_t)(struct pci_dev *dev, int irq,
  10. struct ht_irq_msg *msg);
  11. struct ht_irq_cfg {
  12. struct pci_dev *dev;
  13. /* Update callback used to cope with buggy hardware */
  14. ht_irq_update_t *update;
  15. unsigned pos;
  16. unsigned idx;
  17. struct ht_irq_msg msg;
  18. };
  19. /* Helper functions.. */
  20. void fetch_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg);
  21. void write_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg);
  22. void mask_ht_irq(struct irq_data *data);
  23. void unmask_ht_irq(struct irq_data *data);
  24. /* The arch hook for getting things started */
  25. int arch_setup_ht_irq(int idx, int pos, struct pci_dev *dev,
  26. ht_irq_update_t *update);
  27. void arch_teardown_ht_irq(unsigned int irq);
  28. /* For drivers of buggy hardware */
  29. int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update);
  30. #endif /* LINUX_HTIRQ_H */