Commit aaf83aec authored by Thomas Bogendoerfer's avatar Thomas Bogendoerfer Committed by David S. Miller

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: 0db01097 ('xgene: Don't fail probe, if there is no clk resource for SGMII interfaces')
Signed-off-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
Tested-by: default avatarLaura Abbott <labbott@redhat.com>
Acked-by: default avatarIyappan Subramanian <isubramanian@apm.com>
Tested-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b6bd53f9
...@@ -1785,9 +1785,9 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata) ...@@ -1785,9 +1785,9 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata)
xgene_enet_gpiod_get(pdata); xgene_enet_gpiod_get(pdata);
if (pdata->phy_mode != PHY_INTERFACE_MODE_SGMII) {
pdata->clk = devm_clk_get(&pdev->dev, NULL); pdata->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(pdata->clk)) { if (IS_ERR(pdata->clk)) {
if (pdata->phy_mode != PHY_INTERFACE_MODE_SGMII) {
/* Abort if the clock is defined but couldn't be /* Abort if the clock is defined but couldn't be
* retrived. Always abort if the clock is missing on * retrived. Always abort if the clock is missing on
* DT system as the driver can't cope with this case. * DT system as the driver can't cope with this case.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment