From patchwork Wed Mar 11 00:21:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 24271 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 42F7BDE2F7 for ; Wed, 11 Mar 2009 11:22:15 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CA93BDE118 for ; Wed, 11 Mar 2009 11:21:46 +1100 (EST) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id n2B0LYhP016153; Tue, 10 Mar 2009 19:21:35 -0500 Subject: Re: RX problem in ibm_newemac driver From: Benjamin Herrenschmidt To: Felix Radensky In-Reply-To: <49B6FA3B.8030509@embedded-sol.com> References: <49B6C4A2.8060302@embedded-sol.com> <1236718202.7086.10.camel@pasglop> <49B6E658.4010900@embedded-sol.com> <1236725832.7086.21.camel@pasglop> <49B6FA3B.8030509@embedded-sol.com> Date: Wed, 11 Mar 2009 11:21:34 +1100 Message-Id: <1236730894.7086.29.camel@pasglop> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 Cc: netdev , linuxppc-dev list X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org On Wed, 2009-03-11 at 01:39 +0200, Felix Radensky wrote: > Benjamin Herrenschmidt wrote: > > On Wed, 2009-03-11 at 00:14 +0200, Felix Radensky wrote: > > > >> Yes, seems logical. U-boot has code to enable and disable loopback clock > >> for 440SPE, 440EPX,440GRX,405EX, 460EX and 460GT. > >> > >> I can test patches on my board. Alternatively, I can try something myself > >> if you can provide some guidance. I guess you are referring to the code > >> using > >> EMAC_FTR_440GX_PHY_CLK_FIX and EMAC_FTR_440EP_PHY_CLK_FIX. > >> > > > > It would be nice if you could try something as I don't have anything to > > test here. > > > > And yes, it's probably one of those 2 fixes that need to be extended. > > > > I'll have a look later today if I can find the 405EXr user manual and > > give you more precise guidance. >From the doc, it looks like it needs the 440 type workaround (and the 405EX as well). Can you try this patch: emac: Fix clock control for 405EX and 405EXr chips The EMAC variant in the 405EX and 405EXr chips needs the "440EP" type clock control workaround to avoid lockups of the Rx side during reset. Signed-off-by: Benjamin Herrenschmidt Index: linux-work/drivers/net/ibm_newemac/core.c =================================================================== --- linux-work.orig/drivers/net/ibm_newemac/core.c 2009-03-11 11:13:37.000000000 +1100 +++ linux-work/drivers/net/ibm_newemac/core.c 2009-03-11 11:14:00.000000000 +1100 @@ -2594,6 +2594,9 @@ static int __devinit emac_init_config(st if (of_device_is_compatible(np, "ibm,emac-460ex") || of_device_is_compatible(np, "ibm,emac-460gt")) dev->features |= EMAC_FTR_460EX_PHY_CLK_FIX; + if (of_device_is_compatible(np, "ibm,emac-405ex") || + of_device_is_compatible(np, "ibm,emac-405exr")) + dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX; } else if (of_device_is_compatible(np, "ibm,emac4")) { dev->features |= EMAC_FTR_EMAC4; if (of_device_is_compatible(np, "ibm,emac-440gx"))