All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jonas Jensen <jonas.jensen@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, arm@kernel.org,
	vinod.koul@intel.com, djbw@fb.com, linux@arm.linux.org.uk
Subject: Re: [PATCH v4] dmaengine: Add MOXA ART DMA engine driver
Date: Fri, 02 Aug 2013 21:28:48 +0200	[thread overview]
Message-ID: <1957393.zQhGBaWaVi@wuerfel> (raw)
In-Reply-To: <CACmBeS1vT6HyhN=Q4Y9izR0F1Es818iU0fQ5-U8LxijRKe=+8w@mail.gmail.com>

On Friday 02 August 2013 14:28:28 Jonas Jensen wrote:
> 
> On 29 July 2013 18:35, Arnd Bergmann <arnd@arndb.de> wrote:
> > You must not override the "dest_req_no" and "dest_req_no" in moxart_slave_config
> > since they are already set by the ->xlate() function and the driver calling
> > slave_config generally has no knowledge of what the slave id is.
> 
> MMC now has a device tree node:
> 
> mmc: mmc@98e00000 {
> compatible = "moxa,moxart-mmc";
> reg = <0x98e00000 0x5C>;
> interrupts = <5 0>;
> clocks = <&coreclk>;
> dmas = <&dma 0>,
>             <&dma 1>;
> dma-names = "tx", "rx";
> };
> 
> .. where the driver requests channel 0-1 and sets cfg.slave_id =
> APB_DMA_SD_REQ_NO for both.
> 
> Perhaps this is not how slave_id is intended to be used?
> 
> Maybe it would be more appropriate to have two DMA cells?
> 
> APB_DMA_SD_REQ_NO can then be moved from driver code to DT.

In most drivers, you can use any channel with any request line number
and let the dmaengine driver pick a channel while you pass just the
request line (slave id) in a single cell in DT. If this does not
work, using two cells is the best approach here.

Removing APB_DMA_SD_REQ_NO from the driver code is definitely the
right approach, since that number is not something specific to the
device, but to the way it is connected to the DMA engine, which
belongs into DT.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] dmaengine: Add MOXA ART DMA engine driver
Date: Fri, 02 Aug 2013 21:28:48 +0200	[thread overview]
Message-ID: <1957393.zQhGBaWaVi@wuerfel> (raw)
In-Reply-To: <CACmBeS1vT6HyhN=Q4Y9izR0F1Es818iU0fQ5-U8LxijRKe=+8w@mail.gmail.com>

On Friday 02 August 2013 14:28:28 Jonas Jensen wrote:
> 
> On 29 July 2013 18:35, Arnd Bergmann <arnd@arndb.de> wrote:
> > You must not override the "dest_req_no" and "dest_req_no" in moxart_slave_config
> > since they are already set by the ->xlate() function and the driver calling
> > slave_config generally has no knowledge of what the slave id is.
> 
> MMC now has a device tree node:
> 
> mmc: mmc at 98e00000 {
> compatible = "moxa,moxart-mmc";
> reg = <0x98e00000 0x5C>;
> interrupts = <5 0>;
> clocks = <&coreclk>;
> dmas = <&dma 0>,
>             <&dma 1>;
> dma-names = "tx", "rx";
> };
> 
> .. where the driver requests channel 0-1 and sets cfg.slave_id =
> APB_DMA_SD_REQ_NO for both.
> 
> Perhaps this is not how slave_id is intended to be used?
> 
> Maybe it would be more appropriate to have two DMA cells?
> 
> APB_DMA_SD_REQ_NO can then be moved from driver code to DT.

In most drivers, you can use any channel with any request line number
and let the dmaengine driver pick a channel while you pass just the
request line (slave id) in a single cell in DT. If this does not
work, using two cells is the best approach here.

