aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev/mpc8xx_pic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/mpc8xx_pic.c')
-rw-r--r--arch/powerpc/sysdev/mpc8xx_pic.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c
index 565156ae65b..7aa4ff5f5ec 100644
--- a/arch/powerpc/sysdev/mpc8xx_pic.c
+++ b/arch/powerpc/sysdev/mpc8xx_pic.c
@@ -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);