linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: arnd@arndb.de, linus.walleij@stericsson.com,
	Lee Jones <lee.jones@linaro.org>,
	Vinod Koul <vinod.koul@intel.com>, Dan Williams <djbw@fb.com>,
	Per Forlin <per.forlin@stericsson.com>
Subject: [PATCH 4/8] dmaengine: ste_dma40: Do not configure channels during an channel allocation
Date: Tue,  9 Apr 2013 19:39:39 +0100	[thread overview]
Message-ID: <1365532783-27425-4-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1365532783-27425-1-git-send-email-lee.jones@linaro.org>

According to the DMA documentation allocating a channel and configuring
it are two separate actions. By removing the configuration code from the
channel allocation path we lighten the burden on the information required to
successfully allocate a channel.

Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <djbw@fb.com>
Cc: Per Forlin <per.forlin@stericsson.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/dma/ste_dma40.c |   14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 2a0a9d4..9e423ad 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -2463,16 +2463,10 @@ static int d40_alloc_chan_resources(struct dma_chan *chan)
 	}
 
 	pm_runtime_get_sync(d40c->base->dev);
-	/* Fill in basic CFG register values */
-	d40_phy_cfg(&d40c->dma_cfg, &d40c->src_def_cfg,
-		    &d40c->dst_def_cfg, chan_is_logical(d40c));
 
 	d40_set_prio_realtime(d40c);
 
 	if (chan_is_logical(d40c)) {
-		d40_log_cfg(&d40c->dma_cfg,
-			    &d40c->log_def.lcsp1, &d40c->log_def.lcsp3);
-
 		if (d40c->dma_cfg.dir == STEDMA40_PERIPH_TO_MEM)
 			d40c->lcpa = d40c->base->lcpa_base +
 				d40c->dma_cfg.src_dev_type * D40_LCPA_CHAN_SIZE;
@@ -2487,14 +2481,6 @@ static int d40_alloc_chan_resources(struct dma_chan *chan)
 		 d40c->phy_chan->num,
 		 d40c->dma_cfg.use_fixed_channel ? ", fixed" : "");
 
-
-	/*
-	 * Only write channel configuration to the DMA if the physical
-	 * resource is free. In case of multiple logical channels
-	 * on the same physical resource, only the first write is necessary.
-	 */
-	if (is_free_phy)
-		d40_config_write(d40c);
 fail:
 	pm_runtime_mark_last_busy(d40c->base->dev);
 	pm_runtime_put_autosuspend(d40c->base->dev);
-- 
1.7.10.4


  parent reply	other threads:[~2013-04-09 18:40 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-09 18:39 [PATCH 1/8] dmaengine: ste_dma40: Assign memcpy channels in the driver Lee Jones
2013-04-09 18:39 ` [PATCH 2/8] dmaengine: ste_dma40: Move default memcpy configs into " Lee Jones
2013-04-09 18:39 ` [PATCH 3/8] dmaengine: ste_dma40: Actually write the runtime configuration to registers Lee Jones
2013-04-09 18:59   ` Arnd Bergmann
2013-04-09 19:07     ` Lee Jones
2013-04-09 20:37   ` Arnd Bergmann
2013-04-12 13:49   ` Rabin Vincent
2013-04-12 16:13     ` Lee Jones
2013-04-15 11:06     ` Lee Jones
2013-04-15 11:36       ` Rabin Vincent
2013-04-15 11:59         ` Lee Jones
2013-04-15 13:47           ` Linus Walleij
2013-04-15 14:28             ` Lee Jones
2013-04-09 18:39 ` Lee Jones [this message]
2013-04-12 13:54   ` [PATCH 4/8] dmaengine: ste_dma40: Do not configure channels during an channel allocation Rabin Vincent
2013-04-12 16:38     ` Lee Jones
2013-04-14 16:34       ` Rabin Vincent
2013-04-09 18:39 ` [PATCH 5/8] dmaengine: ste_dma40: Ensure src and dst registers are configured correctly Lee Jones
2013-04-09 18:57   ` Arnd Bergmann
2013-04-09 19:09     ` Lee Jones
2013-04-09 20:38       ` Arnd Bergmann
2013-04-12 14:02   ` Rabin Vincent
2013-04-09 18:39 ` [PATCH 6/8] dmaengine: ste_dma40: Move LCPA allocation and real-time config Lee Jones
2013-04-09 18:56   ` Arnd Bergmann
2013-04-09 18:39 ` [PATCH 7/8] dmaengine: ste_dma40: Use the BIT macro to replace ugly '(1 << x)'s Lee Jones
2013-04-09 18:55   ` Arnd Bergmann
2013-04-09 19:04   ` Harvey Harrison
2013-04-09 19:12     ` Arnd Bergmann
2013-04-10  9:34       ` Lee Jones
2013-04-10 12:22         ` Arnd Bergmann
2013-04-09 19:12     ` Lee Jones
2013-04-09 18:39 ` [PATCH 8/8] ARM: ux500: Amalgamate DMA source and destination channel numbers Lee Jones
2013-04-09 18:51   ` Arnd Bergmann
2013-04-24 13:45 ` [PATCH 1/8] dmaengine: ste_dma40: Assign memcpy channels in the driver Linus Walleij
     [not found]   ` <CAF2Aj3jHPvc=hOcgLq8LONppGtnxUPP96HRPLfCwQ5x4HONUOw@mail.gmail.com>
2013-04-24 15:05     ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1365532783-27425-4-git-send-email-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=arnd@arndb.de \
    --cc=djbw@fb.com \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=per.forlin@stericsson.com \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).