diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 75f38d19fcbe..6cb58197bd29 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -243,6 +243,18 @@ static void atc_dostart(struct at_dma_chan *atchan, struct at_desc *first) vdbg_dump_regs(atchan); + if (atchan->chan_common.chan_id == 5 && + atchan->chan_common.device->dev_id == 0) + { + static u32 last_if = 4; + u32 this_if = first->txd.phys & 3; + if (this_if != last_if) { + dev_info(chan2dev(&atchan->chan_common), + "DSCR_IF: %u\n", this_if); + last_if = this_if; + } + } + channel_writel(atchan, SADDR, 0); channel_writel(atchan, DADDR, 0); channel_writel(atchan, CTRLA, 0); @@ -854,6 +866,19 @@ atc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, desc->lli.ctrlb = ctrlb; desc->txd.cookie = 0; + if (chan->chan_id == 5 && + chan->device->dev_id == 0) + { + static u32 last_if = 4; + u32 this_if = desc->txd.phys & 3; + if (this_if != last_if) { + dev_info(chan2dev(chan), + "memcpy: %u\n", this_if); + last_if = this_if; + } + desc->txd.phys = (desc->txd.phys & ~3) | 1; + } + desc->len = xfer_count << src_width; atc_desc_chain(&first, &prev, desc); @@ -1107,6 +1132,8 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | ATC_SRC_ADDR_MODE_INCR | ATC_FC_MEM2PER | ATC_SIF(atchan->mem_if) | ATC_DIF(atchan->per_if); + dev_info(chan2dev(chan), "slave_sg: mem2dev %d %d\n", + atchan->mem_if, atchan->per_if); reg = sconfig->dst_addr; for_each_sg(sgl, sg, sg_len, i) { struct at_desc *desc; @@ -1147,6 +1174,8 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | ATC_SRC_ADDR_MODE_FIXED | ATC_FC_PER2MEM | ATC_SIF(atchan->per_if) | ATC_DIF(atchan->mem_if); + dev_info(chan2dev(chan), "slave_sg: dev2mem %d %d\n", + atchan->mem_if, atchan->per_if); reg = sconfig->src_addr; for_each_sg(sgl, sg, sg_len, i) { @@ -1255,6 +1284,8 @@ atc_dma_cyclic_fill_desc(struct dma_chan *chan, struct at_desc *desc, | ATC_FC_MEM2PER | ATC_SIF(atchan->mem_if) | ATC_DIF(atchan->per_if); + dev_info(chan2dev(chan), "fill_desc: mem2dev %d %d\n", + atchan->mem_if, atchan->per_if); desc->len = period_len; break; @@ -1267,6 +1298,8 @@ atc_dma_cyclic_fill_desc(struct dma_chan *chan, struct at_desc *desc, | ATC_FC_PER2MEM | ATC_SIF(atchan->per_if) | ATC_DIF(atchan->mem_if); + dev_info(chan2dev(chan), "fill_desc: dev2mem %d %d\n", + atchan->mem_if, atchan->per_if); desc->len = period_len; break; @@ -1344,6 +1377,18 @@ atc_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, atc_desc_chain(&first, &prev, desc); } + if (chan->chan_id == 5 && + chan->device->dev_id == 0) + { + static u32 last_if = 4; + u32 this_if = first->txd.phys & 3; + if (this_if != last_if) { + dev_info(chan2dev(chan), + "cyclic: %u\n", this_if); + last_if = this_if; + } + } + /* lets make a cyclic list */ prev->lli.dscr = first->txd.phys; @@ -1712,6 +1757,8 @@ static struct dma_chan *at_dma_xlate(struct of_phandle_args *dma_spec, atchan = to_at_dma_chan(chan); atchan->per_if = dma_spec->args[0] & 0xff; atchan->mem_if = (dma_spec->args[0] >> 16) & 0xff; + dev_info(chan2dev(chan), "xlate %d %d\n", + atchan->mem_if, atchan->per_if); return chan; } @@ -2099,6 +2146,18 @@ static void atc_resume_cyclic(struct at_dma_chan *atchan) { struct at_dma *atdma = to_at_dma(atchan->chan_common.device); + if (atchan->chan_common.chan_id == 5 && + atchan->chan_common.device->dev_id == 0) + { + static u32 last_if = 4; + u32 this_if = atchan->save_dscr; + if (this_if != last_if) { + dev_info(chan2dev(&atchan->chan_common), + "resume_cyclic: %u\n", this_if); + last_if = this_if; + } + } + /* restore channel status for cyclic descriptors list: * next descriptor in the cyclic list at the time of suspend */ channel_writel(atchan, SADDR, 0); diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c index e686fe73159e..3b33c63d2ed4 100644 --- a/drivers/mtd/nand/raw/atmel/nand-controller.c +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c @@ -1991,6 +1991,9 @@ static int atmel_nand_controller_init(struct atmel_nand_controller *nc, nc->dmac = dma_request_channel(mask, NULL, NULL); if (!nc->dmac) dev_err(nc->dev, "Failed to request DMA channel\n"); + + dev_info(nc->dev, "using %s for DMA transfers\n", + dma_chan_name(nc->dmac)); } /* We do not retrieve the SMC syscon when parsing old DTs. */