irq_domain/c6x: Convert c6x to use generic irq_domain support.
The C6X IRQ support was copied almost verbatim from the PowerPC virtual IRQ code. The PowerPC code was used as the basis for generic irq_domain support, so this patch mostly copies what what done to arch/powerpc by Grant Likely in his irq_domain patch series. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:

zatwierdzone przez
Grant Likely

rodzic
a18dc81bf5
commit
0bd761e1b6
@@ -48,7 +48,7 @@ struct megamod_regs {
|
||||
};
|
||||
|
||||
struct megamod_pic {
|
||||
struct irq_host *irqhost;
|
||||
struct irq_domain *irqhost;
|
||||
struct megamod_regs __iomem *regs;
|
||||
raw_spinlock_t lock;
|
||||
|
||||
@@ -116,7 +116,7 @@ static void megamod_irq_cascade(unsigned int irq, struct irq_desc *desc)
|
||||
}
|
||||
}
|
||||
|
||||
static int megamod_map(struct irq_host *h, unsigned int virq,
|
||||
static int megamod_map(struct irq_domain *h, unsigned int virq,
|
||||
irq_hw_number_t hw)
|
||||
{
|
||||
struct megamod_pic *pic = h->host_data;
|
||||
@@ -136,7 +136,7 @@ static int megamod_map(struct irq_host *h, unsigned int virq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int megamod_xlate(struct irq_host *h, struct device_node *ct,
|
||||
static int megamod_xlate(struct irq_domain *h, struct device_node *ct,
|
||||
const u32 *intspec, unsigned int intsize,
|
||||
irq_hw_number_t *out_hwirq, unsigned int *out_type)
|
||||
|
||||
@@ -148,7 +148,7 @@ static int megamod_xlate(struct irq_host *h, struct device_node *ct,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_host_ops megamod_host_ops = {
|
||||
static struct irq_domain_ops megamod_domain_ops = {
|
||||
.map = megamod_map,
|
||||
.xlate = megamod_xlate,
|
||||
};
|
||||
@@ -223,9 +223,8 @@ static struct megamod_pic * __init init_megamod_pic(struct device_node *np)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pic->irqhost = irq_alloc_host(np, IRQ_HOST_MAP_LINEAR,
|
||||
NR_COMBINERS * 32, &megamod_host_ops,
|
||||
IRQ_UNMAPPED);
|
||||
pic->irqhost = irq_domain_add_linear(np, NR_COMBINERS * 32,
|
||||
&megamod_domain_ops, pic);
|
||||
if (!pic->irqhost) {
|
||||
pr_err("%s: Could not alloc host.\n", np->full_name);
|
||||
goto error_free;
|
||||
|
Reference in New Issue
Block a user