1 From e6a19ba12790d04267a9f052a3dc64fa1a8cac16 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Thu, 8 Mar 2012 11:21:08 +0100
4 Subject: [PATCH 28/70] MIPS: lantiq: convert dma driver to clkdev api
6 Update from old pmu_{dis,en}able() to ckldev api.
8 Signed-off-by: John Crispin <blogic@openwrt.org>
10 arch/mips/lantiq/xway/Makefile.rej | 11 +++++++++++
11 arch/mips/lantiq/xway/dma.c | 6 +++++-
12 2 files changed, 16 insertions(+), 1 deletions(-)
13 create mode 100644 arch/mips/lantiq/xway/Makefile.rej
15 diff --git a/arch/mips/lantiq/xway/Makefile.rej b/arch/mips/lantiq/xway/Makefile.rej
17 index 0000000..c0d5b52
19 +++ b/arch/mips/lantiq/xway/Makefile.rej
21 +--- arch/mips/lantiq/xway/Makefile
22 ++++ arch/mips/lantiq/xway/Makefile
24 +-obj-y := sysctrl.o reset.o gpio.o gpio_stp.o gpio_ebu.o devices.o dma.o clk.o
26 +-obj-$(CONFIG_SOC_XWAY) += prom-xway.o
27 +-obj-$(CONFIG_SOC_AMAZON_SE) += prom-ase.o
28 ++obj-y := prom.o sysctrl.o reset.o gpio.o gpio_stp.o gpio_ebu.o devices.o dma.o clk.o
30 + obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o
31 + obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o
32 diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c
33 index 60cd11f..388f1aa 100644
34 --- a/arch/mips/lantiq/xway/dma.c
35 +++ b/arch/mips/lantiq/xway/dma.c
38 #include <linux/dma-mapping.h>
39 #include <linux/export.h>
40 +#include <linux/clk.h>
42 #include <lantiq_soc.h>
44 @@ -216,6 +217,7 @@ EXPORT_SYMBOL_GPL(ltq_dma_init_port);
51 /* remap dma register range */
52 @@ -224,7 +226,9 @@ ltq_dma_init(void)
53 panic("Failed to remap dma memory\n");
55 /* power up and reset the dma engine */
56 - ltq_pmu_enable(PMU_DMA);
57 + clk = clk_get_sys("ltq_dma", NULL);
60 ltq_dma_w32_mask(0, DMA_RESET, LTQ_DMA_CTRL);
62 /* disable all interrupts */