Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314681
b: refs/heads/master
c: 5fa9c0f
h: refs/heads/master
i:
  314679: ed65172
v: v3
  • Loading branch information
Shawn Guo authored and David S. Miller committed Jun 28, 2012
1 parent ab3413b commit a62a290
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2ca9b2aa0d5a43e954789e0da675a826b83932b7
refs/heads/master: 5fa9c0fe3ec0a008352d4a4fb8d972a437183404
13 changes: 13 additions & 0 deletions trunk/drivers/net/ethernet/freescale/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include <linux/of_gpio.h>
#include <linux/of_net.h>
#include <linux/pinctrl/consumer.h>
#include <linux/regulator/consumer.h>

#include <asm/cacheflush.h>

Expand Down Expand Up @@ -1546,6 +1547,7 @@ fec_probe(struct platform_device *pdev)
const struct of_device_id *of_id;
static int dev_id;
struct pinctrl *pinctrl;
struct regulator *reg_phy;

of_id = of_match_device(fec_dt_ids, &pdev->dev);
if (of_id)
Expand Down Expand Up @@ -1632,6 +1634,16 @@ fec_probe(struct platform_device *pdev)
clk_prepare_enable(fep->clk_ahb);
clk_prepare_enable(fep->clk_ipg);

reg_phy = devm_regulator_get(&pdev->dev, "phy");
if (!IS_ERR(reg_phy)) {
ret = regulator_enable(reg_phy);
if (ret) {
dev_err(&pdev->dev,
"Failed to enable phy regulator: %d\n", ret);
goto failed_regulator;
}
}

fec_reset_phy(pdev);

ret = fec_enet_init(ndev);
Expand All @@ -1655,6 +1667,7 @@ fec_probe(struct platform_device *pdev)
fec_enet_mii_remove(fep);
failed_mii_init:
failed_init:
failed_regulator:
clk_disable_unprepare(fep->clk_ahb);
clk_disable_unprepare(fep->clk_ipg);
failed_pin:
Expand Down

0 comments on commit a62a290

Please sign in to comment.