bump kernel to 3.2.12
[openwrt/openwrt.git] / target / linux / lantiq / patches-3.2 / 0028-MIPS-lantiq-convert-dma-driver-to-clkdev-api.patch
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
5
6 Update from old pmu_{dis,en}able() to ckldev api.
7
8 Signed-off-by: John Crispin <blogic@openwrt.org>
9 ---
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
14
15 diff --git a/arch/mips/lantiq/xway/Makefile.rej b/arch/mips/lantiq/xway/Makefile.rej
16 new file mode 100644
17 index 0000000..c0d5b52
18 --- /dev/null
19 +++ b/arch/mips/lantiq/xway/Makefile.rej
20 @@ -0,0 +1,11 @@
21 +--- arch/mips/lantiq/xway/Makefile
22 ++++ arch/mips/lantiq/xway/Makefile
23 +@@ -1,7 +1,4 @@
24 +-obj-y := sysctrl.o reset.o gpio.o gpio_stp.o gpio_ebu.o devices.o dma.o clk.o
25 +-
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
29 +
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
36 @@ -20,6 +20,7 @@
37 #include <linux/io.h>
38 #include <linux/dma-mapping.h>
39 #include <linux/export.h>
40 +#include <linux/clk.h>
41
42 #include <lantiq_soc.h>
43 #include <xway_dma.h>
44 @@ -216,6 +217,7 @@ EXPORT_SYMBOL_GPL(ltq_dma_init_port);
45 int __init
46 ltq_dma_init(void)
47 {
48 + struct clk *clk;
49 int i;
50
51 /* remap dma register range */
52 @@ -224,7 +226,9 @@ ltq_dma_init(void)
53 panic("Failed to remap dma memory\n");
54
55 /* power up and reset the dma engine */
56 - ltq_pmu_enable(PMU_DMA);
57 + clk = clk_get_sys("ltq_dma", NULL);
58 + WARN_ON(!clk);
59 + clk_enable(clk);
60 ltq_dma_w32_mask(0, DMA_RESET, LTQ_DMA_CTRL);
61
62 /* disable all interrupts */
63 --
64 1.7.7.1
65