diff mbox series

ARM: dts: mps2: use list instead of tuple for uart interrupts

Message ID 1548066939-20880-1-git-send-email-vladimir.murzin@arm.com (mailing list archive)
State New, archived
Headers show
Series ARM: dts: mps2: use list instead of tuple for uart interrupts | expand

Commit Message

Vladimir Murzin Jan. 21, 2019, 10:35 a.m. UTC
MPS2 UART requires dedicated interrupts for RX, TX and overflow, which
obviously should be expressed as a list. Current form uses tuple and
it has worked so far because NVIC has interrupt-cells equal to 1.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
 arch/arm/boot/dts/mps2.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Sudeep Holla Jan. 22, 2019, 11:55 a.m. UTC | #1
On Mon, Jan 21, 2019 at 10:35:39AM +0000, Vladimir Murzin wrote:
> MPS2 UART requires dedicated interrupts for RX, TX and overflow, which
> obviously should be expressed as a list. Current form uses tuple and
> it has worked so far because NVIC has interrupt-cells equal to 1.

Applied for v5.1

Just saw couple of other instances that can be fixed to elsewhere in
vexpress DTS files. Will post it soon with your reported by(though
you didn't report them directly but this patch made me look around)

--
Regards,
Sudeep
Vladimir Murzin Jan. 22, 2019, 1:32 p.m. UTC | #2
On 1/22/19 11:55 AM, Sudeep Holla wrote:
> On Mon, Jan 21, 2019 at 10:35:39AM +0000, Vladimir Murzin wrote:
>> MPS2 UART requires dedicated interrupts for RX, TX and overflow, which
>> obviously should be expressed as a list. Current form uses tuple and
>> it has worked so far because NVIC has interrupt-cells equal to 1.
> 
> Applied for v5.1
> 
> Just saw couple of other instances that can be fixed to elsewhere in
> vexpress DTS files. Will post it soon with your reported by(though
> you didn't report them directly but this patch made me look around)

Thanks!

Now I'm wondering if it is something dtc can warn about?

Cheers
Vladimir

> 
> --
> Regards,
> Sudeep
>
Sudeep Holla Jan. 22, 2019, 1:51 p.m. UTC | #3
On Tue, Jan 22, 2019 at 01:32:26PM +0000, Vladimir Murzin wrote:
> On 1/22/19 11:55 AM, Sudeep Holla wrote:
> > On Mon, Jan 21, 2019 at 10:35:39AM +0000, Vladimir Murzin wrote:
> >> MPS2 UART requires dedicated interrupts for RX, TX and overflow, which
> >> obviously should be expressed as a list. Current form uses tuple and
> >> it has worked so far because NVIC has interrupt-cells equal to 1.
> >
> > Applied for v5.1
> >
> > Just saw couple of other instances that can be fixed to elsewhere in
> > vexpress DTS files. Will post it soon with your reported by(though
> > you didn't report them directly but this patch made me look around)
>
> Thanks!
>
> Now I'm wondering if it is something dtc can warn about?
>

Not sure if it's already in place at different warning level.
I generally try W=1 which itself produces quite a lot of warning, but
yes good if this can be detected by compiler.

--
Regards,
Sudeep
Vladimir Murzin Jan. 22, 2019, 5:14 p.m. UTC | #4
On 1/22/19 1:51 PM, Sudeep Holla wrote:
> On Tue, Jan 22, 2019 at 01:32:26PM +0000, Vladimir Murzin wrote:
>> On 1/22/19 11:55 AM, Sudeep Holla wrote:
>>> On Mon, Jan 21, 2019 at 10:35:39AM +0000, Vladimir Murzin wrote:
>>>> MPS2 UART requires dedicated interrupts for RX, TX and overflow, which
>>>> obviously should be expressed as a list. Current form uses tuple and
>>>> it has worked so far because NVIC has interrupt-cells equal to 1.
>>>
>>> Applied for v5.1
>>>
>>> Just saw couple of other instances that can be fixed to elsewhere in
>>> vexpress DTS files. Will post it soon with your reported by(though
>>> you didn't report them directly but this patch made me look around)
>>
>> Thanks!
>>
>> Now I'm wondering if it is something dtc can warn about?
>>
> 
> Not sure if it's already in place at different warning level.
> I generally try W=1 which itself produces quite a lot of warning, but
> yes good if this can be detected by compiler.

I did some experiments and it looks like it doesn't really distinguish
list from tuple, at least it happily accepts:

/dts-v1/;

/ {
	interrupt-parent = <&intc>;
	intc: interrupt-controller {
		interrupt-controller;
		#interrupt-cells = <2>;
	};

	node0 {
		interrupts = <1 2>;
	};

	node1 {
		interrupts = <1>, <2>;
	};
};


Cheers
Vladimir

> 
> --
> Regards,
> Sudeep
>
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/mps2.dtsi b/arch/arm/boot/dts/mps2.dtsi
index 2346739..6f20e42 100644
--- a/arch/arm/boot/dts/mps2.dtsi
+++ b/arch/arm/boot/dts/mps2.dtsi
@@ -171,7 +171,7 @@ 
 			uart0: serial@4000 {
 				compatible = "arm,mps2-uart";
 				reg = <0x4000 0x1000>;
-				interrupts = <0 1 12>;
+				interrupts = <0>,<1>,<12>;
 				clocks = <&sysclk>;
 				status = "disabled";
 			};
@@ -179,7 +179,7 @@ 
 			uart1: serial@5000 {
 				compatible = "arm,mps2-uart";
 				reg = <0x5000 0x1000>;
-				interrupts = <2 3 12>;
+				interrupts = <2>,<3>,<12>;
 				clocks = <&sysclk>;
 				status = "disabled";
 			};
@@ -187,7 +187,7 @@ 
 			uart2: serial@6000 {
 				compatible = "arm,mps2-uart";
 				reg = <0x6000 0x1000>;
-				interrupts = <4 5 12>;
+				interrupts = <4>,<5>,<12>;
 				clocks = <&sysclk>;
 				status = "disabled";
 			};