diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-05-16 10:35:25 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-05-16 10:35:25 -0400 |
commit | 3c0dec5f58b3c7b3627715126d1bf9b030a076f0 (patch) | |
tree | 4bf8f56fca3bf6be109209b116fc8e32cb2e0f9e /drivers/dma | |
parent | fcd8d84a585f3578a9ebdd27e757495a27415322 (diff) | |
parent | 7e0fa1b5fa91d9aa456d102c273b2cf0f2e95d39 (diff) |
Merge branch 'clk-next' of git://git.linaro.org/people/mturquette/linux into next/clock
* 'clk-next' of git://git.linaro.org/people/mturquette/linux:
clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
clk: Provide dummy clk_unregister()
ARM: Kirkwood: Replace clock gating
ARM: Orion: Audio: Add clk/clkdev support
ARM: Orion: PCIE: Add support for clk
ARM: Orion: XOR: Add support for clk
ARM: Orion: CESA: Add support for clk
ARM: Orion: SDIO: Add support for clk.
ARM: Orion: NAND: Add support for clk, if there is one.
ARM: Orion: EHCI: Add support for enabling clocks
ARM: Orion: SATA: Add per channel clk/clkdev support.
ARM: Orion: UART: Get the clock rate via clk_get_rate().
ARM: Orion: WDT: Add clk/clkdev support
ARM: Orion: Eth: Add clk/clkdev support.
ARM: Orion: SPI: Add clk/clkdev support.
ARM: Orion: Add clocks using the generic clk infrastructure.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/mv_xor.c | 15 | ||||
-rw-r--r-- | drivers/dma/mv_xor.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index fa5d55fea46c..0b12e68bf79c 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/memory.h> | 27 | #include <linux/memory.h> |
28 | #include <linux/clk.h> | ||
28 | #include <plat/mv_xor.h> | 29 | #include <plat/mv_xor.h> |
29 | 30 | ||
30 | #include "dmaengine.h" | 31 | #include "dmaengine.h" |
@@ -1307,11 +1308,25 @@ static int mv_xor_shared_probe(struct platform_device *pdev) | |||
1307 | if (dram) | 1308 | if (dram) |
1308 | mv_xor_conf_mbus_windows(msp, dram); | 1309 | mv_xor_conf_mbus_windows(msp, dram); |
1309 | 1310 | ||
1311 | /* Not all platforms can gate the clock, so it is not | ||
1312 | * an error if the clock does not exists. | ||
1313 | */ | ||
1314 | msp->clk = clk_get(&pdev->dev, NULL); | ||
1315 | if (!IS_ERR(msp->clk)) | ||
1316 | clk_prepare_enable(msp->clk); | ||
1317 | |||
1310 | return 0; | 1318 | return 0; |
1311 | } | 1319 | } |
1312 | 1320 | ||
1313 | static int mv_xor_shared_remove(struct platform_device *pdev) | 1321 | static int mv_xor_shared_remove(struct platform_device *pdev) |
1314 | { | 1322 | { |
1323 | struct mv_xor_shared_private *msp = platform_get_drvdata(pdev); | ||
1324 | |||
1325 | if (!IS_ERR(msp->clk)) { | ||
1326 | clk_disable_unprepare(msp->clk); | ||
1327 | clk_put(msp->clk); | ||
1328 | } | ||
1329 | |||
1315 | return 0; | 1330 | return 0; |
1316 | } | 1331 | } |
1317 | 1332 | ||
diff --git a/drivers/dma/mv_xor.h b/drivers/dma/mv_xor.h index 654876b7ba1d..a5b422f5a8ab 100644 --- a/drivers/dma/mv_xor.h +++ b/drivers/dma/mv_xor.h | |||
@@ -55,6 +55,7 @@ | |||
55 | struct mv_xor_shared_private { | 55 | struct mv_xor_shared_private { |
56 | void __iomem *xor_base; | 56 | void __iomem *xor_base; |
57 | void __iomem *xor_high_base; | 57 | void __iomem *xor_high_base; |
58 | struct clk *clk; | ||
58 | }; | 59 | }; |
59 | 60 | ||
60 | 61 | ||