linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ARM: dts: spear13xx: Update SPI dma properties
@ 2022-03-23 17:59 Kuldeep Singh
  2022-03-24  2:39 ` Viresh Kumar
  0 siblings, 1 reply; 8+ messages in thread
From: Kuldeep Singh @ 2022-03-23 17:59 UTC (permalink / raw)
  To: Viresh Kumar, Shiraz Hashim, soc, Rob Herring, Arnd Bergmann
  Cc: linux-arm-kernel, devicetree, linux-kernel

Reorder dmas and dma-names property for spi controller node to make it
compliant with bindings.

Fixes: 6e8887f60f60 ("ARM: SPEAr13xx: Pass generic DW DMAC platform data from DT")
Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
---
v2:
- Add fixes tag
- Remove 1/2 patch from series as it's not required
- v1 discussion link:
  https://lore.kernel.org/linux-devicetree/20220312180615.68929-2-singh.kuldeep87k@gmail.com/

 arch/arm/boot/dts/spear13xx.dtsi | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/spear13xx.dtsi b/arch/arm/boot/dts/spear13xx.dtsi
index c87b881b2c8b..45f0b2a33e02 100644
--- a/arch/arm/boot/dts/spear13xx.dtsi
+++ b/arch/arm/boot/dts/spear13xx.dtsi
@@ -284,9 +284,8 @@ spi0: spi@e0100000 {
 				#size-cells = <0>;
 				interrupts = <0 31 0x4>;
 				status = "disabled";
-				dmas = <&dwdma0 4 0 0>,
-					<&dwdma0 5 0 0>;
-				dma-names = "tx", "rx";
+				dmas = <&dwdma0 5 0 0>, <&dwdma0 4 0 0>;
+				dma-names = "rx", "tx";
 			};
 
 			rtc@e0580000 {
-- 
2.25.1


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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ARM: dts: spear13xx: Update SPI dma properties
  2022-03-23 17:59 [PATCH v2] ARM: dts: spear13xx: Update SPI dma properties Kuldeep Singh
@ 2022-03-24  2:39 ` Viresh Kumar
  2022-03-24  6:25   ` Kuldeep Singh
  0 siblings, 1 reply; 8+ messages in thread
From: Viresh Kumar @ 2022-03-24  2:39 UTC (permalink / raw)
  To: Rob Herring, Kuldeep Singh
  Cc: Viresh Kumar, Shiraz Hashim, soc, Arnd Bergmann,
	linux-arm-kernel, devicetree, linux-kernel

On 23-03-22, 23:29, Kuldeep Singh wrote:
> Reorder dmas and dma-names property for spi controller node to make it
> compliant with bindings.
> 
> Fixes: 6e8887f60f60 ("ARM: SPEAr13xx: Pass generic DW DMAC platform data from DT")
> Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
> ---
> v2:
> - Add fixes tag
> - Remove 1/2 patch from series as it's not required
> - v1 discussion link:
>   https://lore.kernel.org/linux-devicetree/20220312180615.68929-2-singh.kuldeep87k@gmail.com/
> 
>  arch/arm/boot/dts/spear13xx.dtsi | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/spear13xx.dtsi b/arch/arm/boot/dts/spear13xx.dtsi
> index c87b881b2c8b..45f0b2a33e02 100644
> --- a/arch/arm/boot/dts/spear13xx.dtsi
> +++ b/arch/arm/boot/dts/spear13xx.dtsi
> @@ -284,9 +284,8 @@ spi0: spi@e0100000 {
>  				#size-cells = <0>;
>  				interrupts = <0 31 0x4>;
>  				status = "disabled";
> -				dmas = <&dwdma0 4 0 0>,
> -					<&dwdma0 5 0 0>;
> -				dma-names = "tx", "rx";
> +				dmas = <&dwdma0 5 0 0>, <&dwdma0 4 0 0>;
> +				dma-names = "rx", "tx";
>  			};
>  
>  			rtc@e0580000 {

Rob,

I tried to ask this at V1 as well [1]. Why do we need a patch like
this ? Isn't this a DT tooling issue, where it is asking for a fixed
order of values ?

-- 
viresh

[1] https://lore.kernel.org/all/20220312180615.68929-2-singh.kuldeep87k@gmail.com/

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ARM: dts: spear13xx: Update SPI dma properties
  2022-03-24  2:39 ` Viresh Kumar
