]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/powermac/feature.c
[PATCH] powerpc: enable NAP only on cpus who support it to avoid memory corruption
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / powermac / feature.c
index 2296f3d46ca829ac979e92a7af0393bb422d05cf..bbe794891a2076c22dc7b361b79b95451b0b6f1a 100644 (file)
@@ -910,18 +910,16 @@ core99_gmac_phy_reset(struct device_node *node, long param, long value)
            macio->type != macio_intrepid)
                return -ENODEV;
 
-       printk(KERN_DEBUG "Hard reset of PHY chip ...\n");
-
        LOCK(flags);
        MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, KEYLARGO_GPIO_OUTPUT_ENABLE);
        (void)MACIO_IN8(KL_GPIO_ETH_PHY_RESET);
        UNLOCK(flags);
-       msleep(10);
+       mdelay(10);
        LOCK(flags);
        MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, /*KEYLARGO_GPIO_OUTPUT_ENABLE | */
                KEYLARGO_GPIO_OUTOUT_DATA);
        UNLOCK(flags);
-       msleep(10);
+       mdelay(10);
 
        return 0;
 }
@@ -1648,10 +1646,10 @@ static void intrepid_shutdown(struct macio_chip *macio, int sleep_mode)
                  KL0_SCC_CELL_ENABLE);
 
        MACIO_BIC(KEYLARGO_FCR1,
-                 /*KL1_USB2_CELL_ENABLE |*/
                KL1_I2S0_CELL_ENABLE | KL1_I2S0_CLK_ENABLE_BIT |
                KL1_I2S0_ENABLE | KL1_I2S1_CELL_ENABLE |
-               KL1_I2S1_CLK_ENABLE_BIT | KL1_I2S1_ENABLE);
+               KL1_I2S1_CLK_ENABLE_BIT | KL1_I2S1_ENABLE |
+               KL1_EIDE0_ENABLE);
        if (pmac_mb.board_flags & PMAC_MB_MOBILE)
                MACIO_BIC(KEYLARGO_FCR1, KL1_UIDE_RESET_N);
 
@@ -2185,7 +2183,7 @@ static struct pmac_mb_def pmac_mb_defs[] = {
        },
        {       "PowerMac10,1",                 "Mac mini",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
-               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER,
+               PMAC_MB_MAY_SLEEP,
        },
        {       "iMac,1",                       "iMac (first generation)",
                PMAC_TYPE_ORIG_IMAC,            paddington_features,
@@ -2297,11 +2295,11 @@ static struct pmac_mb_def pmac_mb_defs[] = {
        },
        {       "PowerBook5,8",                 "PowerBook G4 15\"",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
-               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+               PMAC_MB_MAY_SLEEP  | PMAC_MB_MOBILE,
        },
        {       "PowerBook5,9",                 "PowerBook G4 17\"",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
-               PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+               PMAC_MB_MAY_SLEEP | PMAC_MB_MOBILE,
        },
        {       "PowerBook6,1",                 "PowerBook G4 12\"",
                PMAC_TYPE_UNKNOWN_INTREPID,     intrepid_features,
@@ -2493,9 +2491,7 @@ found:
                        pmac_mb.model_id = PMAC_TYPE_COMET;
                iounmap(mach_id_ptr);
        }
-#endif /* CONFIG_POWER4 */
 
-#ifdef CONFIG_6xx
        /* Set default value of powersave_nap on machines that support it.
         * It appears that uninorth rev 3 has a problem with it, we don't
         * enable it on those. In theory, the flush-on-lock property is
@@ -2524,10 +2520,11 @@ found:
         * NAP mode
         */
        powersave_lowspeed = 1;
-#endif /* CONFIG_6xx */
-#ifdef CONFIG_POWER4
+
+#else /* CONFIG_POWER4 */
        powersave_nap = 1;
-#endif
+#endif  /* CONFIG_POWER4 */
+
        /* Check for "mobile" machine */
        if (model && (strncmp(model, "PowerBook", 9) == 0
                   || strncmp(model, "iBook", 5) == 0))