Removing APB_DMA_SD_REQ_NO from the driver code is definitely the
right approach, since that number is not something specific to the
device, but to the way it is connected to the DMA engine, which
belongs into DT.

	Arnd

  reply	other threads:[~2013-08-02 19:28 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10  8:51 [PATCH] dmaengine: Add MOXA ART DMA engine driver Jonas Jensen
2013-07-10  8:51 ` Jonas Jensen
2013-07-10  9:30 ` Russell King - ARM Linux
2013-07-10  9:30   ` Russell King - ARM Linux
2013-07-10  9:48   ` Jonas Jensen
2013-07-10  9:48     ` Jonas Jensen
2013-07-10 12:43 ` [PATCH v2] " Jonas Jensen
2013-07-10 12:43   ` Jonas Jensen
2013-07-17 10:06   ` [PATCH v3] " Jonas Jensen
2013-07-17 10:06     ` Jonas Jensen
2013-07-29 13:44     ` [PATCH v4] " Jonas Jensen
2013-07-29 13:44       ` Jonas Jensen
2013-07-29 16:35       ` Arnd Bergmann
2013-07-29 16:35         ` Arnd Bergmann
2013-08-02 12:28         ` Jonas Jensen
2013-08-02 12:28           ` Jonas Jensen
2013-08-02 19:28           ` Arnd Bergmann [this message]
2013-08-02 19:28             ` Arnd Bergmann
2013-08-02 12:03       ` [PATCH v5] " Jonas Jensen
2013-08-02 12:03         ` Jonas Jensen
2013-08-02 13:28         ` [PATCH v6] " Jonas Jensen
2013-08-02 13:28           ` Jonas Jensen
2013-08-02 13:51           ` Russell King - ARM Linux
2013-08-02 13:51             ` Russell King - ARM Linux
2013-08-02 14:09           ` Mark Rutland
2013-08-02 14:09             ` Mark Rutland
2013-08-05 14:37           ` [PATCH v7] " Jonas Jensen
2013-08-05 14:37             ` Jonas Jensen
2013-08-05 16:57             ` Mark Rutland
2013-08-05 16:57               ` Mark Rutland
2013-08-05 20:49             ` Arnd Bergmann
2013-08-05 20:49               ` Arnd Bergmann
2013-08-06 12:38             ` [PATCH v8] " Jonas Jensen
2013-08-06 12:38               ` Jonas Jensen
2013-08-06 18:42               ` Arnd Bergmann
2013-08-06 18:42                 ` Arnd Bergmann
2013-08-07 15:13               ` Mark Rutland
2013-08-07 15:13                 ` Mark Rutland
2013-10-07 13:42                 ` Jonas Jensen
2013-10-07 13:42                   ` Jonas Jensen
2013-10-07 13:13               ` [PATCH v9] " Jonas Jensen
2013-10-07 13:13                 ` Jonas Jensen
2013-10-07 14:10                 ` [PATCH v10] " Jonas Jensen
2013-10-07 14:10                   ` Jonas Jensen
2013-10-07 15:12                   ` Mark Rutland
2013-10-07 15:12                     ` Mark Rutland
2013-10-07 15:12                     ` Mark Rutland
2013-10-08  9:53                     ` Jonas Jensen
2013-10-08  9:53                       ` Jonas Jensen
2013-10-08  9:53                       ` Jonas Jensen
2013-10-08 12:55                       ` Mark Rutland
2013-10-08 12:55                         ` Mark Rutland
2013-10-08 12:55                         ` Mark Rutland
2013-10-08  8:42                   ` [PATCH v11] " Jonas Jensen
2013-10-08  8:42                     ` Jonas Jensen
2013-11-13 13:59                     ` Vinod Koul
2013-11-13 13:59                       ` Vinod Koul
2013-11-13 17:16                       ` Arnd Bergmann
2013-11-13 17:16                         ` Arnd Bergmann
2013-12-06 14:27                     ` [PATCH v12] " Jonas Jensen
2013-12-06 14:27                       ` Jonas Jensen
2013-12-11 15:13                       ` [PATCH v13] " Jonas Jensen
2013-12-11 15:13                         ` Jonas Jensen
2013-12-11 21:27                         ` Arnd Bergmann
2013-12-11 21:27                           ` Arnd Bergmann
2013-12-12  9:16                         ` Andy Shevchenko
2013-12-12  9:16                           ` Andy Shevchenko
2013-12-12 12:32                         ` [PATCH v14] " Jonas Jensen
2013-12-12 12:32                           ` Jonas Jensen
2013-12-13 16:02                           ` Lars-Peter Clausen
2013-12-13 16:02                             ` Lars-Peter Clausen
2013-12-16 10:24                           ` [PATCH v15] " Jonas Jensen
2013-12-16 10:24                             ` Jonas Jensen
2014-01-17  8:46                             ` [PATCH v16] " Jonas Jensen
2014-01-17  8:46                               ` Jonas Jensen
     [not found]                               ` <1389948365-13999-1-git-send-email-jonas.jensen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-01-17 13:29                                 ` Fwd: " Jonas Jensen
2014-01-17 14:42                               ` Arnd Bergmann
2014-01-17 14:42                                 ` Arnd Bergmann
2014-01-20  7:07                               ` Vinod Koul
2014-01-20  7:07                                 ` Vinod Koul

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=1957393.zQhGBaWaVi@wuerfel \
    --to=arnd@arndb.de \
    --cc=arm@kernel.org \
    --cc=djbw@fb.com \
    --cc=jonas.jensen@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=vinod.koul@intel.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 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.