@@ -1058,8 +1058,14 @@ int dt_irq_translate(const struct dt_raw_irq *raw,
struct dt_irq *out_irq)
{
ASSERT(dt_irq_xlate != NULL);
+ ASSERT(dt_interrupt_controller != NULL);
- /* TODO: Retrieve the right irq_xlate. This is only work for the gic */
+ /*
+ * TODO: Retrieve the right irq_xlate. This is only works for the primary
+ * interrupt controller.
+ */
+ if ( raw->controller != dt_interrupt_controller )
+ return -EINVAL;
return dt_irq_xlate(raw->specifier, raw->size,
&out_irq->irq, &out_irq->type);