Commit acc900ef authored by Ishizaki Kou's avatar Ishizaki Kou Committed by Paul Mackerras

[POWERPC] Add IRQ remapping hook

This patch adds irq remapping hook. On interrupt mechanism on Beat,
when an irq outlet which has an id which is formerly used is created,
remapping the irq is required.
Signed-off-by: default avatarKou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 5b7c726f
...@@ -604,6 +604,8 @@ unsigned int irq_create_mapping(struct irq_host *host, ...@@ -604,6 +604,8 @@ unsigned int irq_create_mapping(struct irq_host *host,
*/ */
virq = irq_find_mapping(host, hwirq); virq = irq_find_mapping(host, hwirq);
if (virq != IRQ_NONE) { if (virq != IRQ_NONE) {
if (host->ops->remap)
host->ops->remap(host, virq, hwirq);
pr_debug("irq: -> existing mapping on virq %d\n", virq); pr_debug("irq: -> existing mapping on virq %d\n", virq);
return virq; return virq;
} }
......
...@@ -89,6 +89,9 @@ struct irq_host_ops { ...@@ -89,6 +89,9 @@ struct irq_host_ops {
/* Dispose of such a mapping */ /* Dispose of such a mapping */
void (*unmap)(struct irq_host *h, unsigned int virq); void (*unmap)(struct irq_host *h, unsigned int virq);
/* Update of such a mapping */
void (*remap)(struct irq_host *h, unsigned int virq, irq_hw_number_t hw);
/* Translate device-tree interrupt specifier from raw format coming /* Translate device-tree interrupt specifier from raw format coming
* from the firmware to a irq_hw_number_t (interrupt line number) and * from the firmware to a irq_hw_number_t (interrupt line number) and
* type (sense) that can be passed to set_irq_type(). In the absence * type (sense) that can be passed to set_irq_type(). In the absence
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment