mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
drivers: misc: irq-uclass: Update irq_get_by_index
Support reading the "interrupts" property from the devicetree in case the "interrupts-extended" property isn't found. As the "interrupts" property is commonly used, this allows to parse all existing FDT and makes irq_get_by_index() more useful. The "interrupts" property doesn't contain a phandle as "interrupts-extended" does, so implement a new method to locate the interrupt-parent called irq_get_interrupt_parent(). TEST: Read the interrupts from the GIC node for ACPI MADT generation. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Moritz Fischer <moritzf@google.com>
This commit is contained in:
committed by
Tom Rini
parent
df8d759d9d
commit
f116feadea
@@ -200,6 +200,20 @@ int irq_restore_polarities(struct udevice *dev);
|
||||
*/
|
||||
int irq_read_and_clear(struct irq *irq);
|
||||
|
||||
/**
|
||||
* irq_get_interrupt_parent() - returns the interrupt parent
|
||||
*
|
||||
* Walks the devicetree and returns the interrupt parent's ofnode
|
||||
* for the specified device.
|
||||
*
|
||||
* @dev: device
|
||||
* @interrupt_parent: The interrupt parent's ofnode'
|
||||
* Return: 0 success, or error value
|
||||
*
|
||||
*/
|
||||
int irq_get_interrupt_parent(const struct udevice *dev,
|
||||
struct udevice **interrupt_parent);
|
||||
|
||||
struct phandle_2_arg;
|
||||
/**
|
||||
* irq_get_by_phandle() - Get an irq by its phandle information (of-platadata)
|
||||
|
||||
Reference in New Issue
Block a user