Dear Olav Morken, In message <[EMAIL PROTECTED]> you wrote: > 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 100mbps mode. > > Signed-off-by: Gunnar Rangoy <[EMAIL PROTECTED]> > Signed-off-by: Paul Driveklepp <[EMAIL PROTECTED]> > Signed-off-by: Olav Morken <[EMAIL PROTECTED]> > --- > drivers/net/macb.c | 23 ++++++++++++++++++++++- > 1 files changed, 22 insertions(+), 1 deletions(-) > > diff --git a/drivers/net/macb.c b/drivers/net/macb.c > index 08bebf7..4fef374 100644 > --- a/drivers/net/macb.c > +++ b/drivers/net/macb.c > @@ -296,8 +296,29 @@ static void macb_phy_reset(struct macb_device *macb) > struct eth_device *netdev = &macb->netdev; > int i; > u16 status, adv; > + int rmii_mode; > + unsigned min_hz; > + > +#ifdef CONFIG_RMII > + rmii_mode = 1; > + min_hz = 50000000; > +#else > + rmii_mode = 0; > + min_hz = 25000000; > +#endif > + > + adv = ADVERTISE_CSMA | ADVERTISE_ALL ; > + > + if (get_hsb_clk_rate() < min_hz) { > + printf("%s: HSB clock < %u MHz in %s mode - " > + "disabling 100mbit.\n", netdev->name, min_hz / 1000000,
Use str_mhz() to round and print the frequency. And please use "Mbit/s" or "Mbps" instead of "mbit". See http://en.wikipedia.org/wiki/Mbps#Megabit_per_second Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED] "I've finally learned what `upward compatible' means. It means we get to keep all our old mistakes." - Dennie van Tassel _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot