2006-10-04 16:17:01 +07:00
|
|
|
#ifndef LINUX_HTIRQ_H
|
|
|
|
#define LINUX_HTIRQ_H
|
|
|
|
|
2015-04-13 13:11:43 +07:00
|
|
|
struct pci_dev;
|
|
|
|
struct irq_data;
|
|
|
|
|
2006-11-09 08:44:57 +07:00
|
|
|
struct ht_irq_msg {
|
|
|
|
u32 address_lo; /* low 32 bits of the ht irq message */
|
|
|
|
u32 address_hi; /* high 32 bits of the it irq message */
|
|
|
|
};
|
|
|
|
|
2015-04-13 13:11:43 +07:00
|
|
|
typedef void (ht_irq_update_t)(struct pci_dev *dev, int irq,
|
|
|
|
struct ht_irq_msg *msg);
|
|
|
|
|
|
|
|
struct ht_irq_cfg {
|
|
|
|
struct pci_dev *dev;
|
|
|
|
/* Update callback used to cope with buggy hardware */
|
|
|
|
ht_irq_update_t *update;
|
|
|
|
unsigned pos;
|
|
|
|
unsigned idx;
|
|
|
|
struct ht_irq_msg msg;
|
|
|
|
};
|
|
|
|
|
2006-10-04 16:17:01 +07:00
|
|
|
/* Helper functions.. */
|
2006-11-09 08:44:57 +07:00
|
|
|
void fetch_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg);
|
|
|
|
void write_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg);
|
2010-09-28 22:22:09 +07:00
|
|
|
void mask_ht_irq(struct irq_data *data);
|
|
|
|
void unmask_ht_irq(struct irq_data *data);
|
2006-10-04 16:17:01 +07:00
|
|
|
|
|
|
|
/* The arch hook for getting things started */
|
2015-04-13 13:11:43 +07:00
|
|
|
int arch_setup_ht_irq(int idx, int pos, struct pci_dev *dev,
|
|
|
|
ht_irq_update_t *update);
|
|
|
|
void arch_teardown_ht_irq(unsigned int irq);
|
2006-10-04 16:17:01 +07:00
|
|
|
|
2006-11-09 08:44:57 +07:00
|
|
|
/* For drivers of buggy hardware */
|
|
|
|
int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update);
|
|
|
|
|
2006-10-04 16:17:01 +07:00
|
|
|
#endif /* LINUX_HTIRQ_H */
|