diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-07 14:06:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-07 14:06:17 -0400 |
commit | 38f56f33ca381751f9b8910f67e7a805ec0b68cb (patch) | |
tree | 202f2ce60f3f43a948607ec76c8cc48c1cf73a4b /drivers/net/ethernet/freescale | |
parent | fcba914542082b272f31c8e4c40000b88ed3208d (diff) | |
parent | 4183bef2e093a2f0aab45f2d5fed82b0e02aeacf (diff) |
Merge tag 'dt-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC device tree updates (part 2) from Arnd Bergmann:
"These are mostly new device tree bindings for existing drivers, as
well as changes to the device tree source files to add support for
those devices, and a couple of new boards, most notably Samsung's
Exynos5 based Chromebook.
The changes depend on earlier platform specific updates and touch the
usual platforms: omap, exynos, tegra, mxs, mvebu and davinci."
* tag 'dt-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (169 commits)
ARM: exynos: dts: cros5250: add EC device
ARM: dts: Add sbs-battery for exynos5250-snow
ARM: dts: Add i2c-arbitrator bus for exynos5250-snow
ARM: dts: add mshc controller node for Exynos4x12 SoCs
ARM: dts: Add chip-id controller node on Exynos4/5 SoC
ARM: EXYNOS: Create virtual I/O mapping for Chip-ID controller using device tree
ARM: davinci: da850-evm: add SPI flash support
ARM: davinci: da850: override SPI DT node device name
ARM: davinci: da850: add SPI1 DT node
spi/davinci: add DT binding documentation
spi/davinci: no wildcards in DT compatible property
ARM: dts: mvebu: Convert mvebu device tree files to 64 bits
ARM: dts: mvebu: introduce internal-regs node
ARM: dts: mvebu: Convert all the mvebu files to use the range property
ARM: dts: mvebu: move all peripherals inside soc
ARM: dts: mvebu: fix cpus section indentation
ARM: davinci: da850: add EHRPWM & ECAP DT node
ARM/dts: OMAP3: fix pinctrl-single configuration
ARM: dts: Add OMAP3430 SDP NOR flash memory binding
ARM: dts: Add NOR flash bindings for OMAP2420 H4
...
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/fec.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 18 |
2 files changed, 14 insertions, 5 deletions
diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h index d44f65bac1d4..ceb4d43c132d 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h | |||
@@ -214,6 +214,7 @@ struct fec_enet_private { | |||
214 | 214 | ||
215 | struct clk *clk_ipg; | 215 | struct clk *clk_ipg; |
216 | struct clk *clk_ahb; | 216 | struct clk *clk_ahb; |
217 | struct clk *clk_enet_out; | ||
217 | struct clk *clk_ptp; | 218 | struct clk *clk_ptp; |
218 | 219 | ||
219 | /* The saved address of a sent-in-place packet/buffer, for skfree(). */ | 220 | /* The saved address of a sent-in-place packet/buffer, for skfree(). */ |
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index b9748f14ea78..e25bf832e6b3 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c | |||
@@ -1883,18 +1883,23 @@ fec_probe(struct platform_device *pdev) | |||
1883 | goto failed_clk; | 1883 | goto failed_clk; |
1884 | } | 1884 | } |
1885 | 1885 | ||
1886 | /* enet_out is optional, depends on board */ | ||
1887 | fep->clk_enet_out = devm_clk_get(&pdev->dev, "enet_out"); | ||
1888 | if (IS_ERR(fep->clk_enet_out)) | ||
1889 | fep->clk_enet_out = NULL; | ||
1890 | |||
1886 | fep->clk_ptp = devm_clk_get(&pdev->dev, "ptp"); | 1891 | fep->clk_ptp = devm_clk_get(&pdev->dev, "ptp"); |
1887 | fep->bufdesc_ex = | 1892 | fep->bufdesc_ex = |
1888 | pdev->id_entry->driver_data & FEC_QUIRK_HAS_BUFDESC_EX; | 1893 | pdev->id_entry->driver_data & FEC_QUIRK_HAS_BUFDESC_EX; |
1889 | if (IS_ERR(fep->clk_ptp)) { | 1894 | if (IS_ERR(fep->clk_ptp)) { |
1890 | ret = PTR_ERR(fep->clk_ptp); | 1895 | fep->clk_ptp = NULL; |
1891 | fep->bufdesc_ex = 0; | 1896 | fep->bufdesc_ex = 0; |
1892 | } | 1897 | } |
1893 | 1898 | ||
1894 | clk_prepare_enable(fep->clk_ahb); | 1899 | clk_prepare_enable(fep->clk_ahb); |
1895 | clk_prepare_enable(fep->clk_ipg); | 1900 | clk_prepare_enable(fep->clk_ipg); |
1896 | if (!IS_ERR(fep->clk_ptp)) | 1901 | clk_prepare_enable(fep->clk_enet_out); |
1897 | clk_prepare_enable(fep->clk_ptp); | 1902 | clk_prepare_enable(fep->clk_ptp); |
1898 | 1903 | ||
1899 | reg_phy = devm_regulator_get(&pdev->dev, "phy"); | 1904 | reg_phy = devm_regulator_get(&pdev->dev, "phy"); |
1900 | if (!IS_ERR(reg_phy)) { | 1905 | if (!IS_ERR(reg_phy)) { |
@@ -1962,8 +1967,8 @@ failed_irq: | |||
1962 | failed_regulator: | 1967 | failed_regulator: |
1963 | clk_disable_unprepare(fep->clk_ahb); | 1968 | clk_disable_unprepare(fep->clk_ahb); |
1964 | clk_disable_unprepare(fep->clk_ipg); | 1969 | clk_disable_unprepare(fep->clk_ipg); |
1965 | if (!IS_ERR(fep->clk_ptp)) | 1970 | clk_disable_unprepare(fep->clk_enet_out); |
1966 | clk_disable_unprepare(fep->clk_ptp); | 1971 | clk_disable_unprepare(fep->clk_ptp); |
1967 | failed_pin: | 1972 | failed_pin: |
1968 | failed_clk: | 1973 | failed_clk: |
1969 | failed_ioremap: | 1974 | failed_ioremap: |
@@ -1985,6 +1990,7 @@ fec_drv_remove(struct platform_device *pdev) | |||
1985 | clk_disable_unprepare(fep->clk_ptp); | 1990 | clk_disable_unprepare(fep->clk_ptp); |
1986 | if (fep->ptp_clock) | 1991 | if (fep->ptp_clock) |
1987 | ptp_clock_unregister(fep->ptp_clock); | 1992 | ptp_clock_unregister(fep->ptp_clock); |
1993 | clk_disable_unprepare(fep->clk_enet_out); | ||
1988 | clk_disable_unprepare(fep->clk_ahb); | 1994 | clk_disable_unprepare(fep->clk_ahb); |
1989 | clk_disable_unprepare(fep->clk_ipg); | 1995 | clk_disable_unprepare(fep->clk_ipg); |
1990 | for (i = 0; i < FEC_IRQ_NUM; i++) { | 1996 | for (i = 0; i < FEC_IRQ_NUM; i++) { |
@@ -2010,6 +2016,7 @@ fec_suspend(struct device *dev) | |||
2010 | fec_stop(ndev); | 2016 | fec_stop(ndev); |
2011 | netif_device_detach(ndev); | 2017 | netif_device_detach(ndev); |
2012 | } | 2018 | } |
2019 | clk_disable_unprepare(fep->clk_enet_out); | ||
2013 | clk_disable_unprepare(fep->clk_ahb); | 2020 | clk_disable_unprepare(fep->clk_ahb); |
2014 | clk_disable_unprepare(fep->clk_ipg); | 2021 | clk_disable_unprepare(fep->clk_ipg); |
2015 | 2022 | ||
@@ -2022,6 +2029,7 @@ fec_resume(struct device *dev) | |||
2022 | struct net_device *ndev = dev_get_drvdata(dev); | 2029 | struct net_device *ndev = dev_get_drvdata(dev); |
2023 | struct fec_enet_private *fep = netdev_priv(ndev); | 2030 | struct fec_enet_private *fep = netdev_priv(ndev); |
2024 | 2031 | ||
2032 | clk_prepare_enable(fep->clk_enet_out); | ||
2025 | clk_prepare_enable(fep->clk_ahb); | 2033 | clk_prepare_enable(fep->clk_ahb); |
2026 | clk_prepare_enable(fep->clk_ipg); | 2034 | clk_prepare_enable(fep->clk_ipg); |
2027 | if (netif_running(ndev)) { | 2035 | if (netif_running(ndev)) { |