linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: kgene.kim@samsung.com, Dan Williams <djbw@fb.com>,
	linus.walleij@linaro.org, Tomasz Figa <tomasz.figa@gmail.com>,
	Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH v2 2/4] dmaengine: add driver for Samsung s3c24xx SoCs
Date: Tue, 20 Aug 2013 13:50:49 +0530	[thread overview]
Message-ID: <20130820082049.GD5810@intel.com> (raw)
In-Reply-To: <201308201023.50594.heiko@sntech.de>

On Tue, Aug 20, 2013 at 10:23:49AM +0200, Heiko Stübner wrote:
> Hi Vinod,
> 
> Am Montag, 19. August 2013, 06:48:12 schrieb Vinod Koul:
> > On Wed, Aug 14, 2013 at 02:00:25PM +0200, Heiko Stübner wrote:
> > > This adds a new driver to support the s3c24xx dma using the dmaengine
> > > and makes the old one in mach-s3c24xx obsolete in the long run.
> > > 
> > > Conceptually the s3c24xx-dma feels like a distant relative of the pl08x
> > > with numerous virtual channels being mapped to a lot less physical ones.
> > > The driver therefore borrows a lot from the amba-pl08x driver in this
> > > regard. Functionality-wise the driver gains a memcpy ability in addition
> > > to the slave_sg one.
> > 
> > If that is the case why cant we have this driver supported from pl08x
> > driver? If the delta is only mapping then can that be seprated or both
> > mapping hanlded? Maybe you and Linus have already though about that?
> 
> Yes we have ... As Tomasz has already written the hardware itself is very much 
> different. It's only the concept of mapping virtual channels to physical 
> channels that is somehow similar.
> 
> It seems my patch message is lacking in making this clearer ;-) .
The above made me believ they are similar contrlllers with differnt mapping!,
hence the question...

> > > +#define DMASKTRIG_STOP		(1 << 2)
> > > +#define DMASKTRIG_ON		(1 << 1)
> > > +#define DMASKTRIG_SWTRIG	(1 << 0)
> > > +
> > > +#define DMAREQSEL		(0x24)
> > > +#define DMAREQSEL_HW		(1 << 0)
> > 
> > This is proper namespacing...
> 
> Hmm, I don't understand meaning of this sentence. Is it a suggestion to change 
> anything?
Sorry above should be read as "this need proper namespacing". The macros like
DMAREQSEL asre farliy egneric and can collide with others. SO the recommendation
is to use something like S3_DMAREQSEL etc

> > > +static irqreturn_t s3c24xx_dma_irq(int irq, void *data)
> > > +{
> > > +	struct s3c24xx_dma_phy *phy = data;
> > > +	struct s3c24xx_dma_chan *s3cchan = phy->serving;
> > > +	struct s3c24xx_txd *txd;
> > > +
> > > +	dev_dbg(&phy->host->pdev->dev, "interrupt on channel %d\n", phy->id);
> > > +
> > > +	if (!s3cchan) {
> > > +		dev_err(&phy->host->pdev->dev, "interrupt on unused channel 
> %d\n",
> > > +			phy->id);
> > > +		return IRQ_NONE;
> > 
> > hmmm, these channles belong to you. So if one of them is behvaing badly,
> > then not handling the interrupt will make things worse...
> 
> hmm ... I'm not sure what a valid handling would be for this.
> 
> The interrupt is only asserted when a transfer is completed - there are no 
> other interrupt-triggers. But when phy->serving is NULL, this also means that 
> the clock of the channel is disabled at this time. So this _should_ never 
> happen.
if that is the case we dont need above, but you added that just for the small
iota of if

> And as written above, the interrupt is only triggered when a transfer was 
> completed and the channel is idle again, so if there is no virtual channel 
> being served, there is nothing else to do.
But if we do get such an interrupt, it means:
a) bug in SW
b) erratic hw behaviour

if you handle and dump the issue at least you have recovered. Rather than
returning and controller asserting interrupt again and again as it is not
cleared.

~Vinod

  reply	other threads:[~2013-08-20  9:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 11:59 [PATCH v2 0/4] ARM: S3C24XX: add dmaengine based dma-driver Heiko Stübner
2013-08-14 11:59 ` [PATCH v2 1/4] ARM: S3C24XX: number the dma clocks Heiko Stübner
2013-08-15 20:04   ` Linus Walleij
2013-08-14 12:00 ` [PATCH v2 2/4] dmaengine: add driver for Samsung s3c24xx SoCs Heiko Stübner
2013-08-19  4:48   ` Vinod Koul
2013-08-19 10:20     ` Tomasz Figa
2013-08-20  8:23     ` Heiko Stübner
2013-08-20  8:20       ` Vinod Koul [this message]
2013-08-21 22:21     ` Linus Walleij
2013-08-14 12:00 ` [PATCH v2 3/4] ARM: S3C24XX: add platform-devices for new dma driver for s3c2412 and s3c2443 Heiko Stübner
2013-08-14 12:01 ` [PATCH v2 4/4] ARM: SAMSUNG: set s3c24xx_dma_filter for s3c64xx-spi0 device Heiko Stübner
2013-08-15 20:07 ` [PATCH v2 0/4] ARM: S3C24XX: add dmaengine based dma-driver Linus Walleij
2013-08-18 18:13 ` Kukjin Kim

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=20130820082049.GD5810@intel.com \
    --to=vinod.koul@intel.com \
    --cc=djbw@fb.com \
    --cc=heiko@sntech.de \
    --cc=kgene.kim@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sylvester.nawrocki@gmail.com \
    --cc=tomasz.figa@gmail.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).