summaryrefslogtreecommitdiffstats
path: root/drivers/dma/apbh_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/apbh_dma.c')
-rw-r--r--drivers/dma/apbh_dma.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c
index b84c0f7985..79f25109f9 100644
--- a/drivers/dma/apbh_dma.c
+++ b/drivers/dma/apbh_dma.c
@@ -17,6 +17,7 @@
#include <dma/apbh-dma.h>
#include <stmp-device.h>
+#include <linux/clk.h>
#include <linux/list.h>
#include <linux/err.h>
#include <common.h>
@@ -55,6 +56,7 @@ enum mxs_dma_id {
struct apbh_dma {
void __iomem *regs;
+ struct clk *clk;
enum mxs_dma_id id;
};
@@ -606,6 +608,17 @@ static int apbh_dma_probe(struct device_d *dev)
apbh->id = id;
+ apbh->clk = clk_get(dev, NULL);
+ if (IS_ERR(apbh->clk))
+ return PTR_ERR(apbh->clk);
+
+ ret = clk_enable(apbh->clk);
+ if (ret) {
+ dev_err(dev, "Failed to enable clock: %s\n",
+ strerror(ret));
+ return ret;
+ }
+
ret = stmp_reset_block(apbh->regs, 0);
if (ret)
return ret;