Commit f9c4171e authored by Nageswari Srinivasan's avatar Nageswari Srinivasan Committed by David S. Miller

TI DaVinci EMAC: Fix MDIO bus frequency configuration

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: default avatarNageswari Srinivasan <nageswari@ti.com>
Acked-by: default avatarAnant Gole <anantgole@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 70abc8cb
...@@ -2272,7 +2272,7 @@ static int emac_mii_reset(struct mii_bus *bus) ...@@ -2272,7 +2272,7 @@ static int emac_mii_reset(struct mii_bus *bus)
unsigned int clk_div; unsigned int clk_div;
int mdio_bus_freq = emac_bus_frequency; 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); clk_div = ((mdio_bus_freq / mdio_max_freq) - 1);
else else
clk_div = 0xFF; clk_div = 0xFF;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment