mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
Cc: computersforpeace@gmail.com, dwmw2@infradead.org, richard@nod.at,
	boris.brezillon@free-electrons.com, marek.vasut@gmail.com,
	linux-mtd@lists.infradead.org, broonie@kernel.org,
	vigneshr@ti.com, linux@armlinux.org.uk,
	linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
	devicetree@vger.kernel.org, nicolas.ferre@microchip.com,
	radu.pirea@microchip.com
Subject: Re: [PATCH 2/3] dt-bindings: mtd: atmel-quadspi: add an optional property 'dmacap,memcpy'
Date: Tue, 26 Dec 2017 17:23:30 -0600	[thread overview]
Message-ID: <20171226232330.trljk2ofyvu4ly3n@rob-hp-laptop> (raw)
In-Reply-To: <143542c61ca674d53da4985bbabc142e8e6ebefc.1514087323.git.cyrille.pitchen@wedev4u.fr>

On Sun, Dec 24, 2017 at 05:36:05AM +0100, Cyrille Pitchen wrote:
> The optional 'dmacap,memcpy' DT property tells the Atmel QSPI controller
> driver to reserve some DMA channel then to use it to perform DMA
> memcpy() during data transfers. This feature relies on the generic
> bounce buffer helper from spi-nor.c.
> 
> Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
> ---
>  Documentation/devicetree/bindings/mtd/atmel-quadspi.txt | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/atmel-quadspi.txt b/Documentation/devicetree/bindings/mtd/atmel-quadspi.txt
> index b93c1e2f25dd..002d3f0a445b 100644
> --- a/Documentation/devicetree/bindings/mtd/atmel-quadspi.txt
> +++ b/Documentation/devicetree/bindings/mtd/atmel-quadspi.txt
> @@ -12,6 +12,10 @@ Required properties:
>  - #address-cells: Should be <1>.
>  - #size-cells:    Should be <0>.
>  
> +Optional properties:
> +- dmacap,memcpy:  Reserve a DMA channel to perform DMA memcpy() between the
> +                  system memory and the QSPI mapped memory.

How is this a h/w property? Why would I not want to always enable DMA if 
possible?

Furthermore, you are reusing a property, but giving it a different 
meaning. The current definition is an indication whether a DMA 
controller supports memcpy operations or not. It is not a flag for 
clients to use memcpy channels.

Why don't you use "dmas" property to point to the DMA controller.

> +
>  Example:
>  
>  spi@f0020000 {
> @@ -24,6 +28,7 @@ spi@f0020000 {
>  	#size-cells = <0>;
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pinctrl_spi0_default>;
> +	dmacap,memcpy;
>  
>  	m25p80@0 {
>  		...
> -- 
> 2.11.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-12-26 23:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-24  4:36 [PATCH 0/3] mtd: spi-nor: fix DMA-unsafe buffer issue between MTD and SPI Cyrille Pitchen
2017-12-24  4:36 ` [PATCH 1/3] mtd: spi-nor: add optional DMA-safe bounce buffer for data transfer Cyrille Pitchen
2017-12-26 13:42   ` Vignesh R
2017-12-26 13:59     ` Cyrille Pitchen
2018-01-07 20:07       ` Boris Brezillon
2017-12-26 19:43   ` Trent Piepho
2017-12-28 10:39     ` Cyrille Pitchen
2017-12-28 18:54       ` Trent Piepho
2017-12-29 10:16         ` Vignesh R
2017-12-29 18:03           ` Trent Piepho
2018-01-02 10:00             ` Vignesh R
2018-01-07 20:49   ` Boris Brezillon
2017-12-24  4:36 ` [PATCH 2/3] dt-bindings: mtd: atmel-quadspi: add an optional property 'dmacap,memcpy' Cyrille Pitchen
2017-12-26 23:23   ` Rob Herring [this message]
2017-12-27 21:40     ` Cyrille Pitchen
2018-01-02 10:22       ` Ludovic Desroches
2018-01-02 19:18         ` Trent Piepho
2018-01-03  6:51           ` ludovic.desroches
2018-01-03 11:51       ` Mark Brown
2017-12-24  4:36 ` [PATCH 3/3] mtd: atmel-quadspi: add support of DMA memcpy() Cyrille Pitchen
2017-12-26 18:45 ` [PATCH 0/3] mtd: spi-nor: fix DMA-unsafe buffer issue between MTD and SPI Trent Piepho
2017-12-27 10:36   ` Mark Brown
2017-12-27 20:15     ` Trent Piepho
2017-12-28  9:36       ` Cyrille Pitchen
2018-01-03 11:49       ` Mark Brown
2017-12-29  9:16   ` Vignesh R

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=20171226232330.trljk2ofyvu4ly3n@rob-hp-laptop \
    --to=robh@kernel.org \
    --cc=boris.brezillon@free-electrons.com \
    --cc=broonie@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@wedev4u.fr \
    --cc=devicetree@vger.kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marek.vasut@gmail.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=radu.pirea@microchip.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.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

all inboxes | Powered by JetHome®