50 lines
1.9 KiB
Diff
50 lines
1.9 KiB
Diff
From 8bfbdce4d7da6353d1039148a4c90dd463f1fb8f Mon Sep 17 00:00:00 2001
|
|
From: Laura Abbott <labbott@redhat.com>
|
|
Date: Thu, 27 Jul 2017 13:52:17 -0700
|
|
Subject: [PATCH] Revert "xgene: Don't fail probe, if there is no clk resource
|
|
for SGMII interfaces"
|
|
|
|
This reverts commit 0db01097cabd97897d123b4c5d805d1a7b061d82.
|
|
|
|
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
|
---
|
|
drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 22 ++++++++++------------
|
|
1 file changed, 10 insertions(+), 12 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..d3906f6b01bd 100644
|
|
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
|
|
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
|
|
@@ -1785,18 +1785,16 @@ 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)) {
|
|
- /* 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.
|
|
- */
|
|
- if (PTR_ERR(pdata->clk) != -ENOENT || dev->of_node)
|
|
- return PTR_ERR(pdata->clk);
|
|
- /* Firmware may have set up the clock already. */
|
|
- dev_info(dev, "clocks have been setup already\n");
|
|
- }
|
|
+ pdata->clk = devm_clk_get(&pdev->dev, NULL);
|
|
+ if (IS_ERR(pdata->clk)) {
|
|
+ /* 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.
|
|
+ */
|
|
+ if (PTR_ERR(pdata->clk) != -ENOENT || dev->of_node)
|
|
+ return PTR_ERR(pdata->clk);
|
|
+ /* Firmware may have set up the clock already. */
|
|
+ dev_info(dev, "clocks have been setup already\n");
|
|
}
|
|
|
|
if (pdata->phy_mode != PHY_INTERFACE_MODE_XGMII)
|
|
--
|
|
2.13.0
|
|
|