From: Andy Fleming Date: Wed, 4 Feb 2009 00:26:41 +0000 (-0600) Subject: tsec: Fix a bug in soft-resetting X-Git-Tag: v2009.03-rc1~92 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9e5be8214ba751436e57c3be044bf6dccb9a6687;p=u-boot tsec: Fix a bug in soft-resetting 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 Signed-off-by: Ben Warren --- diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index dc90f23859..9edba6a7b7 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) \