diff options
Diffstat (limited to 'drivers/dma/mv_xor.c')
-rw-r--r-- | drivers/dma/mv_xor.c | 15 |
1 files changed, 15 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 | ||