summaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-3.6/0102-MIPS-lantiq-fixes-dma-irq-ack.patch
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-02 20:07:26 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-02 20:07:26 +0000
commit4f2c17075b25162d8becfd90de751556f425d5dc (patch)
treefc4edc4564190051908bdd3c9288202017930495 /target/linux/lantiq/patches-3.6/0102-MIPS-lantiq-fixes-dma-irq-ack.patch
parent1048c7b452f060c290d973d8a50ec4d178c937e6 (diff)
[lantiq] adds 3.6 files, patches and config
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34061 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches-3.6/0102-MIPS-lantiq-fixes-dma-irq-ack.patch')
-rw-r--r--target/linux/lantiq/patches-3.6/0102-MIPS-lantiq-fixes-dma-irq-ack.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.6/0102-MIPS-lantiq-fixes-dma-irq-ack.patch b/target/linux/lantiq/patches-3.6/0102-MIPS-lantiq-fixes-dma-irq-ack.patch
new file mode 100644
index 000000000..89bcd709b
--- /dev/null
+++ b/target/linux/lantiq/patches-3.6/0102-MIPS-lantiq-fixes-dma-irq-ack.patch
@@ -0,0 +1,62 @@
+From 671f34ea864ddc353f32272b3a2f7ee62d6f8548 Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Thu, 1 Nov 2012 20:50:39 +0100
+Subject: [PATCH 102/113] MIPS: lantiq: fixes dma irq ack
+
+---
+ arch/mips/lantiq/xway/dma.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c
+index 55d2c4f..a301b3b 100644
+--- a/arch/mips/lantiq/xway/dma.c
++++ b/arch/mips/lantiq/xway/dma.c
+@@ -25,6 +25,7 @@
+ #include <lantiq_soc.h>
+ #include <xway_dma.h>
+
++#define LTQ_DMA_ID 0x08
+ #define LTQ_DMA_CTRL 0x10
+ #define LTQ_DMA_CPOLL 0x14
+ #define LTQ_DMA_CS 0x18
+@@ -89,7 +90,7 @@ ltq_dma_ack_irq(struct ltq_dma_channel *ch)
+
+ local_irq_save(flags);
+ ltq_dma_w32(ch->nr, LTQ_DMA_CS);
+- ltq_dma_w32(DMA_IRQ_ACK, LTQ_DMA_CIS);
++ ltq_dma_w32(ltq_dma_r32(LTQ_DMA_CIS), LTQ_DMA_CIS);
+ local_irq_restore(flags);
+ }
+ EXPORT_SYMBOL_GPL(ltq_dma_ack_irq);
+@@ -103,6 +104,7 @@ ltq_dma_open(struct ltq_dma_channel *ch)
+ ltq_dma_w32(ch->nr, LTQ_DMA_CS);
+ ltq_dma_w32_mask(0, DMA_CHAN_ON, LTQ_DMA_CCTRL);
+ ltq_dma_enable_irq(ch);
++ ltq_dma_ack_irq(ch);
+ local_irq_restore(flag);
+ }
+ EXPORT_SYMBOL_GPL(ltq_dma_open);
+@@ -214,6 +216,7 @@ ltq_dma_init(struct platform_device *pdev)
+ {
+ struct clk *clk;
+ struct resource *res;
++ unsigned id;
+ int i;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+@@ -243,6 +246,12 @@ ltq_dma_init(struct platform_device *pdev)
+ ltq_dma_w32(DMA_POLL | DMA_CLK_DIV4, LTQ_DMA_CPOLL);
+ ltq_dma_w32_mask(DMA_CHAN_ON, 0, LTQ_DMA_CCTRL);
+ }
++
++ id = ltq_dma_r32(LTQ_DMA_ID);
++ dev_info(&pdev->dev,
++ "Init done - hw rev: %X, ports: %d, channels: %d\n",
++ id & 0x1f, (id >> 16) & 0xf, id >> 20);
++
+ dev_info(&pdev->dev, "init done\n");
+ return 0;
+ }
+--
+1.7.10.4
+