linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: mvebu: Fix armada-385-turris-omnia stdout-path
       [not found] <71af60f5-b657-cab4-32a8-00a604fc656e@suse.de>
@ 2016-11-27 19:37 ` Andreas Färber
  2016-11-27 21:10   ` Andrew Lunn
  2016-11-27 21:25   ` Uwe Kleine-König
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Färber @ 2016-11-27 19:37 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Uwe Kleine-König, Michal Hrusecki, Tomas Hlavacek,
	Bedřicha Košatu, Andreas Färber, Jason Cooper,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth, Rob Herring,
	Mark Rutland, Russell King, devicetree, linux-kernel

Specify the baudrate.

Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia")
Cc: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 arch/arm/boot/dts/armada-385-turris-omnia.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/armada-385-turris-omnia.dts b/arch/arm/boot/dts/armada-385-turris-omnia.dts
index f53cb8b73610..2eff012287d4 100644
--- a/arch/arm/boot/dts/armada-385-turris-omnia.dts
+++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts
@@ -52,7 +52,7 @@
 	compatible = "cznic,turris-omnia", "marvell,armada385", "marvell,armada380";
 
 	chosen {
-		stdout-path = &uart0;
+		stdout-path = "serial0:115200n8";
 	};
 
 	memory {
-- 
2.6.6

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

* Re: [PATCH] ARM: dts: mvebu: Fix armada-385-turris-omnia stdout-path
  2016-11-27 19:37 ` [PATCH] ARM: dts: mvebu: Fix armada-385-turris-omnia stdout-path Andreas Färber
@ 2016-11-27 21:10   ` Andrew Lunn
  2016-11-27 21:25   ` Uwe Kleine-König
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2016-11-27 21:10 UTC (permalink / raw)
  To: Andreas Färber
  Cc: linux-arm-kernel, Uwe Kleine-König, Michal Hrusecki,
	Tomas Hlavacek, Bed??icha Ko??atu, Jason Cooper, Gregory Clement,
	Sebastian Hesselbarth, Rob Herring, Mark Rutland, Russell King,
	devicetree, linux-kernel

On Sun, Nov 27, 2016 at 08:37:24PM +0100, Andreas Färber wrote:
> Specify the baudrate.

Hi Andreas

Please put each patch/patchset in a new thread.

> Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia")
> Cc: Uwe Kleine-König <uwe@kleine-koenig.org>
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH] ARM: dts: mvebu: Fix armada-385-turris-omnia stdout-path
  2016-11-27 19:37 ` [PATCH] ARM: dts: mvebu: Fix armada-385-turris-omnia stdout-path Andreas Färber
  2016-11-27 21:10   ` Andrew Lunn
@ 2016-11-27 21:25   ` Uwe Kleine-König
  2016-11-27 22:14     ` Andreas Färber
  1 sibling, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2016-11-27 21:25 UTC (permalink / raw)
  To: Andreas Färber
  Cc: linux-arm-kernel, Mark Rutland, Andrew Lunn, Jason Cooper,
	devicetree, Tomas Hlavacek, Russell King, linux-kernel,
	Rob Herring, Gregory Clement, Sebastian Hesselbarth,
	Bedřicha Košatu, Michal Hrusecki

On Sun, Nov 27, 2016 at 08:37:24PM +0100, Andreas Färber wrote:
> Specify the baudrate.
> 
> Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia")
> Cc: Uwe Kleine-König <uwe@kleine-koenig.org>
> Signed-off-by: Andreas Färber <afaerber@suse.de>

You said with plain &uart0 the kernel uses a wrong baud rate? That's
strange. For me it works and I think it's the intended behaviour to
dermine the baud rate setup by the bootloader and use this.

I'd prefer it this way over hard coding the baud rate.

