Commit 8a9e90a1 authored by Michal Simek's avatar Michal Simek

microblaze: intc: Using irqchip

- Move init_IRQ to irq.c
- Use IRQCHIP_DECLARE macro
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent 968674bd
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "../../drivers/irqchip/irqchip.h"
static unsigned int intc_baseaddr; static unsigned int intc_baseaddr;
...@@ -115,13 +116,10 @@ static const struct irq_domain_ops xintc_irq_domain_ops = { ...@@ -115,13 +116,10 @@ static const struct irq_domain_ops xintc_irq_domain_ops = {
.map = xintc_map, .map = xintc_map,
}; };
void __init init_IRQ(void) static int __init xilinx_intc_of_init(struct device_node *intc,
struct device_node *parent)
{ {
u32 nr_irq, intr_mask; u32 nr_irq, intr_mask;
struct device_node *intc = NULL;
intc = of_find_compatible_node(NULL, NULL, "xlnx,xps-intc-1.00.a");
BUG_ON(!intc);
intc_baseaddr = be32_to_cpup(of_get_property(intc, "reg", NULL)); intc_baseaddr = be32_to_cpup(of_get_property(intc, "reg", NULL));
intc_baseaddr = (unsigned long) ioremap(intc_baseaddr, PAGE_SIZE); intc_baseaddr = (unsigned long) ioremap(intc_baseaddr, PAGE_SIZE);
...@@ -155,4 +153,8 @@ void __init init_IRQ(void) ...@@ -155,4 +153,8 @@ void __init init_IRQ(void)
(void *)intr_mask); (void *)intr_mask);
irq_set_default_host(root_domain); irq_set_default_host(root_domain);
return 0;
} }
IRQCHIP_DECLARE(xilinx_intc, "xlnx,xps-intc-1.00.a", xilinx_intc_of_init);
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip.h>
#include <linux/of_irq.h> #include <linux/of_irq.h>
static u32 concurrent_irq; static u32 concurrent_irq;
...@@ -44,3 +45,9 @@ void __irq_entry do_IRQ(struct pt_regs *regs) ...@@ -44,3 +45,9 @@ void __irq_entry do_IRQ(struct pt_regs *regs)
set_irq_regs(old_regs); set_irq_regs(old_regs);
trace_hardirqs_on(); trace_hardirqs_on();
} }
void __init init_IRQ(void)
{
/* process the entire interrupt tree in one go */
irqchip_init();
}
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