@ 2022-03-24  6:25   ` Kuldeep Singh
  2022-03-25  1:58     ` Viresh Kumar
  0 siblings, 1 reply; 8+ messages in thread
From: Kuldeep Singh @ 2022-03-24  6:25 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rob Herring, Viresh Kumar, Shiraz Hashim, soc, Arnd Bergmann,
	linux-arm-kernel, devicetree, linux-kernel

On Thu, Mar 24, 2022 at 08:09:04AM +0530, Viresh Kumar wrote:
> On 23-03-22, 23:29, Kuldeep Singh wrote:
> > Reorder dmas and dma-names property for spi controller node to make it
> > compliant with bindings.
> > 
> > Fixes: 6e8887f60f60 ("ARM: SPEAr13xx: Pass generic DW DMAC platform data from DT")
> > Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
> > ---
> > v2:
> > - Add fixes tag
> > - Remove 1/2 patch from series as it's not required
> > - v1 discussion link:
> >   https://lore.kernel.org/linux-devicetree/20220312180615.68929-2-singh.kuldeep87k@gmail.com/
> > 
> >  arch/arm/boot/dts/spear13xx.dtsi | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/spear13xx.dtsi b/arch/arm/boot/dts/spear13xx.dtsi
> > index c87b881b2c8b..45f0b2a33e02 100644
> > --- a/arch/arm/boot/dts/spear13xx.dtsi
> > +++ b/arch/arm/boot/dts/spear13xx.dtsi
> > @@ -284,9 +284,8 @@ spi0: spi@e0100000 {
> >  				#size-cells = <0>;
> >  				interrupts = <0 31 0x4>;
> >  				status = "disabled";
> > -				dmas = <&dwdma0 4 0 0>,
> > -					<&dwdma0 5 0 0>;
> > -				dma-names = "tx", "rx";
> > +				dmas = <&dwdma0 5 0 0>, <&dwdma0 4 0 0>;
> > +				dma-names = "rx", "tx";
> >  			};
> >  
> >  			rtc@e0580000 {
> 
> Rob,
> 
> I tried to ask this at V1 as well [1]. Why do we need a patch like
> this ? Isn't this a DT tooling issue, where it is asking for a fixed
> order of values ?

Fixed order of values is important in case of properties like
compatibles etc. In case of dma-names, yes order shouldn't matter here.

This patch is more of appeasing dtbs_check warning rather than fixing
something. It's safe to go with this patch.
I am not sure if there's a provision to exclude dma-names from fix
ordering checks. Rob can help here in providing better insights.

- Kuldeep

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ARM: dts: spear13xx: Update SPI dma properties
  2022-03-24  6:25   ` Kuldeep Singh
@ 2022-03-25  1:58     ` Viresh Kumar
  2022-03-25  9:11       ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: Viresh Kumar @ 2022-03-25  1:58 UTC (permalink / raw)
  To: Kuldeep Singh
  Cc: Rob Herring, Viresh Kumar, Shiraz Hashim, soc, Arnd Bergmann,
	linux-arm-kernel, devicetree, linux-kernel

On 24-03-22, 11:55, Kuldeep Singh wrote:
> Fixed order of values is important in case of properties like
> compatibles etc. In case of dma-names, yes order shouldn't matter here.
> 
> This patch is more of appeasing dtbs_check warning rather than fixing
> something.

Exactly my point. We have seen similar type of issues with other tools, like
coccinelle, earlier and such patches were rejected as the kernel was just fine
and tooling needs to be fixed.

> It's safe to go with this patch.
> I am not sure if there's a provision to exclude dma-names from fix
> ordering checks. Rob can help here in providing better insights.

-- 
viresh

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ARM: dts: spear13xx: Update SPI dma properties
  2022-03-25  1:58     ` Viresh Kumar
@ 2022-03-25  9:11       ` Arnd Bergmann
  2022-03-25  9:13         ` Viresh Kumar
  2022-03-25 17:38         ` Kuldeep Singh
  0 siblings, 2 replies; 8+ messages in thread
From: Arnd Bergmann @ 2022-03-25  9:11 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Kuldeep Singh, Rob Herring, Viresh Kumar, Shiraz Hashim,
	SoC Team, Arnd Bergmann, Linux ARM, DTML,
	Linux Kernel Mailing List

On Fri, Mar 25, 2022 at 2:58 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 24-03-22, 11:55, Kuldeep Singh wrote:
> > Fixed order of values is important in case of properties like
> > compatibles etc. In case of dma-names, yes order shouldn't matter here.
> >
> > This patch is more of appeasing dtbs_check warning rather than fixing
> > something.
>
> Exactly my point. We have seen similar type of issues with other tools, like
> coccinelle, earlier and such patches were rejected as the kernel was just fine
> and tooling needs to be fixed.
>
> > It's safe to go with this patch.
> > I am not sure if there's a provision to exclude dma-names from fix
> > ordering checks. Rob can help here in providing better insights.

I think it's a question of the scale of the warnings: my understanding is that
there are only a handful of dts files that trigger the warning at all, and it
would be rather hard to change the tooling around this. Since the proposed
dts change is clearly harmless, I don't mind applying it.

Kuldeep, you have probably looked at all dts files in the kernel, can you
say how many of them are affected by the dma property reordering?

         Arnd

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ARM: dts: spear13xx: Update SPI dma properties
  2022-03-25  9:11       ` Arnd Bergmann
@ 2022-03-25  9:13         ` Viresh Kumar
  2022-03-25 17:38         ` Kuldeep Singh
  1 sibling, 0 replies; 8+ messages in thread
From: Viresh Kumar @ 2022-03-25  9:13 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kuldeep Singh, Rob Herring, Viresh Kumar, Shiraz Hashim,
	SoC Team, Linux ARM, DTML, Linux Kernel Mailing List

On 25-03-22, 10:11, Arnd Bergmann wrote:
> On Fri, Mar 25, 2022 at 2:58 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > On 24-03-22, 11:55, Kuldeep Singh wrote:
> > > Fixed order of values is important in case of properties like
> > > compatibles etc. In case of dma-names, yes order shouldn't matter here.
> > >
> > > This patch is more of appeasing dtbs_check warning rather than fixing
> > > something.
> >
> > Exactly my point. We have seen similar type of issues with other tools, like
> > coccinelle, earlier and such patches were rejected as the kernel was just fine
> > and tooling needs to be fixed.
> >
> > > It's safe to go with this patch.
> > > I am not sure if there's a provision to exclude dma-names from fix
> > > ordering checks. Rob can help here in providing better insights.
> 
> I think it's a question of the scale of the warnings: my understanding is that
> there are only a handful of dts files that trigger the warning at all, and it
> would be rather hard to change the tooling around this. Since the proposed
> dts change is clearly harmless, I don't mind applying it.

I am fine if we want to apply this patch as is.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ARM: dts: spear13xx: Update SPI dma properties
  2022-03-25  9:11       ` Arnd Bergmann
  2022-03-25  9:13         ` Viresh Kumar
@ 2022-03-25 17:38         ` Kuldeep Singh
  2022-03-25 19:26           ` Kuldeep Singh
  1 sibling, 1 reply; 8+ messages in thread
From: Kuldeep Singh @ 2022-03-25 17:38 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Viresh Kumar, Rob Herring, Viresh Kumar, Shiraz Hashim, SoC Team,
	Linux ARM, DTML, Linux Kernel Mailing List

On Fri, Mar 25, 2022 at 10:11:41AM +0100, Arnd Bergmann wrote:
> On Fri, Mar 25, 2022 at 2:58 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > On 24-03-22, 11:55, Kuldeep Singh wrote:
> > > Fixed order of values is important in case of properties like
> > > compatibles etc. In case of dma-names, yes order shouldn't matter here.
> > >
> > > This patch is more of appeasing dtbs_check warning rather than fixing
> > > something.
> >
> > Exactly my point. We have seen similar type of issues with other tools, like
> > coccinelle, earlier and such patches were rejected as the kernel was just fine
> > and tooling needs to be fixed.
> >
> > > It's safe to go with this patch.
> > > I am not sure if there's a provision to exclude dma-names from fix
> > > ordering checks. Rob can help here in providing better insights.
> 
> I think it's a question of the scale of the warnings: my understanding is that
> there are only a handful of dts files that trigger the warning at all, and it
> would be rather hard to change the tooling around this. Since the proposed
> dts change is clearly harmless, I don't mind applying it.
> 
> Kuldeep, you have probably looked at all dts files in the kernel, can you
> say how many of them are affected by the dma property reordering?

I have checked spi-pl022.yaml as of now and this was the only one which
was affected with dma ordering.

For all dts files, I can definitely give a try and will come up with
some numbers. Please note, there are still bindings left to be converted
to yaml format, so won't be able to catch those cases.

- Kuldeep

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ARM: dts: spear13xx: Update SPI dma properties
  2022-03-25 17:38         ` Kuldeep Singh
@ 2022-03-25 19:26           ` Kuldeep Singh
  0 siblings, 0 replies; 8+ messages in thread
From: Kuldeep Singh @ 2022-03-25 19:26 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Viresh Kumar, Rob Herring, Viresh Kumar, Shiraz Hashim, SoC Team,
	Linux ARM, DTML, Linux Kernel Mailing List

On Fri, Mar 25, 2022 at 11:08:26PM +0530, Kuldeep Singh wrote:
> On Fri, Mar 25, 2022 at 10:11:41AM +0100, Arnd Bergmann wrote:
> > On Fri, Mar 25, 2022 at 2:58 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > > On 24-03-22, 11:55, Kuldeep Singh wrote:
> > > > Fixed order of values is important in case of properties like
> > > > compatibles etc. In case of dma-names, yes order shouldn't matter here.
> > > >
> > > > This patch is more of appeasing dtbs_check warning rather than fixing
> > > > something.
> > >
> > > Exactly my point. We have seen similar type of issues with other tools, like
> > > coccinelle, earlier and such patches were rejected as the kernel was just fine
> > > and tooling needs to be fixed.
> > >
> > > > It's safe to go with this patch.
> > > > I am not sure if there's a provision to exclude dma-names from fix
> > > > ordering checks. Rob can help here in providing better insights.
> > 
> > I think it's a question of the scale of the warnings: my understanding is that
> > there are only a handful of dts files that trigger the warning at all, and it
> > would be rather hard to change the tooling around this. Since the proposed
> > dts change is clearly harmless, I don't mind applying it.
> > 
> > Kuldeep, you have probably looked at all dts files in the kernel, can you
> > say how many of them are affected by the dma property reordering?
> 
> I have checked spi-pl022.yaml as of now and this was the only one which
> was affected with dma ordering.
> 
> For all dts files, I can definitely give a try and will come up with
> some numbers. Please note, there are still bindings left to be converted
> to yaml format, so won't be able to catch those cases.

I checked and found below dts with dma-names warnings[1].
spear1340, spear1310, spear13xx, fsl-ls1043a, fsl-ls1046a 

Yes Arnd, you were right. Very few dts are affected by dma ordering
right now. There might be cases where nodes don't define generic names
and thus not running required checks, still I assume the numbers will be
very less. So, probably we can go ahead with the change.

- Kuldeep
[1]
root@9a2d8922b8f1:~/linux/torvalds# grep "'rx' was expected" output.txt
arch/arm/boot/dts/spear1340-evb.dt.yaml: spi@e0100000: dma-names:0: 'rx' was expected
arch/arm/boot/dts/spear1310-evb.dt.yaml: spi@e0100000: dma-names:0: 'rx' was expected
arch/arm/boot/dts/spear1340-evb.dt.yaml: serial@b4100000: dma-names:0: 'rx' was expected

root@9a2d8922b8f1:~/linux/torvalds# grep "'rx' was expected" arm64_all
arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dt.yaml: i2c@2180000: dma-names:0: 'rx' was expected
arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dt.yaml: i2c@2180000: dma-names:0: 'rx' was expected
arch/arm64/boot/dts/freescale/fsl-ls1046a-frwy.dt.yaml: i2c@2180000: dma-names:0: 'rx' was expected
arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dt.yaml: i2c@2180000: dma-names:0: 'rx' was expected
arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dt.yaml: i2c@2180000: dma-names:0: 'rx' was expected

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-25 19:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23 17:59 [PATCH v2] ARM: dts: spear13xx: Update SPI dma properties Kuldeep Singh
2022-03-24  2:39 ` Viresh Kumar
2022-03-24  6:25   ` Kuldeep Singh
2022-03-25  1:58     ` Viresh Kumar
2022-03-25  9:11       ` Arnd Bergmann
2022-03-25  9:13         ` Viresh Kumar
2022-03-25 17:38         ` Kuldeep Singh
2022-03-25 19:26           ` Kuldeep Singh

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).