TI DaVinci EMAC: Fix MDIO bus frequency configuration
authorNageswari Srinivasan <nageswari@ti.com>
Sat, 19 Dec 2009 04:21:21 +0000 (20:21 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Dec 2009 04:21:21 +0000 (20:21 -0800)
There was a typo in "if condition" checking for validity of MDIO
bus frequency passed as part of platform data. Bitwise AND was
being used instead of a Logical AND.

Tested on: DM6467 EVM

Signed-off-by: Nageswari Srinivasan <nageswari@ti.com>
Acked-by: Anant Gole <anantgole@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/davinci_emac.c

index 8edac8915ea8ee27e3c14f4511bda8cb80d9654c..34e03104c3c16de1d7f9ebcd709caf110eff3112 100644 (file)
@@ -2272,7 +2272,7 @@ static int emac_mii_reset(struct mii_bus *bus)
        unsigned int clk_div;
        int mdio_bus_freq = emac_bus_frequency;
 
-       if (mdio_max_freq & mdio_bus_freq)
+       if (mdio_max_freq && mdio_bus_freq)
                clk_div = ((mdio_bus_freq / mdio_max_freq) - 1);
        else
                clk_div = 0xFF;