summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>2015-11-26 08:35:42 +0100
committerDavid S. Miller <davem@davemloft.net>2015-11-30 14:52:51 -0500
commit61adcc03bd010a494664dc46049dc8da245bc277 (patch)
tree873cffec85ca6b0ffaace9da0e447ad21bf628f0
parentac316c783d5bef4240db3de000c1bc74481df88e (diff)
downloadop-kernel-dev-61adcc03bd010a494664dc46049dc8da245bc277.zip
op-kernel-dev-61adcc03bd010a494664dc46049dc8da245bc277.tar.gz
stmmac: fix csr clock divisor for 300MHz
This patch is to fix the csr clock in case of 300MHz is provided. Reported-by: Kent Borg <Kent.Borg@csr.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index e3d96f2..6256b32 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -185,7 +185,7 @@ static void stmmac_clk_csr_set(struct stmmac_priv *priv)
priv->clk_csr = STMMAC_CSR_100_150M;
else if ((clk_rate >= CSR_F_150M) && (clk_rate < CSR_F_250M))
priv->clk_csr = STMMAC_CSR_150_250M;
- else if ((clk_rate >= CSR_F_250M) && (clk_rate < CSR_F_300M))
+ else if ((clk_rate >= CSR_F_250M) && (clk_rate <= CSR_F_300M))
priv->clk_csr = STMMAC_CSR_250_300M;
}
}
OpenPOWER on IntegriCloud