kernel: update linux 3.3 to 3.3.2
[openwrt.git] / target / linux / lantiq / patches-3.3 / 0024-MIPS-lantiq-convert-dma-driver-to-clkdev-api.patch
1 From d5904c1dd985d1e0944dd249927ad19c8522a943 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 24/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 --- /dev/null
16 +++ b/arch/mips/lantiq/xway/Makefile.rej
17 @@ -0,0 +1,11 @@
18 +--- arch/mips/lantiq/xway/Makefile
19 ++++ arch/mips/lantiq/xway/Makefile
20 +@@ -1,7 +1,4 @@
21 +-obj-y := sysctrl.o reset.o gpio.o gpio_stp.o gpio_ebu.o devices.o dma.o clk.o
22 +-
23 +-obj-$(CONFIG_SOC_XWAY) += prom-xway.o
24 +-obj-$(CONFIG_SOC_AMAZON_SE) += prom-ase.o
25 ++obj-y := prom.o sysctrl.o reset.o gpio.o gpio_stp.o gpio_ebu.o devices.o dma.o clk.o
26
27 + obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o
28 + obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o
29 --- a/arch/mips/lantiq/xway/dma.c
30 +++ b/arch/mips/lantiq/xway/dma.c
31 @@ -20,6 +20,7 @@
32  #include <linux/io.h>
33  #include <linux/dma-mapping.h>
34  #include <linux/export.h>
35 +#include <linux/clk.h>
36  
37  #include <lantiq_soc.h>
38  #include <xway_dma.h>
39 @@ -216,6 +217,7 @@ EXPORT_SYMBOL_GPL(ltq_dma_init_port);
40  int __init
41  ltq_dma_init(void)
42  {
43 +       struct clk *clk;
44         int i;
45  
46         /* remap dma register range */
47 @@ -224,7 +226,9 @@ ltq_dma_init(void)
48                 panic("Failed to remap dma memory");
49  
50         /* power up and reset the dma engine */
51 -       ltq_pmu_enable(PMU_DMA);
52 +       clk = clk_get_sys("ltq_dma", NULL);
53 +       WARN_ON(!clk);
54 +       clk_enable(clk);
55         ltq_dma_w32_mask(0, DMA_RESET, LTQ_DMA_CTRL);
56  
57         /* disable all interrupts */