summaryrefslogtreecommitdiff
path: root/target/linux/lantiq/patches-3.6/0102-MIPS-lantiq-fixes-dma-irq-ack.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2012-11-02 20:07:26 +0000
committerJohn Crispin <john@openwrt.org>2012-11-02 20:07:26 +0000
commitdd619da4fc9cd33553ce2deb145ec6321e4c43e2 (patch)
treeb1059a673edde47dee8e9c2dd28d9b4d8eef1c0a /target/linux/lantiq/patches-3.6/0102-MIPS-lantiq-fixes-dma-irq-ack.patch
parent736835343c20f3ca495b73d2adf24d240f471676 (diff)
downloadmtk-20170518-dd619da4fc9cd33553ce2deb145ec6321e4c43e2.zip
mtk-20170518-dd619da4fc9cd33553ce2deb145ec6321e4c43e2.tar.gz
mtk-20170518-dd619da4fc9cd33553ce2deb145ec6321e4c43e2.tar.bz2
adds 3.6 files, patches and config
SVN-Revision: 34061
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 0000000..89bcd70
--- /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
+