All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Kuldeep Singh <singh.kuldeep87k@gmail.com>,
	SoC Team <soc@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Viresh Kumar <vireshk@kernel.org>,
	Shiraz Hashim <shiraz.linux.kernel@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	DTML <devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] ARM: dts: spear13xx: Update SPI dma properties
Date: Mon, 14 Mar 2022 11:27:05 +0100	[thread overview]
Message-ID: <CAK8P3a1Go8xiQG=BLBmqoQiVqwkcR+T8gi0WLijzVfa3A_WuKA@mail.gmail.com> (raw)
In-Reply-To: <20220314073102.l6vokyookzyo76hj@vireshk-i7>

On Mon, Mar 14, 2022 at 8:31 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 14-03-22, 12:24, Kuldeep Singh wrote:
> > Dma-names order matters here.
> > As per pl022 binding, dma-names order specify rx,tx and all DTs which
> > have tx,rx as order start raising dtbs_chek warning. Thus, need to
> > reverse this order. Please note, no functional change in this patch
> > apart from just fixing warning.
> >
> > Warning:
> > 'rx' was expected
> > 'tx' was expected
>
> Hmm. I see your point now.
>
>   dma-names:
>     description:
>       There must be at least one channel named "tx" for transmit and named "rx"
>       for receive.
>     minItems: 2
>     maxItems: 32
>     additionalItems: true
>     items:
>       - const: rx
>       - const: tx
>
>
> I was expecting above to allow adding the items in any order, but
> looks like the order is fixed with this.

I don't think that it was meant to have a fixed order: unlike the other
bindings that define xxx-names properties, dmas require giving
names to allow the DT to specify more than one possible DMA
specifier for a given name. This means that nothing may ever just
rely on an index but has to use the name for lookup.

OTOH, while fixing the order in the binding does not add any
value, it's also harmless as this should never be able to break
anything that worked for any combination of old/new dtb and
kernel, and it's probably easier to express in the binding.

       Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Kuldeep Singh <singh.kuldeep87k@gmail.com>,
	SoC Team <soc@kernel.org>,  Arnd Bergmann <arnd@arndb.de>,
	Viresh Kumar <vireshk@kernel.org>,
	 Shiraz Hashim <shiraz.linux.kernel@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	DTML <devicetree@vger.kernel.org>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] ARM: dts: spear13xx: Update SPI dma properties
Date: Mon, 14 Mar 2022 11:27:05 +0100	[thread overview]
Message-ID: <CAK8P3a1Go8xiQG=BLBmqoQiVqwkcR+T8gi0WLijzVfa3A_WuKA@mail.gmail.com> (raw)
In-Reply-To: <20220314073102.l6vokyookzyo76hj@vireshk-i7>

On Mon, Mar 14, 2022 at 8:31 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 14-03-22, 12:24, Kuldeep Singh wrote:
> > Dma-names order matters here.
> > As per pl022 binding, dma-names order specify rx,tx and all DTs which
> > have tx,rx as order start raising dtbs_chek warning. Thus, need to
> > reverse this order. Please note, no functional change in this patch
> > apart from just fixing warning.
> >
> > Warning:
> > 'rx' was expected
> > 'tx' was expected
>
> Hmm. I see your point now.
>
>   dma-names:
>     description:
>       There must be at least one channel named "tx" for transmit and named "rx"
>       for receive.
>     minItems: 2
>     maxItems: 32
>     additionalItems: true
>     items:
>       - const: rx
>       - const: tx
>
>
> I was expecting above to allow adding the items in any order, but
> looks like the order is fixed with this.

I don't think that it was meant to have a fixed order: unlike the other
bindings that define xxx-names properties, dmas require giving
names to allow the DT to specify more than one possible DMA
specifier for a given name. This means that nothing may ever just
rely on an index but has to use the name for lookup.

OTOH, while fixing the order in the binding does not add any
value, it's also harmless as this should never be able to break
anything that worked for any combination of old/new dtb and
kernel, and it's probably easier to express in the binding.

       Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-03-14 10:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-12 18:06 [PATCH 0/2] More DT fixes for arm,pl022 Kuldeep Singh
2022-03-12 18:06 ` Kuldeep Singh
2022-03-12 18:06 ` [PATCH 1/2] ARM: dts: spear13xx: Update SPI dma properties Kuldeep Singh
2022-03-12 18:06   ` Kuldeep Singh
2022-03-14  3:51   ` Viresh Kumar
2022-03-14  3:51     ` Viresh Kumar
2022-03-14  6:54     ` Kuldeep Singh
2022-03-14  6:54       ` Kuldeep Singh
2022-03-14  7:31       ` Viresh Kumar
2022-03-14  7:31         ` Viresh Kumar
2022-03-14 10:27         ` Arnd Bergmann [this message]
2022-03-14 10:27           ` Arnd Bergmann
2022-03-14 10:43           ` Viresh Kumar
2022-03-14 10:43             ` Viresh Kumar
2022-03-12 18:06 ` [PATCH 2/2] ARM: dts: lpc18xx: " Kuldeep Singh
2022-03-12 18:06   ` Kuldeep Singh
2022-03-23 17:52   ` Kuldeep Singh
2022-03-23 17:52     ` Kuldeep Singh

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='CAK8P3a1Go8xiQG=BLBmqoQiVqwkcR+T8gi0WLijzVfa3A_WuKA@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=shiraz.linux.kernel@gmail.com \
    --cc=singh.kuldeep87k@gmail.com \
    --cc=soc@kernel.org \
    --cc=viresh.kumar@linaro.org \
    --cc=vireshk@kernel.org \
    /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.