aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tbogendoerfer@suse.de>2017-08-03 09:43:14 -0400
committerDavid S. Miller <davem@davemloft.net>2017-08-04 14:30:37 -0400
commitaaf83aecd294fd61db6b34051f718f3e7ea34c22 (patch)
tree1d09a861254d695644481fcc8f9adf17c04d07c3 /drivers
parentb6bd53f9c4e825fca82fe1392157c78443c814ab (diff)
xgene: Always get clk source, but ignore if it's missing for SGMII ports
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: 0db01097cabd ('xgene: Don't fail probe, if there is no clk resource for SGMII interfaces') Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de> Tested-by: Laura Abbott <labbott@redhat.com> Acked-by: Iyappan Subramanian <isubramanian@apm.com> Tested-by: Will Deacon <will.deacon@arm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
index 86058a9f3417..1d307f2def2d 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
@@ -1785,9 +1785,9 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata)
1785 1785
1786 xgene_enet_gpiod_get(pdata); 1786 xgene_enet_gpiod_get(pdata);
1787 1787
1788 if (pdata->phy_mode != PHY_INTERFACE_MODE_SGMII) { 1788 pdata->clk = devm_clk_get(&pdev->dev, NULL);
1789 pdata->clk = devm_clk_get(&pdev->dev, NULL); 1789 if (IS_ERR(pdata->clk)) {
1790 if (IS_ERR(pdata->clk)) { 1790 if (pdata->phy_mode != PHY_INTERFACE_MODE_SGMII) {
1791 /* Abort if the clock is defined but couldn't be 1791 /* Abort if the clock is defined but couldn't be
1792 * retrived. Always abort if the clock is missing on 1792 * retrived. Always abort if the clock is missing on
1793 * DT system as the driver can't cope with this case. 1793 * DT system as the driver can't cope with this case.