DMA: Add more information to pl330_dma_debug function.
authorJaejoon Yoo <joonyj7.yoo@samsung.com>
Thu, 15 Dec 2016 08:16:38 +0000 (17:16 +0900)
committerTaekki Kim <taekki.kim@samsung.com>
Mon, 14 May 2018 05:42:47 +0000 (14:42 +0900)
Change-Id: Ideca8099a73ef3aec2ce13af71c37d68ede6228b
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
drivers/dma/pl330.c

index 994e63ec2fc7a24e7b6ec1f45192d5a61f47efd8..b5c831ee56ac23583979d63b1f028f718292b0b0 100644 (file)
@@ -2953,12 +2953,35 @@ int pl330_dma_debug(struct dma_chan *chan)
        thrd = pch->thread;
        regs = &pch->dmac->base;
 
+       idx = 1 - thrd->lstenq;
+       if (thrd->req[idx].desc != NULL) {
+               dev_info(pch->dmac->ddma.dev,"%d: mc_cpu:%lu\n",
+                               thrd->lstenq, (unsigned long)thrd->req[idx].mc_cpu);
+               dev_info(pch->dmac->ddma.dev,"%d: mc_bus:%lu\n", thrd->lstenq,
+                               (unsigned long)thrd->req[idx].mc_bus);
+       } else {
+               idx = thrd->lstenq;
+               if (thrd->req[idx].desc != NULL) {
+                       dev_info(pch->dmac->ddma.dev,"%d: mc_cpu:%lu\n",
+                                       thrd->lstenq, (unsigned long)thrd->req[idx].mc_cpu);
+                       dev_info(pch->dmac->ddma.dev,"%d: mc_bus:%lu\n",thrd->lstenq,
+                                       (unsigned long)thrd->req[idx].mc_bus);
+               } else {
+                       dev_info(pch->dmac->ddma.dev,"No Information\n");
+               }
+       }
+
        dev_info(pch->dmac->ddma.dev,"[ DMA Register Dump(id: %d) ]\n", thrd->id);
        dev_info(pch->dmac->ddma.dev,"DAR:0x%x\n", readl(regs + DA(thrd->id)));
        dev_info(pch->dmac->ddma.dev,"SAR:0x%x\n", readl(regs + SA(thrd->id)));
+       dev_info(pch->dmac->ddma.dev,"arwrapper_inst:0x%x\n", readl(regs + 0x4500));
+       dev_info(pch->dmac->ddma.dev,"arwrapper:0x%x\n", readl(regs + 0x4400 + 0x20*thrd->id));
+       dev_info(pch->dmac->ddma.dev,"awwrapper:0x%x\n", readl(regs + 0x4404 + 0x20*thrd->id));
        dev_info(pch->dmac->ddma.dev,"DBGSTATUS:0x%x\n", readl(regs + DBGSTATUS));
        dev_info(pch->dmac->ddma.dev,"INTMIS:0x%x\n", readl(regs + INTSTATUS));
+       dev_info(pch->dmac->ddma.dev,"INTEN:0x%x\n", readl(regs + INTEN));
        dev_info(pch->dmac->ddma.dev,"DSR:0x%x\n", readl(regs + DS));
+       dev_info(pch->dmac->ddma.dev,"CPC:0x%x\n", readl(regs + CPC(thrd->id)));
        dev_info(pch->dmac->ddma.dev,"CCR:0x%x\n", readl(regs + CC(thrd->id)));
        dev_info(pch->dmac->ddma.dev,"CSR:0x%x\n", readl(regs + CS(thrd->id)));
        dev_info(pch->dmac->ddma.dev,"CRD:0x%x\n", readl(regs + CRD));
@@ -2979,6 +3002,7 @@ int pl330_dma_getposition(struct dma_chan *chan,
        struct dma_pl330_chan *pch = to_pchan(chan);
        void __iomem *regs;
        struct pl330_thread *thrd;
+       int idx;
 
        if (unlikely(!pch))
                return -EINVAL;