diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2012-04-18 19:48:22 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-19 20:09:06 -0400 |
commit | 31ea38eefea0a8b40d1ef65842ed66847b13979f (patch) | |
tree | ce41d4f60486e6ce752888e73540386f9488a073 /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |
parent | 0f1f88a875bd6c6725501183fabeb99a70c35757 (diff) | |
download | blackbird-op-linux-31ea38eefea0a8b40d1ef65842ed66847b13979f.tar.gz blackbird-op-linux-31ea38eefea0a8b40d1ef65842ed66847b13979f.zip |
stmmac: do not fail when probe and there is no csr clk defined
On some platforms, for example where we are doing the bring-up,
the csr clock is not passed from the framework and the Ethernet
device driver is failing when it can work w/o any issues and
using the default values. So this patch just warnings the case
of the csr clock cannot be acquired but w/o failing the probe
step. I have just tested it on ST STiH415 SoC (ARM).
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index efc42e1f9b4a..1a4cf8128f91 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -168,6 +168,9 @@ static void stmmac_clk_csr_set(struct stmmac_priv *priv) #ifdef CONFIG_HAVE_CLK u32 clk_rate; + if (IS_ERR(priv->stmmac_clk)) + return; + clk_rate = clk_get_rate(priv->stmmac_clk); /* Platform provided default clk_csr would be assumed valid @@ -1923,7 +1926,7 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device, } if (stmmac_clk_get(priv)) - goto error; + pr_warning("%s: warning: cannot get CSR clock\n", __func__); /* If a specific clk_csr value is passed from the platform * this means that the CSR Clock Range selection cannot be |