diff options
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/fec.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c index 7fa0227c9c02..8f2cf8c09e2d 100644 --- a/drivers/net/ethernet/freescale/fec.c +++ b/drivers/net/ethernet/freescale/fec.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/of_device.h> | 48 | #include <linux/of_device.h> |
49 | #include <linux/of_gpio.h> | 49 | #include <linux/of_gpio.h> |
50 | #include <linux/of_net.h> | 50 | #include <linux/of_net.h> |
51 | #include <linux/pinctrl/consumer.h> | ||
51 | 52 | ||
52 | #include <asm/cacheflush.h> | 53 | #include <asm/cacheflush.h> |
53 | 54 | ||
@@ -1543,6 +1544,7 @@ fec_probe(struct platform_device *pdev) | |||
1543 | struct resource *r; | 1544 | struct resource *r; |
1544 | const struct of_device_id *of_id; | 1545 | const struct of_device_id *of_id; |
1545 | static int dev_id; | 1546 | static int dev_id; |
1547 | struct pinctrl *pinctrl; | ||
1546 | 1548 | ||
1547 | of_id = of_match_device(fec_dt_ids, &pdev->dev); | 1549 | of_id = of_match_device(fec_dt_ids, &pdev->dev); |
1548 | if (of_id) | 1550 | if (of_id) |
@@ -1610,6 +1612,12 @@ fec_probe(struct platform_device *pdev) | |||
1610 | } | 1612 | } |
1611 | } | 1613 | } |
1612 | 1614 | ||
1615 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | ||
1616 | if (IS_ERR(pinctrl)) { | ||
1617 | ret = PTR_ERR(pinctrl); | ||
1618 | goto failed_pin; | ||
1619 | } | ||
1620 | |||
1613 | fep->clk = clk_get(&pdev->dev, NULL); | 1621 | fep->clk = clk_get(&pdev->dev, NULL); |
1614 | if (IS_ERR(fep->clk)) { | 1622 | if (IS_ERR(fep->clk)) { |
1615 | ret = PTR_ERR(fep->clk); | 1623 | ret = PTR_ERR(fep->clk); |
@@ -1640,6 +1648,7 @@ failed_mii_init: | |||
1640 | failed_init: | 1648 | failed_init: |
1641 | clk_disable_unprepare(fep->clk); | 1649 | clk_disable_unprepare(fep->clk); |
1642 | clk_put(fep->clk); | 1650 | clk_put(fep->clk); |
1651 | failed_pin: | ||
1643 | failed_clk: | 1652 | failed_clk: |
1644 | for (i = 0; i < FEC_IRQ_NUM; i++) { | 1653 | for (i = 0; i < FEC_IRQ_NUM; i++) { |
1645 | irq = platform_get_irq(pdev, i); | 1654 | irq = platform_get_irq(pdev, i); |