Skip to content

Commit

Permalink
xgene: Always get clk source, but ignore if it's missing for SGMII ports
Browse files Browse the repository at this point in the history
Even the driver doesn't do anything with the clk source for SGMII
ports it needs to be enabled by doing a devm_clk_get(), if there is
a clk source in DT.

Fixes: 0db0109 ('xgene: Don't fail probe, if there is no clk resource for SGMII interfaces')
Signed-off-by: Thomas Bogendoerfer <[email protected]>
Tested-by: Laura Abbott <[email protected]>
Acked-by: Iyappan Subramanian <[email protected]>
Tested-by: Will Deacon <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Thomas Bogendoerfer authored and davem330 committed Aug 4, 2017
1 parent b6bd53f commit aaf83ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/apm/xgene/xgene_enet_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1785,9 +1785,9 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata)

xgene_enet_gpiod_get(pdata);

if (pdata->phy_mode != PHY_INTERFACE_MODE_SGMII) {
pdata->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(pdata->clk)) {
pdata->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(pdata->clk)) {
if (pdata->phy_mode != PHY_INTERFACE_MODE_SGMII) {
/* Abort if the clock is defined but couldn't be
* retrived. Always abort if the clock is missing on
* DT system as the driver can't cope with this case.
Expand Down

0 comments on commit aaf83ae

Please sign in to comment.