@@ -520,6 +520,15 @@ unlock:
return ret;
}
+int irq_set_type(unsigned int irq, unsigned int type)
+{
+ /* Setup the IRQ type */
+ if ( irq < NR_LOCAL_IRQS )
+ return irq_local_set_type(irq, type);
+ else
+ return irq_set_spi_type(irq, type);
+}
+
int platform_get_irq(const struct dt_device_node *device, int index)
{
struct dt_irq dt_irq;
@@ -533,12 +542,7 @@ int platform_get_irq(const struct dt_device_node *device, int index)
irq = dt_irq.irq;
type = dt_irq.type;
- /* Setup the IRQ type */
- if ( irq < NR_LOCAL_IRQS )
- res = irq_local_set_type(irq, type);
- else
- res = irq_set_spi_type(irq, type);
-
+ res = irq_set_type(irq, type);
if ( res )
return -1;
@@ -47,6 +47,7 @@ void arch_move_irqs(struct vcpu *v);
/* Set IRQ type for an SPI */
int irq_set_spi_type(unsigned int spi, unsigned int type);
+int irq_set_type(unsigned int irq, unsigned int type);
int platform_get_irq(const struct dt_device_node *device, int index);
void irq_set_affinity(struct irq_desc *desc, const cpumask_t *cpu_mask);
When parsing a PCI nodes interrupt-map property I need to be able to configure an interrupt which has no associated dt_device_node. So refactor the code and expose. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- xen/arch/arm/irq.c | 16 ++++++++++------ xen/include/asm-arm/irq.h | 1 + 2 files changed, 11 insertions(+), 6 deletions(-)