>  arch/arm/boot/dts/armada-385-turris-omnia.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/armada-385-turris-omnia.dts b/arch/arm/boot/dts/armada-385-turris-omnia.dts
> index f53cb8b73610..2eff012287d4 100644
> --- a/arch/arm/boot/dts/armada-385-turris-omnia.dts
> +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts
> @@ -52,7 +52,7 @@
>  	compatible = "cznic,turris-omnia", "marvell,armada385", "marvell,armada380";
>  
>  	chosen {
> -		stdout-path = &uart0;
> +		stdout-path = "serial0:115200n8";
>  	};
>  
>  	memory {

This has the downside to depend on the alias. Not sure this is
considered modern. An alternative would be:

	stdout-path = "/soc/internal-regs/serial@12000:115200n8";

(maybe there even exists syntactic sugar to express this using &uart0?)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* Re: [PATCH] ARM: dts: mvebu: Fix armada-385-turris-omnia stdout-path
  2016-11-27 21:25   ` Uwe Kleine-König
@ 2016-11-27 22:14     ` Andreas Färber
  2016-11-27 22:30       ` Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Färber @ 2016-11-27 22:14 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-arm-kernel, Mark Rutland, Andrew Lunn, Jason Cooper,
	devicetree, Tomas Hlavacek, Russell King, linux-kernel,
	Rob Herring, Gregory Clement, Sebastian Hesselbarth,
	Bedřicha Košatu, Michal Hrusecki

Am 27.11.2016 um 22:25 schrieb Uwe Kleine-König:
> On Sun, Nov 27, 2016 at 08:37:24PM +0100, Andreas Färber wrote:
>> Specify the baudrate.
>>
>> Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia")
>> Cc: Uwe Kleine-König <uwe@kleine-koenig.org>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
> 
> You said with plain &uart0 the kernel uses a wrong baud rate? That's
> strange. For me it works and I think it's the intended behaviour to
> dermine the baud rate setup by the bootloader and use this.

IIRC the 8250 driver defaults to 9600n8 if unspecified.

Kernel tested: 4.9.0-rc2-next-20161028-00010-g4fb44d9-dirty

Maybe you used some console= argument overriding it?

> I'd prefer it this way over hard coding the baud rate.
> 
>>  arch/arm/boot/dts/armada-385-turris-omnia.dts | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/boot/dts/armada-385-turris-omnia.dts b/arch/arm/boot/dts/armada-385-turris-omnia.dts
>> index f53cb8b73610..2eff012287d4 100644
>> --- a/arch/arm/boot/dts/armada-385-turris-omnia.dts
>> +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts
>> @@ -52,7 +52,7 @@
>>  	compatible = "cznic,turris-omnia", "marvell,armada385", "marvell,armada380";
>>  
>>  	chosen {
>> -		stdout-path = &uart0;
>> +		stdout-path = "serial0:115200n8";
>>  	};
>>  
>>  	memory {
> 
> This has the downside to depend on the alias. Not sure this is
> considered modern. An alternative would be:
> 
> 	stdout-path = "/soc/internal-regs/serial@12000:115200n8";

Please don't unroll the path I'm trying to abstract elsewhere.

Like I said, the "serialX:115200n8" syntax is what all other Armada 38x
boards use:

git grep stdout-path -- arch/arm/boot/dts/ | grep armada-38
arch/arm/boot/dts/armada-385-db-ap.dts:		stdout-path = "serial1:115200n8";
arch/arm/boot/dts/armada-385-linksys.dtsi:		stdout-path =
"serial0:115200n8";
arch/arm/boot/dts/armada-388-clearfog.dts:		stdout-path =
"serial0:115200n8";
arch/arm/boot/dts/armada-388-db.dts:		stdout-path = "serial0:115200n8";
arch/arm/boot/dts/armada-388-gp.dts:		stdout-path = "serial0:115200n8";
arch/arm/boot/dts/armada-388-rd.dts:		stdout-path = "serial0:115200n8";

The alias is needed to reliably determine the tty device number and is
set "globally" in armada-38x.dtsi, so why is it a problem to rely on?

Regards,
Andreas

> 
> (maybe there even exists syntactic sugar to express this using &uart0?)

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH] ARM: dts: mvebu: Fix armada-385-turris-omnia stdout-path
  2016-11-27 22:14     ` Andreas Färber
@ 2016-11-27 22:30       ` Uwe Kleine-König
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2016-11-27 22:30 UTC (permalink / raw)
  To: Andreas Färber
  Cc: linux-arm-kernel, Mark Rutland, Andrew Lunn, Jason Cooper,
	devicetree, Tomas Hlavacek, Russell King, linux-kernel,
	Rob Herring, Gregory Clement, Sebastian Hesselbarth,
	Bedřicha Košatu, Michal Hrusecki

Hello,

On Sun, Nov 27, 2016 at 11:14:37PM +0100, Andreas Färber wrote:
> Am 27.11.2016 um 22:25 schrieb Uwe Kleine-König:
> > On Sun, Nov 27, 2016 at 08:37:24PM +0100, Andreas Färber wrote:
> >> Specify the baudrate.
> >>
> >> Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia")
> >> Cc: Uwe Kleine-König <uwe@kleine-koenig.org>
> >> Signed-off-by: Andreas Färber <afaerber@suse.de>
> > 
> > You said with plain &uart0 the kernel uses a wrong baud rate? That's
> > strange. For me it works and I think it's the intended behaviour to
> > dermine the baud rate setup by the bootloader and use this.
> 
> IIRC the 8250 driver defaults to 9600n8 if unspecified.
> 
> Kernel tested: 4.9.0-rc2-next-20161028-00010-g4fb44d9-dirty
> 
> Maybe you used some console= argument overriding it?

Yes, you're right.

> > I'd prefer it this way over hard coding the baud rate.
> > 
> >>  arch/arm/boot/dts/armada-385-turris-omnia.dts | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/arch/arm/boot/dts/armada-385-turris-omnia.dts b/arch/arm/boot/dts/armada-385-turris-omnia.dts
> >> index f53cb8b73610..2eff012287d4 100644
> >> --- a/arch/arm/boot/dts/armada-385-turris-omnia.dts
> >> +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts
> >> @@ -52,7 +52,7 @@
> >>  	compatible = "cznic,turris-omnia", "marvell,armada385", "marvell,armada380";
> >>  
> >>  	chosen {
> >> -		stdout-path = &uart0;
> >> +		stdout-path = "serial0:115200n8";
> >>  	};
> >>  
> >>  	memory {
> > 
> > This has the downside to depend on the alias. Not sure this is
> > considered modern. An alternative would be:
> > 
> > 	stdout-path = "/soc/internal-regs/serial@12000:115200n8";
> 
> Please don't unroll the path I'm trying to abstract elsewhere.

Yeah, specifying the path isn't nice.

> Like I said, the "serialX:115200n8" syntax is what all other Armada 38x
> boards use:

This isn't a reason to not think about better alternatives. An if
something like:

	stdout-path = &uart0 + ":115200n8";

would be possible, I'd definitely prefer it over "serial0:115200n8".

> git grep stdout-path -- arch/arm/boot/dts/ | grep armada-38
> arch/arm/boot/dts/armada-385-db-ap.dts:		stdout-path = "serial1:115200n8";
> arch/arm/boot/dts/armada-385-linksys.dtsi:		stdout-path =
> "serial0:115200n8";
> arch/arm/boot/dts/armada-388-clearfog.dts:		stdout-path =
> "serial0:115200n8";
> arch/arm/boot/dts/armada-388-db.dts:		stdout-path = "serial0:115200n8";
> arch/arm/boot/dts/armada-388-gp.dts:		stdout-path = "serial0:115200n8";
> arch/arm/boot/dts/armada-388-rd.dts:		stdout-path = "serial0:115200n8";
> 
> The alias is needed to reliably determine the tty device number and is
> set "globally" in armada-38x.dtsi, so why is it a problem to rely on?

AFAIK aliases are seen as (still necessary) evil by the dt people. So if
you can stop making use of them, that would be nice.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

end of thread, other threads:[~2016-11-27 22:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <71af60f5-b657-cab4-32a8-00a604fc656e@suse.de>
2016-11-27 19:37 ` [PATCH] ARM: dts: mvebu: Fix armada-385-turris-omnia stdout-path Andreas Färber
2016-11-27 21:10   ` Andrew Lunn
2016-11-27 21:25   ` Uwe Kleine-König
2016-11-27 22:14     ` Andreas Färber
2016-11-27 22:30       ` Uwe Kleine-König

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