From: Vinod Koul <vkoul@kernel.org>
To: John Stultz <john.stultz@linaro.org>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
lkml <linux-kernel@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Tanglei Han <hantanglei@huawei.com>,
Zhuangluan Su <suzhuangluan@hisilicon.com>,
Ryan Grachek <ryan@edited.us>,
"open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM"
<dmaengine@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>
Subject: [2/8,v4] Documentation: bindings: dma: Add binding for dma-channel-mask
Date: Sun, 20 Jan 2019 16:36:42 +0530 [thread overview]
Message-ID: <20190120110642.GT4635@vkoul-mobl> (raw)
On 17-01-19, 09:43, John Stultz wrote:
> On Thu, Jan 17, 2019 at 9:08 AM Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org> wrote:
> >
> > On Wed, Jan 16, 2019 at 09:10:23AM -0800, John Stultz wrote:
> > > Some dma channels can be reserved for secure mode or other
> > > hardware on the SoC, so provide a binding for a bitmask
> > > listing the available channels for the kernel to use.
> > >
> > > This follows the pre-existing bcm,dma-channel-mask binding.
> > >
> > > Cc: Vinod Koul <vkoul@kernel.org>
> > > Cc: Rob Herring <robh+dt@kernel.org>
> > > Cc: Mark Rutland <mark.rutland@arm.com>
> > > Cc: Tanglei Han <hantanglei@huawei.com>
> > > Cc: Zhuangluan Su <suzhuangluan@hisilicon.com>
> > > Cc: Ryan Grachek <ryan@edited.us>
> > > Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > > Cc: dmaengine@vger.kernel.org
> > > Cc: devicetree@vger.kernel.org
> > > Signed-off-by: John Stultz <john.stultz@linaro.org>
> > > ---
> > > v3: Renamed to hisi-dma-avail-chan
> > > v4: Reworked to generic dma-channel-mask
> > > ---
> > > Documentation/devicetree/bindings/dma/dma.txt | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/dma/dma.txt b/Documentation/devicetree/bindings/dma/dma.txt
> > > index 6312fb0..eeb4e4d 100644
> > > --- a/Documentation/devicetree/bindings/dma/dma.txt
> > > +++ b/Documentation/devicetree/bindings/dma/dma.txt
> > > @@ -16,6 +16,9 @@ Optional properties:
> > > - dma-channels: Number of DMA channels supported by the controller.
> > > - dma-requests: Number of DMA request signals supported by the
> > > controller.
> > > +- dma-channel-mask: Bitmask of available DMA channels in ascending order
> > > + that are not reserved by firmware and are available to
> > > + the kernel. i.e. first channel corresponds to LSB.
> >
> > A general assumption is, "dma-channel-mask" refers to the bit fields of
> > the channels which needs to be masked. But here, it refers to the channels
> > which are available. Doesn't it contradict?
>
> Hrm. So while I can sort of understand the common usage of "mask" as
> to "hide", thus the desire to have a bitfield mean "the channels we
> hide" or "don't use", but in my experience bitmasking is more commonly
> used to keep only a portion of the the bits, so from that perspective
> its more intuitive that a mask be the channels we keep to use. So I'm
> not sure if your suggestion makes it more clear.
>
> But I'm not very particular here, so I'll defer to others on this.
Given the context and documentation which explicitly says it is bitmask
of available channels, i think we are fine :)
WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vkoul@kernel.org>
To: John Stultz <john.stultz@linaro.org>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
lkml <linux-kernel@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Tanglei Han <hantanglei@huawei.com>,
Zhuangluan Su <suzhuangluan@hisilicon.com>,
Ryan Grachek <ryan@edited.us>,
"open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM"
<dmaengine@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/8 v4] Documentation: bindings: dma: Add binding for dma-channel-mask
Date: Sun, 20 Jan 2019 16:36:42 +0530 [thread overview]
Message-ID: <20190120110642.GT4635@vkoul-mobl> (raw)
In-Reply-To: <CALAqxLXc4dE=65MYR5M_jA-uKeGjsN0CL+JjDYbZUTyi+mKUTA@mail.gmail.com>
On 17-01-19, 09:43, John Stultz wrote:
> On Thu, Jan 17, 2019 at 9:08 AM Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org> wrote:
> >
> > On Wed, Jan 16, 2019 at 09:10:23AM -0800, John Stultz wrote:
> > > Some dma channels can be reserved for secure mode or other
> > > hardware on the SoC, so provide a binding for a bitmask
> > > listing the available channels for the kernel to use.
> > >
> > > This follows the pre-existing bcm,dma-channel-mask binding.
> > >
> > > Cc: Vinod Koul <vkoul@kernel.org>
> > > Cc: Rob Herring <robh+dt@kernel.org>
> > > Cc: Mark Rutland <mark.rutland@arm.com>
> > > Cc: Tanglei Han <hantanglei@huawei.com>
> > > Cc: Zhuangluan Su <suzhuangluan@hisilicon.com>
> > > Cc: Ryan Grachek <ryan@edited.us>
> > > Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > > Cc: dmaengine@vger.kernel.org
> > > Cc: devicetree@vger.kernel.org
> > > Signed-off-by: John Stultz <john.stultz@linaro.org>
> > > ---
> > > v3: Renamed to hisi-dma-avail-chan
> > > v4: Reworked to generic dma-channel-mask
> > > ---
> > > Documentation/devicetree/bindings/dma/dma.txt | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/dma/dma.txt b/Documentation/devicetree/bindings/dma/dma.txt
> > > index 6312fb0..eeb4e4d 100644
> > > --- a/Documentation/devicetree/bindings/dma/dma.txt
> > > +++ b/Documentation/devicetree/bindings/dma/dma.txt
> > > @@ -16,6 +16,9 @@ Optional properties:
> > > - dma-channels: Number of DMA channels supported by the controller.
> > > - dma-requests: Number of DMA request signals supported by the
> > > controller.
> > > +- dma-channel-mask: Bitmask of available DMA channels in ascending order
> > > + that are not reserved by firmware and are available to
> > > + the kernel. i.e. first channel corresponds to LSB.
> >
> > A general assumption is, "dma-channel-mask" refers to the bit fields of
> > the channels which needs to be masked. But here, it refers to the channels
> > which are available. Doesn't it contradict?
>
> Hrm. So while I can sort of understand the common usage of "mask" as
> to "hide", thus the desire to have a bitfield mean "the channels we
> hide" or "don't use", but in my experience bitmasking is more commonly
> used to keep only a portion of the the bits, so from that perspective
> its more intuitive that a mask be the channels we keep to use. So I'm
> not sure if your suggestion makes it more clear.
>
> But I'm not very particular here, so I'll defer to others on this.
Given the context and documentation which explicitly says it is bitmask
of available channels, i think we are fine :)
--
~Vinod
next reply other threads:[~2019-01-20 11:06 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-20 11:06 Vinod Koul [this message]
2019-01-20 11:06 ` [PATCH 2/8 v4] Documentation: bindings: dma: Add binding for dma-channel-mask Vinod Koul
-- strict thread matches above, loose matches on Subject: below --
2019-01-24 4:32 [3/8,v4] dma: k3dma: Upgrade k3dma driver to support hisi_asp_dma hardware John Stultz
2019-01-24 4:32 ` [PATCH 3/8 v4] " John Stultz
2019-01-23 12:55 [3/8,v4] " Vinod Koul
2019-01-23 12:55 ` [PATCH 3/8 v4] " Vinod Koul
2019-01-23 0:27 [5/8,v4] dma: k3dma: Add support for dma-channel-mask John Stultz
2019-01-23 0:27 ` [PATCH 5/8 v4] " John Stultz
2019-01-22 23:48 [3/8,v4] dma: k3dma: Upgrade k3dma driver to support hisi_asp_dma hardware John Stultz
2019-01-22 23:48 ` [PATCH 3/8 v4] " John Stultz
2019-01-22 1:13 [2/8,v4] Documentation: bindings: dma: Add binding for dma-channel-mask Rob Herring
2019-01-22 1:13 ` [PATCH 2/8 v4] " Rob Herring
2019-01-22 1:13 ` Rob Herring
2019-01-20 11:11 [3/8,v4] dma: k3dma: Upgrade k3dma driver to support hisi_asp_dma hardware Vinod Koul
2019-01-20 11:11 ` [PATCH 3/8 v4] " Vinod Koul
2019-01-17 17:43 [2/8,v4] Documentation: bindings: dma: Add binding for dma-channel-mask John Stultz
2019-01-17 17:43 ` [PATCH 2/8 v4] " John Stultz
2019-01-17 17:14 [5/8,v4] dma: k3dma: Add support " Manivannan Sadhasivam
2019-01-17 17:14 ` [PATCH 5/8 v4] " Manivannan Sadhasivam
2019-01-17 17:08 [2/8,v4] Documentation: bindings: dma: Add binding " Manivannan Sadhasivam
2019-01-17 17:08 ` [PATCH 2/8 v4] " Manivannan Sadhasivam
2019-01-16 17:10 [5/8,v4] dma: k3dma: Add support " John Stultz
2019-01-16 17:10 ` [PATCH 5/8 v4] " John Stultz
2019-01-16 17:10 [4/8,v4] dma: k3dma: Delete axi_config John Stultz
2019-01-16 17:10 ` [PATCH 4/8 v4] " John Stultz
2019-01-16 17:10 [3/8,v4] dma: k3dma: Upgrade k3dma driver to support hisi_asp_dma hardware John Stultz
2019-01-16 17:10 ` [PATCH 3/8 v4] " John Stultz
2019-01-16 17:10 [2/8,v4] Documentation: bindings: dma: Add binding for dma-channel-mask John Stultz
2019-01-16 17:10 ` [PATCH 2/8 v4] " John Stultz
2019-01-16 17:10 [1/8,v4] Documentation: bindings: k3dma: Extend the k3dma driver binding to support hisi-asp John Stultz
2019-01-16 17:10 ` [PATCH 1/8 v4] " John Stultz
2019-01-16 17:10 [PATCH 0/8 v4] k3dma patches to add support for hi3660/HiKey960 John Stultz
2019-01-16 17:10 ` John Stultz
2019-01-16 17:10 ` John Stultz
2019-01-16 17:10 ` [PATCH 6/8 v4] arm64: dts: hi3660: Add dma to uart nodes John Stultz
2019-01-16 17:10 ` John Stultz
2019-01-16 17:10 ` [PATCH 7/8 v4] arm64: dts: hi3660: Add hisi asp dma device John Stultz
2019-01-16 17:10 ` John Stultz
2019-01-16 17:10 ` John Stultz
2019-01-16 17:10 ` [PATCH 8/8 v4] arm64: dts: hi3660: Fixup unofficial dma-min-chan to dma-channel-mask John Stultz
2019-01-16 17:10 ` John Stultz
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=20190120110642.GT4635@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=hantanglei@huawei.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=ryan@edited.us \
--cc=suzhuangluan@hisilicon.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.