From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 23 Jan 2009 16:38:56 +0100 Subject: [U-Boot] [PATCH v2 5/9] AVR32: macb - Disable 100mbps if clock is slow In-Reply-To: <7e5f5fd7693284246714c42b6a3014f82f670b82.1232710611.git.gunnar@rangoy.com> References: <7e5f5fd7693284246714c42b6a3014f82f670b82.1232710611.git.gunnar@rangoy.com> Message-ID: <20090123153856.GA16585@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 12:56 Fri 23 Jan , Gunnar Rangoy wrote: > From: Olav Morken > > For 100mbps operation, the ethernet controller requires a 25 MHz clock > in MII mode, and a 50 MHz clock in RMII mode. If the clock is slower, > disable 100 Mbps mode. > > Signed-off-by: Gunnar Rangoy > Signed-off-by: Paul Driveklepp > Signed-off-by: Olav Morken > --- > drivers/net/macb.c | 12 +++++++++++- > 1 files changed, 11 insertions(+), 1 deletions(-) > > diff --git a/drivers/net/macb.c b/drivers/net/macb.c > index 08bebf7..d47a052 100644 > --- a/drivers/net/macb.c > +++ b/drivers/net/macb.c > @@ -297,7 +297,17 @@ static void macb_phy_reset(struct macb_device *macb) > int i; > u16 status, adv; > > - adv = ADVERTISE_CSMA | ADVERTISE_ALL; > + adv = ADVERTISE_CSMA | ADVERTISE_ALL ; ?? > + > +#ifdef CONFIG_MACB_FORCE10M > + printf("%s: 100Mbps is not supported on this board - forcing 10Mbps.\n", > + netdev->name); > + > + adv &= ~ADVERTISE_100FULL; > + adv &= ~ADVERTISE_100HALF; > + adv &= ~ADVERTISE_100BASE4; > +#endif not a fan could you be more specific about the problem? Best Regards, J.