Commit 708beb98 authored by Tristan Gingold's avatar Tristan Gingold

svec-dma.c: remove traces

parent 60328f6d
......@@ -84,17 +84,11 @@ static inline struct svec_dma_chan *to_svec_dma_chan(struct dma_chan *_ptr)
static int svec_dma_alloc_chan_resources(struct dma_chan *dchan)
{
pr_info("%s\n", __func__);
return 0;
}
static void svec_dma_free_chan_resources(struct dma_chan *dchan)
{
pr_info("%s\n", __func__);
#if 0
struct svec_dma_chan *chan = to_svec_dma_chan(dchan);
dma_release_channel(chan->vme_chan);
#endif
}
static int svec_dma_slave_config(struct dma_chan *dchan,
......@@ -106,9 +100,6 @@ static int svec_dma_slave_config(struct dma_chan *dchan,
if (sconfig->src_addr & 3)
return -EINVAL;
pr_info("%s saddr: 0x%08x daddr: 0x%08x\n",
__func__, (unsigned)sconfig->src_addr, (unsigned)sconfig->dst_addr);
memcpy(&chan->sconfig, sconfig, sizeof(struct dma_slave_config));
return 0;
......@@ -192,7 +183,6 @@ static dma_cookie_t svec_dma_tx_submit(struct dma_async_tx_descriptor *tx)
dma_cookie_t cookie;
unsigned long flags;
pr_info("%s, tx=%p\n", __func__, tx);
dev_dbg(&tx->chan->dev->device, "%s submit %p\n", __func__, tx);
/* Allocate cookie and append the tx descriptor */
......@@ -215,8 +205,6 @@ static struct dma_async_tx_descriptor *svec_dma_prep_slave_sg(
struct scatterlist *sg;
int i;
pr_info("%s sg_len=%u\n", __func__, sg_len);
if (unlikely(sconfig->direction != direction)) {
dev_err(&chan->dev->device,
"Transfer and slave configuration disagree on DMA direction\n");
......@@ -291,7 +279,6 @@ static enum dma_status svec_dma_tx_status(struct dma_chan *chan,
dma_cookie_t cookie,
struct dma_tx_state *state)
{
pr_info("%s\n", __func__);
return DMA_ERROR;
}
......@@ -301,8 +288,6 @@ static void svec_dma_complete(void *arg, const struct dmaengine_result *result)
struct svec_dma_tx *tx;
unsigned long flags;
pr_info("%s %u\n", __func__, result->result);
if (svec_fpga->dma_sg_ptr) {
/* Continue with the original tx entry */
svec_dma_submit_sgl(svec_fpga);
......@@ -392,8 +377,6 @@ static void svec_dma_submit_sgl(struct svec_fpga *svec_fpga)
unsigned total_len;
dma_addr_t phys_addr;
pr_info("%s\n", __func__);
sg_init_table(svec_fpga->dma_sg, SVEC_DMA_SG);
sgl = svec_fpga->dma_sg_ptr;
......@@ -401,8 +384,6 @@ static void svec_dma_submit_sgl(struct svec_fpga *svec_fpga)
sgl_len = SVEC_DMA_SG;
total_len = 0;
phys_addr = sg_phys(sgl);
pr_info("%s sg: %p dma=%08llx off=%u len=%u\n",
__func__, sgl, sg_dma_address(sgl), sgl->offset, sgl->length);
for (i = 0; i < SVEC_DMA_SG; i++) {
struct scatterlist *s = &svec_fpga->dma_sg[i];
unsigned maxlen = sgl->length - off;
......@@ -411,8 +392,6 @@ static void svec_dma_submit_sgl(struct svec_fpga *svec_fpga)
if (maxlen > PAGE_SIZE)
maxlen = PAGE_SIZE;
pr_info("%s pgoff=%u doff=%u len=%u\n",
__func__, pgoff, doff, maxlen);
sg_set_page(s, sg_page(sgl) + pgoff, doff, maxlen);
sg_dma_len(s) = maxlen;
sg_dma_address(s) = sg_dma_address(sgl) + off;
......@@ -457,8 +436,6 @@ static void svec_dma_submit_sgl(struct svec_fpga *svec_fpga)
vtx->callback_result = svec_dma_complete;
vtx->callback_param = svec_fpga;
pr_info("%s-4\n", __func__);
tx->cookie = dmaengine_submit(vtx);
WARN_ON(tx->cookie < 0);
......@@ -477,8 +454,6 @@ static void svec_dma_submit_tx(struct svec_fpga *svec_fpga, struct svec_dma_tx *
unsigned reg_off;
int err;
pr_info("%s\n", __func__);
vaddr = svec_fpga->vme_addr;
switch (tx->tx.chan->chan_id) {
case 0:
......@@ -501,15 +476,11 @@ static void svec_dma_submit_tx(struct svec_fpga *svec_fpga, struct svec_dma_tx *
sconfig.direction = tx->direction;
sconfig.src_addr_width = 8;
pr_info("%s-2\n", __func__);
err = dmaengine_slave_config(svec_fpga->vme_chan, &sconfig);
WARN_ON(err);
return;
}
pr_info("%s-3 vaddr=0x%08x\n", __func__, (unsigned)tx->vaddr);
/* Write the SVEC dma page address */
iowrite32be(tx->vaddr, svec_fpga->fpga + reg_off);
......@@ -517,8 +488,6 @@ static void svec_dma_submit_tx(struct svec_fpga *svec_fpga, struct svec_dma_tx *
svec_fpga->dma_sg_ptr = tx->sgl;
svec_fpga->dma_cur_tx = tx;
pr_info("%s-4\n", __func__);
svec_dma_submit_sgl(svec_fpga);
return;
}
......@@ -529,9 +498,6 @@ static bool svec_dmaengine_filter(struct dma_chan *dchan, void *arg)
/* The vme board, vme slot, vme bridge */
struct device *device_ref = vdev->dev.parent->parent;
pr_info("%s; chan dev name %s, ref: %s\n",
__func__, dev_name(dchan->device->dev), dev_name(device_ref));
return (dchan->device->dev == device_ref);
}
......@@ -545,8 +511,6 @@ static void svec_dma_issue(struct svec_fpga *svec_fpga)
struct svec_dev *svec_dev = to_svec_dev(svec_fpga->dev.parent);
struct vme_dev *vdev = to_vme_dev(svec_dev->dev.parent);
pr_info("%s\n", __func__);
/* Allocate channel from vme, unless already allocated */
spin_lock_irqsave(&svec_fpga->dma_lock, flags);
if (svec_fpga->vme_chan) {
......@@ -581,15 +545,11 @@ static void svec_dma_issue(struct svec_fpga *svec_fpga)
return;
}
pr_info("%s-2\n", __func__);
/* Extract entry */
tx = list_first_entry_or_null(&svec_fpga->dma_pending_list, struct svec_dma_tx, list);
WARN_ON(tx == NULL);
list_del(&tx->list);
pr_info("%s-3\n", __func__);
spin_unlock_irqrestore(&svec_fpga->dma_lock, flags);
/* Submit it. */
......@@ -604,8 +564,6 @@ static void svec_dma_issue_pending(struct dma_chan *dchan)
unsigned long flags1;
unsigned long flags2;
pr_info("%s\n", __func__);
/* Append the channel tx list to the dma tx list */
spin_lock_irqsave(&svec_fpga->dma_lock, flags1);
spin_lock_irqsave(&chan->lock, flags2);
......@@ -622,7 +580,6 @@ static int svec_dma_device_control(struct dma_chan *chan,
enum dma_ctrl_cmd cmd,
unsigned long arg)
{
pr_info("%s\n", __func__);
switch (cmd) {
case DMA_SLAVE_CONFIG:
return svec_dma_slave_config(chan,
......@@ -649,9 +606,6 @@ int svec_dma_init(struct svec_fpga *svec_fpga)
int err;
dma->dev = &svec_fpga->dev;
pr_info("svec_dma_init: %s co mask: %016x, mask: %p(2)\n",
dev_name(dma->dev), (unsigned)dma->dev->coherent_dma_mask,
dma->dev->dma_mask);
if (dma_set_mask(dma->dev, DMA_BIT_MASK(64))) {
dev_warn(dma->dev, "64-bit DMA addressing not available\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment