License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-2.6-block.git] / include / linux / htirq.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
95d77884
EB
2#ifndef LINUX_HTIRQ_H
3#define LINUX_HTIRQ_H
4
49e07d8f
JL
5struct pci_dev;
6struct irq_data;
7
ec68307c
EB
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
49e07d8f
JL
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
95d77884 25/* Helper functions.. */
ec68307c
EB
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);
e9f7ac66
TG
28void mask_ht_irq(struct irq_data *data);
29void unmask_ht_irq(struct irq_data *data);
95d77884
EB
30
31/* The arch hook for getting things started */
49e07d8f
JL
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);
95d77884 35
43539c38 36/* For drivers of buggy hardware */
43539c38
EB
37int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update);
38
95d77884 39#endif /* LINUX_HTIRQ_H */