diff options
Diffstat (limited to 'include/irq.h')
-rw-r--r-- | include/irq.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/irq.h b/include/irq.h index 01ded64f16..8b4e2ecfc0 100644 --- a/include/irq.h +++ b/include/irq.h @@ -8,6 +8,17 @@ #ifndef __irq_H #define __irq_H +/* + * Interrupt controller types available. You can find a particular one with + * irq_first_device_type() + */ +enum irq_dev_t { + X86_IRQT_BASE, /* Base controller */ + X86_IRQT_ITSS, /* ITSS controller, e.g. on APL */ + X86_IRQT_ACPI_GPE, /* ACPI General-Purpose Events controller */ + SANDBOX_IRQT_BASE, /* Sandbox testing */ +}; + /** * struct irq_ops - Operations for the IRQ */ @@ -85,4 +96,16 @@ int irq_snapshot_polarities(struct udevice *dev); */ int irq_restore_polarities(struct udevice *dev); +/** + * irq_first_device_type() - Get a particular interrupt controller + * + * On success this returns an activated interrupt device. + * + * @type: Type to find + * @devp: Returns the device, if found + * @return 0 if OK, -ENODEV if not found, other -ve error if uclass failed to + * probe + */ +int irq_first_device_type(enum irq_dev_t type, struct udevice **devp); + #endif |