devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
To: Alex Smith <alex@alex-smith.me.uk>
Cc: vinod.koul@intel.com, dan.j.williams@intel.com,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH_V3 1/3] dt-bindings: dma: Add binding for jz4780-dma
Date: Fri, 27 Feb 2015 09:20:38 +0000	[thread overview]
Message-ID: <54F036E6.9010700@imgtec.com> (raw)
In-Reply-To: <CAOFt0_CiopFkYECuQUczOtNoo6D8zbCOaE6attP6=KU4zicV7w@mail.gmail.com>

Hi Alex,

On 26/02/15 20:04, Alex Smith wrote:
> Hi Zubair,
> 
> On 26 February 2015 at 12:43, Zubair Lutfullah Kakakhel
> <Zubair.Kakakhel@imgtec.com> wrote:
>> From: Alex Smith <alex.smith@imgtec.com>
>>
>> Add device tree bindings for the DMA controller on JZ4780 SoCs, used by
>> the dma-jz4780 driver.
>>
>> Signed-off-by: Alex Smith <alex.smith@imgtec.com>
>> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>>
>> ---
>> V3 -> V2
>> Changed binding.
>> Used to be 3 DMA cells required. <&dma TX_type RX_type Reserved>
>> Now 2 DMA cells are required. <&dma Transfer_type Reserved>
>>
>> This is more common in DMA bindings.
>> And I couldn't figure any reason that 3 cells were used.
> 
> There are different request type numbers for transfers to/from the
> same device (see the JZ4780 programmers manual, page 505). While only
> having the option to specify one transfer type is OK when the driver
> is using separate channels for read/writes, I recall seeing/writing
> some other drivers which use a single channel for both reads and
> writes. This would not be possible if we can only specify one transfer
> type, you'd have to have them separate.
> 

I know. I looked at the drivers and did this on purpose.

We'd like to keep the same bindings/code for jz4740/jz4780 peripheral drivers and dma code.

Our jz47xx-mmc driver we had was the main culprit I found. As well as the jz4740-i2s one.

However, jz4740-mmc upstream driver has improved already for dma and takes two dma channels.
And the jz4740-i2s also takes two channels. One for Tx and one for Rx.

If we move to 3 cells for jz4780-dma. Then 'ideally' jz4740-dma would need 3 cells too.
Or we'd have a binding nightmare everywhere.

But when we use jz4740-mmc and jz4740-i2s, we still have to change the driver to share one channel 
or simply pass them
<&dma Tx 0 Reserved>
<&dma 0 Rx Reserved>

Which makes the binding redundant.

There isn't any particular reason a driver would need to share one channel only.
The 'special' nand/nemc channels don't have a request type.

Thanks,
ZubairLK

> Thanks,
> Alex

  reply	other threads:[~2015-02-27  9:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26 12:43 [PATCH_V3 0/3] dma: dt: Add DMA driver for jz4780 Zubair Lutfullah Kakakhel
2015-02-26 12:43 ` [PATCH_V3 1/3] dt-bindings: dma: Add binding for jz4780-dma Zubair Lutfullah Kakakhel
     [not found]   ` <1424954614-12589-2-git-send-email-Zubair.Kakakhel-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2015-02-26 20:04     ` Alex Smith
2015-02-27  9:20       ` Zubair Lutfullah Kakakhel [this message]
     [not found]         ` <54F036E6.9010700-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2015-02-28  9:58           ` Alex Smith
2015-02-26 12:43 ` [PATCH_V3 2/3] dma: jz4780: add driver for the Ingenic JZ4780 DMA controller Zubair Lutfullah Kakakhel
2015-03-16 10:46   ` Vinod Koul
     [not found]     ` <20150316104646.GM32683-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-17 18:07       ` Zubair Lutfullah Kakakhel
2015-03-18 11:19         ` Vinod Koul
2015-02-26 12:43 ` [PATCH_V3 3/3] MAINTAINERS: Add Ingenic JZ4780 DMA driver maintainer entry Zubair Lutfullah Kakakhel

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=54F036E6.9010700@imgtec.com \
    --to=zubair.kakakhel@imgtec.com \
    --cc=alex@alex-smith.me.uk \
    --cc=dan.j.williams@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 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).