linux-mips
[Top] [All Lists]

[PATCH V2 06/14] MIPS: lantiq: convert dma driver to clkdev api

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH V2 06/14] MIPS: lantiq: convert dma driver to clkdev api
From: John Crispin <blogic@openwrt.org>
Date: Thu, 23 Feb 2012 17:03:05 +0100
Cc: linux-mips@linux-mips.org, John Crispin <blogic@openwrt.org>
In-reply-to: <1330012993-13510-1-git-send-email-blogic@openwrt.org>
References: <1330012993-13510-1-git-send-email-blogic@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
Update from old pmu_{dis,en}able() to ckldev api.

Signed-off-by: John Crispin <blogic@openwrt.org>
---
 arch/mips/lantiq/xway/dma.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c
index 6cf883b..ce86529 100644
--- a/arch/mips/lantiq/xway/dma.c
+++ b/arch/mips/lantiq/xway/dma.c
@@ -20,6 +20,7 @@
 #include <linux/io.h>
 #include <linux/dma-mapping.h>
 #include <linux/export.h>
+#include <linux/clk.h>
 
 #include <lantiq_soc.h>
 #include <xway_dma.h>
@@ -216,6 +217,7 @@ EXPORT_SYMBOL_GPL(ltq_dma_init_port);
 int __init
 ltq_dma_init(void)
 {
+       struct clk *clk;
        int i;
 
        /* remap dma register range */
@@ -224,7 +226,9 @@ ltq_dma_init(void)
                panic("Failed to remap dma memory");
 
        /* power up and reset the dma engine */
-       ltq_pmu_enable(PMU_DMA);
+       clk = clk_get_sys("ltq_dma", NULL);
+       WARN_ON(!clk);
+       clk_enable(clk);
        ltq_dma_w32_mask(0, DMA_RESET, LTQ_DMA_CTRL);
 
        /* disable all interrupts */
-- 
1.7.7.1


<Prev in Thread] Current Thread [Next in Thread>