public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Robin Gong <yibin.gong@nxp.com>
Cc: "matthias.schiffer@ew.tq-group.com"
	<matthias.schiffer@ew.tq-group.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"robin.murphy@arm.com" <robin.murphy@arm.com>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>, dl-linux-imx <linux-imx@nxp.com>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v1 RFC 1/2] spi: introduce fallback to pio
Date: Mon, 15 Jun 2020 16:55:49 +0530	[thread overview]
Message-ID: <20200615112549.GL1393454@vkoul-mobl> (raw)
In-Reply-To: <VE1PR04MB6638959679C644C76B4D3D3A899C0@VE1PR04MB6638.eurprd04.prod.outlook.com>

Hi Robin,

On 15-06-20, 08:59, Robin Gong wrote:
> On 2020/06/15 15:20 Vinod Koul <vkoul@kernel.org> wrote:

> > > Yes, but both assume spi controller driver could detect such dma
> > > failure before dmaengine_prep_*(). Let's wait Vinod's comment for that
> > > if dmaengine_slave_config could keep direction.
> > 
> > The direction is already in the prep_ call, so sending in dmaengine_slave_config
> > is not required, pls pass it in the prep_ call
> Hi Vinod,
> 	Is there any way to let the device driver to know dma controller is ready
> (in sdma case is sdma firmware loaded or not)before prep_call? Hence, spi core
> could map dma buffer or not. Prep_call is too late for spi core since the buffers
> have been already mapped. 

Can you use .device_alloc_chan_resources for that? This is where all
the resource allocation for a channel should happen...

> 	From my view, seems dmaengine_slave_config is the only one...Further,
> sdma need direction in dmaengine_slave_config phase, because currently
> what's the tx/rx script used on sdma channel is decided not only peripheral_type
> but also direction. For example, spi tx dma is running ram script to workaround
> ecspi ERR009165 while rx dma is running rom script, so only spi tx dma channel
> depends on sdma firmware loaded(now that could be detect by ' load_address
> < 0' in sdma_load_context() and prep_ call finally).
>    I knew direction is deprecated in dmaengine_slave_config, but that's really
> very useful for sdma to check if firmware loaded and spi core could get it earlier
> before prep_call(fallback to PIO if dma is not ready).

I think that is wrong expectation, dmaengine_slave_config should pass
the slave_config to driver and nothing else. The relevant action should
be taken in respective prep_ calls here, so that should be fixed as well

-- 
~Vinod

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

  reply	other threads:[~2020-06-15 11:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 12:58 [PATCH v1 RFC 0/2] introduce fallback to pio in spi core Robin Gong
2020-06-11 12:58 ` [PATCH v1 RFC 1/2] spi: introduce fallback to pio Robin Gong
2020-06-11 13:40   ` Mark Brown
2020-06-12  2:18     ` Robin Gong
2020-06-12 10:13       ` Mark Brown
2020-06-12 13:48         ` Robin Gong
2020-06-12 14:16           ` Mark Brown
2020-06-14 13:04             ` Robin Gong
2020-06-15  7:19               ` Vinod Koul
2020-06-15  8:59                 ` Robin Gong
2020-06-15 11:25                   ` Vinod Koul [this message]
2020-06-16  3:05                     ` Robin Gong
2020-06-15 12:35               ` Mark Brown
2020-06-15 13:35                 ` Robin Gong
2020-06-15 13:39                   ` Mark Brown
2020-06-15 14:18                     ` Robin Gong
2020-06-15 14:36                       ` Mark Brown
2020-06-15 14:53                         ` Robin Gong
2020-06-15 14:55                           ` Mark Brown
2020-06-16  2:03                             ` Robin Gong
2020-06-16  9:59                               ` Mark Brown
2020-06-16 10:13                                 ` Robin Gong
2020-06-16 10:26                                   ` Mark Brown
2020-06-16 12:29                                     ` Robin Gong
2020-06-11 12:58 ` [PATCH v1 RFC 2/2] spi: spi-imx: add fallback feature Robin Gong

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=20200615112549.GL1393454@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=matthias.schiffer@ew.tq-group.com \
    --cc=robin.murphy@arm.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=yibin.gong@nxp.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