aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-01-23 19:30:04 -0500
committerDavid S. Miller <davem@davemloft.net>2006-01-23 19:30:04 -0500
commit40727198bfb2ce5842a6e8c7f89cf8a40ff7bf14 (patch)
tree1e19997075ecd5cc46de631bd8342cca1f559974 /arch/powerpc
parent8ae55f0489d9a3446fcdaf4ffedda249234b8572 (diff)
[SUNGEM]: Make PM of PHYs more reliable (#2)
On my latest laptop, I've had occasional PHY dead on wakeup from sleep... the PHY would be totally unresponsive even to toggling the hard reset line until the machine is powered down... Looking closely at the code, I found some possible issues in the way we setup the MDIO lines during suspend along with slight divergences from what Darwin does when resetting it that may explain the problem. That patch change these and the problem appear to be gone for me at least... I also fixed an mdelay -> msleep while I was at it to the pmac feature code that is called when toggling the PHY reset line since sungem doesn't call it in an atomic context anymore. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>b Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/powermac/feature.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index 558dd0692092..2296f3d46ca8 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -910,16 +910,18 @@ core99_gmac_phy_reset(struct device_node *node, long param, long value)
910 macio->type != macio_intrepid) 910 macio->type != macio_intrepid)
911 return -ENODEV; 911 return -ENODEV;
912 912
913 printk(KERN_DEBUG "Hard reset of PHY chip ...\n");
914
913 LOCK(flags); 915 LOCK(flags);
914 MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, KEYLARGO_GPIO_OUTPUT_ENABLE); 916 MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, KEYLARGO_GPIO_OUTPUT_ENABLE);
915 (void)MACIO_IN8(KL_GPIO_ETH_PHY_RESET); 917 (void)MACIO_IN8(KL_GPIO_ETH_PHY_RESET);
916 UNLOCK(flags); 918 UNLOCK(flags);
917 mdelay(10); 919 msleep(10);
918 LOCK(flags); 920 LOCK(flags);
919 MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, /*KEYLARGO_GPIO_OUTPUT_ENABLE | */ 921 MACIO_OUT8(KL_GPIO_ETH_PHY_RESET, /*KEYLARGO_GPIO_OUTPUT_ENABLE | */
920 KEYLARGO_GPIO_OUTOUT_DATA); 922 KEYLARGO_GPIO_OUTOUT_DATA);
921 UNLOCK(flags); 923 UNLOCK(flags);
922 mdelay(10); 924 msleep(10);
923 925
924 return 0; 926 return 0;
925} 927}