mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
net: stmmac: dwmac-qcom-ethqos: Log more errors in probe
These are useful to see when debugging a probe failure. Signed-off-by: Andrew Halaney <ahalaney@redhat.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b2f3d915b4
commit
27381e72a2
1 changed files with 10 additions and 4 deletions
|
@ -706,7 +706,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
|
|||
|
||||
ret = stmmac_get_platform_resources(pdev, &stmmac_res);
|
||||
if (ret)
|
||||
return ret;
|
||||
return dev_err_probe(dev, ret,
|
||||
"Failed to get platform resources\n");
|
||||
|
||||
plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
|
||||
if (IS_ERR(plat_dat)) {
|
||||
|
@ -734,13 +735,16 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
|
|||
ethqos->configure_func = ethqos_configure_sgmii;
|
||||
break;
|
||||
default:
|
||||
dev_err(dev, "Unsupported phy mode %s\n",
|
||||
phy_modes(ethqos->phy_mode));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ethqos->pdev = pdev;
|
||||
ethqos->rgmii_base = devm_platform_ioremap_resource_byname(pdev, "rgmii");
|
||||
if (IS_ERR(ethqos->rgmii_base))
|
||||
return PTR_ERR(ethqos->rgmii_base);
|
||||
return dev_err_probe(dev, PTR_ERR(ethqos->rgmii_base),
|
||||
"Failed to map rgmii resource\n");
|
||||
|
||||
ethqos->mac_base = stmmac_res.addr;
|
||||
|
||||
|
@ -752,7 +756,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
|
|||
|
||||
ethqos->link_clk = devm_clk_get(dev, data->link_clk_name ?: "rgmii");
|
||||
if (IS_ERR(ethqos->link_clk))
|
||||
return PTR_ERR(ethqos->link_clk);
|
||||
return dev_err_probe(dev, PTR_ERR(ethqos->link_clk),
|
||||
"Failed to get link_clk\n");
|
||||
|
||||
ret = ethqos_clks_config(ethqos, true);
|
||||
if (ret)
|
||||
|
@ -764,7 +769,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
|
|||
|
||||
ethqos->serdes_phy = devm_phy_optional_get(dev, "serdes");
|
||||
if (IS_ERR(ethqos->serdes_phy))
|
||||
return PTR_ERR(ethqos->serdes_phy);
|
||||
return dev_err_probe(dev, PTR_ERR(ethqos->serdes_phy),
|
||||
"Failed to get serdes phy\n");
|
||||
|
||||
ethqos->speed = SPEED_1000;
|
||||
ethqos_update_link_clk(ethqos, SPEED_1000);
|
||||
|
|
Loading…
Add table
Reference in a new issue