diff mbox

tty: serial: msm_serial: Use DT aliases

Message ID 545C694D.1030204@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Frank Rowand Nov. 7, 2014, 6:40 a.m. UTC
From: Frank Rowand <frank.rowand@sonymobile.com>

Update msm8974 dtsi for msm_serial to reflect msm_serial_probe()
getting line id from the serial alias.

Signed-off-by: Frank Rowand <frank.rowand@sonymobile.com>
---
 arch/arm/boot/dts/qcom-msm8974.dtsi |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Frank Rowand Nov. 7, 2014, 6:42 a.m. UTC | #1
On 11/6/2014 10:40 PM, Frank Rowand wrote:
> From: Frank Rowand <frank.rowand@sonymobile.com>
> 
> Update msm8974 dtsi for msm_serial to reflect msm_serial_probe()
> getting line id from the serial alias.
> 
> Signed-off-by: Frank Rowand <frank.rowand@sonymobile.com>
> ---
>  arch/arm/boot/dts/qcom-msm8974.dtsi |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> Index: b/arch/arm/boot/dts/qcom-msm8974.dtsi
> ===================================================================
> --- a/arch/arm/boot/dts/qcom-msm8974.dtsi
> +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
> @@ -9,6 +9,10 @@
>  	compatible = "qcom,msm8974";
>  	interrupt-parent = <&intc>;
>  
> +	aliases {
> +		serial0 = &serial0;
> +	};
> +
>  	cpus {
>  		#address-cells = <1>;
>  		#size-cells = <0>;
> @@ -189,7 +193,7 @@
>  			reg = <0xfd8c0000 0x6000>;
>  		};
>  
> -		serial@f991e000 {
> +		serial0: serial@f991e000 {
>  			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
>  			reg = <0xf991e000 0x1000>;
>  			interrupts = <0 108 0x0>;
> 

This same change is also needed in:

  qcom-ipq8064.dtsi
  qcom-msm8960.dtsi
  qcom-apq8084.dtsi
  qcom-apq8064.dtsi
  qcom-msm8660.dtsi

but I did not want to just blindly apply those changes without testing.

-Frank
Arnd Bergmann Nov. 7, 2014, 9:47 a.m. UTC | #2
On Thursday 06 November 2014 22:42:47 Frank Rowand wrote:
> This same change is also needed in:
> 
>   qcom-ipq8064.dtsi
>   qcom-msm8960.dtsi
>   qcom-apq8084.dtsi
>   qcom-apq8064.dtsi
>   qcom-msm8660.dtsi
> 
> but I did not want to just blindly apply those changes without testing.
> 

Is there only one uart on each of these?

If not, it would be better to put the aliases in the board specific file,
pointing to whichever ports are in use, in the order that makes sense
for that board.

	Arnd
Frank Rowand Nov. 7, 2014, 9:35 p.m. UTC | #3
On 11/7/2014 1:47 AM, Arnd Bergmann wrote:
> On Thursday 06 November 2014 22:42:47 Frank Rowand wrote:
>> This same change is also needed in:
>>
>>   qcom-ipq8064.dtsi
>>   qcom-msm8960.dtsi
>>   qcom-apq8084.dtsi
>>   qcom-apq8064.dtsi
>>   qcom-msm8660.dtsi
>>
>> but I did not want to just blindly apply those changes without testing.
>>
> 
> Is there only one uart on each of these?
> 
> If not, it would be better to put the aliases in the board specific file,
> pointing to whichever ports are in use, in the order that makes sense
> for that board.

Good point, thanks for bringing it up.

Your comment made me verify that the board dts files can override the
aliases from the included .dtsi.  So not a problem to have a default
set of aliases in the .dtsi files.

-Frank
Arnd Bergmann Nov. 8, 2014, 7:25 p.m. UTC | #4
On Friday 07 November 2014 13:35:45 Frank Rowand wrote:
> On 11/7/2014 1:47 AM, Arnd Bergmann wrote:
> > On Thursday 06 November 2014 22:42:47 Frank Rowand wrote:
> >> This same change is also needed in:
> >>
> >>   qcom-ipq8064.dtsi
> >>   qcom-msm8960.dtsi
> >>   qcom-apq8084.dtsi
> >>   qcom-apq8064.dtsi
> >>   qcom-msm8660.dtsi
> >>
> >> but I did not want to just blindly apply those changes without testing.
> >>
> > 
> > Is there only one uart on each of these?
> > 
> > If not, it would be better to put the aliases in the board specific file,
> > pointing to whichever ports are in use, in the order that makes sense
> > for that board.
> 
> Good point, thanks for bringing it up.
> 
> Your comment made me verify that the board dts files can override the
> aliases from the included .dtsi.  So not a problem to have a default
> set of aliases in the .dtsi files.

I would think it's better to keep them in the per-board file out of
principle though.
	
	Arnd
diff mbox

Patch

Index: b/arch/arm/boot/dts/qcom-msm8974.dtsi
===================================================================
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -9,6 +9,10 @@ 
 	compatible = "qcom,msm8974";
 	interrupt-parent = <&intc>;
 
+	aliases {
+		serial0 = &serial0;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -189,7 +193,7 @@ 
 			reg = <0xfd8c0000 0x6000>;
 		};
 
-		serial@f991e000 {
+		serial0: serial@f991e000 {
 			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
 			reg = <0xf991e000 0x1000>;
 			interrupts = <0 108 0x0>;