All of lore.kernel.org
 help / color / mirror / Atom feed
From: Flavio Suligoi <f.suligoi@asem.it>
To: Mark Brown <broonie@kernel.org>
Cc: Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 2/2] spi: pxa2xx: use a module softdep for dw_dmac
Date: Thu, 11 Apr 2019 07:14:06 +0000	[thread overview]
Message-ID: <7ad025c8049e4e828ce75ef1e41dcbfd@asem.it> (raw)
In-Reply-To: <20190410152820.GT6106@sirena.org.uk>

> > I think that the problem could be related to how the DMA channel is
> requested.
> > At the moment the function used are:
> 
> > pxa2xx_spi_dma_setup --> dma_request_slave_channel_compat -->
> > --> __dma_request_slave_channel_compat --> dma_request_slave_channel -->
> > --> dma_request_chan
> 
> > Actually the final function "dma_request_chan" return
> > the channel number or "-EPROBE_DEFER" if it's not ready.
> > But this information ("-EPROBE_DEFER") is lost in the penultimate
> function
> > "dma_request_slave_channel", which return only the chann, if all is ok,
> or
> > NULL, in case of errors.
> > So the deferral mechanism is not used.
> 
> Right, yes - that analysis seems correct.  The interfaces seem a bit
> weird here but fixing them looks like the most complete and robust fix.

Ok Mark, I'll fix this problem as soon as I can, using EPROBE_DEFER.
For now, in my application, I use the patch that I already sent,
with the "softdep" workaround:

MODULE_SOFTDEP("pre: dw_dmac");

I tested it a lot, with more than 2000 cold reboot (automatic
switch on/off using a controlled power supply) and it always worked good.

Thanks for your help!

Flavio

WARNING: multiple messages have this Message-ID (diff)
From: Flavio Suligoi <f.suligoi@asem.it>
To: Mark Brown <broonie@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	Daniel Mack <daniel@zonque.org>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH 2/2] spi: pxa2xx: use a module softdep for dw_dmac
Date: Thu, 11 Apr 2019 07:14:06 +0000	[thread overview]
Message-ID: <7ad025c8049e4e828ce75ef1e41dcbfd@asem.it> (raw)
In-Reply-To: <20190410152820.GT6106@sirena.org.uk>

> > I think that the problem could be related to how the DMA channel is
> requested.
> > At the moment the function used are:
> 
> > pxa2xx_spi_dma_setup --> dma_request_slave_channel_compat -->
> > --> __dma_request_slave_channel_compat --> dma_request_slave_channel -->
> > --> dma_request_chan
> 
> > Actually the final function "dma_request_chan" return
> > the channel number or "-EPROBE_DEFER" if it's not ready.
> > But this information ("-EPROBE_DEFER") is lost in the penultimate
> function
> > "dma_request_slave_channel", which return only the chann, if all is ok,
> or
> > NULL, in case of errors.
> > So the deferral mechanism is not used.
> 
> Right, yes - that analysis seems correct.  The interfaces seem a bit
> weird here but fixing them looks like the most complete and robust fix.

Ok Mark, I'll fix this problem as soon as I can, using EPROBE_DEFER.
For now, in my application, I use the patch that I already sent,
with the "softdep" workaround:

MODULE_SOFTDEP("pre: dw_dmac");

I tested it a lot, with more than 2000 cold reboot (automatic
switch on/off using a controlled power supply) and it always worked good.

Thanks for your help!

Flavio

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-04-11  7:14 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 12:51 [PATCH 1/2] spi: pxa2xx: fix SCR (divisor) calculation Flavio Suligoi
2019-04-10 12:51 ` Flavio Suligoi
2019-04-10 12:51 ` [PATCH 2/2] spi: pxa2xx: use a module softdep for dw_dmac Flavio Suligoi
2019-04-10 12:51   ` Flavio Suligoi
2019-04-10 12:56   ` Mark Brown
2019-04-10 12:56     ` Mark Brown
2019-04-10 14:05     ` Flavio Suligoi
2019-04-10 14:05       ` Flavio Suligoi
2019-04-10 15:28       ` Mark Brown
2019-04-10 15:28         ` Mark Brown
2019-04-11  7:14         ` Flavio Suligoi [this message]
2019-04-11  7:14           ` Flavio Suligoi
2019-04-11 10:42           ` Mark Brown
2019-04-11 10:42             ` Mark Brown
2019-04-11 11:31             ` Flavio Suligoi
2019-04-11 11:31               ` Flavio Suligoi
2019-04-12  8:53   ` Applied "spi: pxa2xx: use a module softdep for dw_dmac" to the spi tree Mark Brown
2019-04-12  8:53     ` Mark Brown
2019-04-12  8:53     ` Mark Brown
2019-05-02  2:19   ` Mark Brown
2019-05-02  2:19     ` Mark Brown
2019-05-02  2:19     ` Mark Brown
2019-04-11 11:55 ` [PATCH 1/2] spi: pxa2xx: fix SCR (divisor) calculation Jarkko Nikula
2019-04-11 11:55   ` Jarkko Nikula
2019-04-11 13:10   ` Flavio Suligoi
2019-04-11 13:10     ` Flavio Suligoi

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=7ad025c8049e4e828ce75ef1e41dcbfd@asem.it \
    --to=f.suligoi@asem.it \
    --cc=broonie@kernel.org \
    --cc=daniel@zonque.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=robert.jarzmik@free.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.