linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Clark <james.clark@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>, Frank Li <Frank.li@nxp.com>
Cc: Vladimir Oltean <olteanv@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Larisa Grigore <larisa.grigore@nxp.com>,
	Christoph Hellwig <hch@lst.de>,
	linux-spi@vger.kernel.org, imx@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/6] spi: spi-fsl-dspi: Stub out DMA functions
Date: Wed, 25 Jun 2025 11:19:18 +0100	[thread overview]
Message-ID: <884e86be-112b-44dd-a827-30355a5fdba6@linaro.org> (raw)
In-Reply-To: <0f904f12-295c-48fe-96c7-c64c461cdbbd@app.fastmail.com>



On 25/06/2025 11:00 am, Arnd Bergmann wrote:
> On Wed, Jun 25, 2025, at 11:19, James Clark wrote:
>> On 24/06/2025 6:16 pm, Arnd Bergmann wrote:
>>> On Tue, Jun 24, 2025, at 18:29, Frank Li wrote:
>>
>>> It would also be simpler to enforce this in Kconfig if we only
>>> care about users that use the DMA support.
>>
>> But most of the devices supported by the driver don't do any DMA. That
>> was the reason to stub them out rather than add the Kconfig depends.
> 
> Ah right. So even when running on SoCs that have a DMA engine,
> you can end up not using it?
> 

Yes

> In this case you could have an extra Kconfig symbol to configure
> DMA support for this driver and use that in the source code:
> 
> config SPI_FSL_DSPI_DMA
>        bool "Use DMA engine for offloading Freescale DSPI transfers"
>        depends on SPI_FSL_DSPI && DMA_ENGINE
>        help
>           ....
> 
> 
>       Arnd

Wouldn't that allow someone to break it by disabling (or not enabling) 
that option? The driver won't fall back to the other modes if DMA isn't 
configured, it just won't work. In this case it seems like it's better 
to depend directly on DMA_ENGINE because that fixes the randconfig 
issues, which is the whole reason for the discussion.

Would someone really want an option to disable compilation of two 
functions if their DSPI device is one that doesn't use DMA? Seems like 
this option would always be on anyway.


  reply	other threads:[~2025-06-25 10:19 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24 10:35 [PATCH v3 0/6] spi: spi-fsl-dspi: Target mode improvements James Clark
2025-06-24 10:35 ` [PATCH v3 1/6] spi: spi-fsl-dspi: Clear completion counter before initiating transfer James Clark
2025-06-24 15:58   ` Frank Li
2025-06-25  9:52     ` James Clark
2025-06-24 10:35 ` [PATCH v3 2/6] spi: spi-fsl-dspi: Store status directly in cur_msg->status James Clark
2025-06-24 16:18   ` Frank Li
2025-06-25  9:56     ` James Clark
2025-06-24 10:35 ` [PATCH v3 3/6] spi: spi-fsl-dspi: Stub out DMA functions James Clark
2025-06-24 16:29   ` Frank Li
2025-06-24 17:16     ` Arnd Bergmann
2025-06-25  9:19       ` James Clark
2025-06-25 10:00         ` Arnd Bergmann
2025-06-25 10:19           ` James Clark [this message]
2025-06-25 10:54             ` Arnd Bergmann
2025-06-26 10:04               ` James Clark
2025-06-26 11:34                 ` Mark Brown
2025-06-25  5:25   ` kernel test robot
2025-06-24 10:35 ` [PATCH v3 4/6] spi: spi-fsl-dspi: Use non-coherent memory for DMA James Clark
2025-06-24 16:39   ` Frank Li
2025-06-25  9:00     ` James Clark
2025-06-25 15:04       ` Frank Li
2025-06-26  9:14         ` James Clark
2025-06-26  9:38           ` Arnd Bergmann
2025-06-26 11:16             ` Mark Brown
2025-06-24 10:35 ` [PATCH v3 5/6] spi: spi-fsl-dspi: Increase DMA buffer size James Clark
2025-06-24 10:35 ` [PATCH v3 6/6] spi: spi-fsl-dspi: Report FIFO overflows as errors James Clark
2025-06-24 16:50   ` Frank Li
2025-06-25 10:09     ` James Clark
2025-06-25 14:55       ` Frank Li
2025-06-27  8:52         ` James Clark
2025-06-25  7:10   ` kernel test robot

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=884e86be-112b-44dd-a827-30355a5fdba6@linaro.org \
    --to=james.clark@linaro.org \
    --cc=Frank.li@nxp.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=hch@lst.de \
    --cc=imx@lists.linux.dev \
    --cc=larisa.grigore@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vladimir.oltean@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;
as well as URLs for NNTP newsgroup(s).