powerpc/85xx: Don't reset the MPIC for CAMP mode on MPC8572DS
authorHaiying Wang <Haiying.Wang@freescale.com>
Thu, 13 Nov 2008 13:46:12 +0000 (07:46 -0600)
committerKumar Gala <galak@kernel.crashing.org>
Wed, 3 Dec 2008 16:51:01 +0000 (10:51 -0600)
The flag MPIC_WANTS_RESET shouldn't be set if we are doing cooperative
asymmetric MP.  The second linux shouldn't reset the pic or the first
one gets very confused.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/platforms/85xx/mpc85xx_ds.c

index 613bf8c2e30d988b3fac38c2f0297a944551a46f..a8301c8ad5376bb6487f7f968de2f70a3565f91a 100644 (file)
@@ -63,6 +63,7 @@ void __init mpc85xx_ds_pic_init(void)
        struct device_node *cascade_node = NULL;
        int cascade_irq;
 #endif
+       unsigned long root = of_get_flat_dt_root();
 
        np = of_find_node_by_type(NULL, "open-pic");
        if (np == NULL) {
@@ -76,11 +77,19 @@ void __init mpc85xx_ds_pic_init(void)
                return;
        }
 
-       mpic = mpic_alloc(np, r.start,
+       if (of_flat_dt_is_compatible(root, "fsl,MPC8572DS-CAMP")) {
+               mpic = mpic_alloc(np, r.start,
+                       MPIC_PRIMARY |
+                       MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS,
+                       0, 256, " OpenPIC  ");
+       } else {
+               mpic = mpic_alloc(np, r.start,
                          MPIC_PRIMARY | MPIC_WANTS_RESET |
                          MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS |
                          MPIC_SINGLE_DEST_CPU,
                        0, 256, " OpenPIC  ");
+       }
+
        BUG_ON(mpic == NULL);
        of_node_put(np);