From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Thu, 05 Feb 2009 23:54:50 -0800 Subject: [U-Boot] [PATCH] tsec: Fix a bug in soft-resetting In-Reply-To: <1233707201-12136-1-git-send-email-afleming@freescale.com> References: <1233707201-12136-1-git-send-email-afleming@freescale.com> Message-ID: <498BECCA.8070703@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Andy, Andy Fleming wrote: > SOFT_RESET must be asserted for at least 3 TX clocks. Usually, that's about 30 > clock cycles, so it's been mostly working. But we had no guarantee, and at > slower bitrates, it's just over a microsecond (over 1000 clock cycles). This > enforces a 2 microsecond gap between assertion and deassertion. > > Signed-off-by: Andy Fleming > --- > drivers/net/tsec.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c > index fbc9a6d..4682c8b 100644 > --- a/drivers/net/tsec.c > +++ b/drivers/net/tsec.c > @@ -158,6 +158,7 @@ int tsec_initialize(bd_t * bis, struct tsec_info_struct *tsec_info) > > /* Reset the MAC */ > priv->regs->maccfg1 |= MACCFG1_SOFT_RESET; > + udelay(2); /* Soft Reset must be asserted for 3 TX clocks */ > priv->regs->maccfg1 &= ~(MACCFG1_SOFT_RESET); > > #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \ > Applied to net repo. thanks, Ben