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