]> err.no Git - linux-2.6/blobdiff - arch/powerpc/sysdev/mpc8xx_pic.c
x86: printk kernel version in WARN_ON and other dump_stack users
[linux-2.6] / arch / powerpc / sysdev / mpc8xx_pic.c
index 565156ae65bc68dc0a6a4dae870c17bfa3dc5509..7aa4ff5f5ec8fff069d3805aecce7f0a1eacc5f5 100644 (file)
@@ -22,7 +22,7 @@ extern int cpm_get_irq(struct pt_regs *regs);
 static struct irq_host *mpc8xx_pic_host;
 #define NR_MASK_WORDS   ((NR_IRQS + 31) / 32)
 static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS];
-static sysconf8xx_t    *siu_reg;
+static sysconf8xx_t __iomem *siu_reg;
 
 int cpm_get_irq(struct pt_regs *regs);
 
@@ -159,13 +159,14 @@ static struct irq_host_ops mpc8xx_pic_host_ops = {
 int mpc8xx_pic_init(void)
 {
        struct resource res;
-       struct device_node *np = NULL;
+       struct device_node *np;
        int ret;
 
-       np = of_find_node_by_type(np, "mpc8xx-pic");
-
+       np = of_find_compatible_node(NULL, NULL, "fsl,pq1-pic");
+       if (np == NULL)
+               np = of_find_node_by_type(NULL, "mpc8xx-pic");
        if (np == NULL) {
-               printk(KERN_ERR "Could not find open-pic node\n");
+               printk(KERN_ERR "Could not find fsl,pq1-pic node\n");
                return -ENOMEM;
        }
 
@@ -173,11 +174,9 @@ int mpc8xx_pic_init(void)
        if (ret)
                goto out;
 
-       siu_reg = (void *)ioremap(res.start, res.end - res.start + 1);
-       if (siu_reg == NULL) {
-               ret = -EINVAL;
-               goto out;
-       }
+       siu_reg = ioremap(res.start, res.end - res.start + 1);
+       if (siu_reg == NULL)
+               return -EINVAL;
 
        mpc8xx_pic_host = irq_alloc_host(of_node_get(np), IRQ_HOST_MAP_LINEAR,
                                         64, &mpc8xx_pic_host_ops, 64);