diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-05-14 09:30:52 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-05-14 09:30:52 -0400 |
commit | 4f5a9fd341e8ffd825ecf56155df6fe6c3d732b1 (patch) | |
tree | ac23c7b80154a476db3882d92f079c50c919e2fa /drivers/net/ethernet/freescale/fec.c | |
parent | c818f97bc3266f0fbf619f2348d951272f8ac335 (diff) | |
parent | a0f5e3631b07cabf624e7d818df76d47d9d21017 (diff) |
Merge branch 'imx/pinctrl' into imx/clock
Conflicts:
drivers/mmc/host/sdhci-esdhc-imx.c
drivers/net/ethernet/freescale/fec.c
drivers/spi/spi-imx.c
drivers/tty/serial/imx.c
This resolves dependencies between the pinctrl and clock changes
in imx.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/net/ethernet/freescale/fec.c')
-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 b2494637cb60..4d3280ae56e8 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_ipg = devm_clk_get(&pdev->dev, "ipg"); | 1621 | fep->clk_ipg = devm_clk_get(&pdev->dev, "ipg"); |
1614 | if (IS_ERR(fep->clk_ipg)) { | 1622 | if (IS_ERR(fep->clk_ipg)) { |
1615 | ret = PTR_ERR(fep->clk_ipg); | 1623 | ret = PTR_ERR(fep->clk_ipg); |
@@ -1648,6 +1656,7 @@ failed_mii_init: | |||
1648 | failed_init: | 1656 | failed_init: |
1649 | clk_disable_unprepare(fep->clk_ahb); | 1657 | clk_disable_unprepare(fep->clk_ahb); |
1650 | clk_disable_unprepare(fep->clk_ipg); | 1658 | clk_disable_unprepare(fep->clk_ipg); |
1659 | failed_pin: | ||
1651 | failed_clk: | 1660 | failed_clk: |
1652 | for (i = 0; i < FEC_IRQ_NUM; i++) { | 1661 | for (i = 0; i < FEC_IRQ_NUM; i++) { |
1653 | irq = platform_get_irq(pdev, i); | 1662 | irq = platform_get_irq(pdev, i); |