All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] openrisc: dts: or1ksim: Add stdout-path
@ 2017-09-19 14:00 ` Stafford Horne
  0 siblings, 0 replies; 9+ messages in thread
From: Stafford Horne @ 2017-09-19 14:00 UTC (permalink / raw)
  To: LKML
  Cc: Openrisc, Stafford Horne, Rob Herring, Mark Rutland, Jonas Bonn,
	Stefan Kristiansson, devicetree

During reviews of the OpenRISC SMP patch series it was suggested to add
stdout-path to the SMP dts file.  Add stdout-path to our other dts files
to be a good example.

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 arch/openrisc/boot/dts/or1ksim.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/openrisc/boot/dts/or1ksim.dts b/arch/openrisc/boot/dts/or1ksim.dts
index 5d4f9027afaf..ecc30968cbcb 100644
--- a/arch/openrisc/boot/dts/or1ksim.dts
+++ b/arch/openrisc/boot/dts/or1ksim.dts
@@ -7,6 +7,7 @@
 
 	chosen {
 		bootargs = "console=uart,mmio,0x90000000,115200";
+		stdout-path = &serial0;
 	};
 
 	memory@0 {
-- 
2.13.5

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

* [PATCH] openrisc: dts: or1ksim: Add stdout-path
@ 2017-09-19 14:00 ` Stafford Horne
  0 siblings, 0 replies; 9+ messages in thread
From: Stafford Horne @ 2017-09-19 14:00 UTC (permalink / raw)
  To: LKML
  Cc: Openrisc, Stafford Horne, Rob Herring, Mark Rutland, Jonas Bonn,
	Stefan Kristiansson, devicetree-u79uwXL29TY76Z2rM5mHXA

During reviews of the OpenRISC SMP patch series it was suggested to add
stdout-path to the SMP dts file.  Add stdout-path to our other dts files
to be a good example.

Signed-off-by: Stafford Horne <shorne-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/openrisc/boot/dts/or1ksim.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/openrisc/boot/dts/or1ksim.dts b/arch/openrisc/boot/dts/or1ksim.dts
index 5d4f9027afaf..ecc30968cbcb 100644
--- a/arch/openrisc/boot/dts/or1ksim.dts
+++ b/arch/openrisc/boot/dts/or1ksim.dts
@@ -7,6 +7,7 @@
 
 	chosen {
 		bootargs = "console=uart,mmio,0x90000000,115200";
+		stdout-path = &serial0;
 	};
 
 	memory@0 {
-- 
2.13.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [OpenRISC] [PATCH] openrisc: dts: or1ksim: Add stdout-path
@ 2017-09-19 14:00 ` Stafford Horne
  0 siblings, 0 replies; 9+ messages in thread
From: Stafford Horne @ 2017-09-19 14:00 UTC (permalink / raw)
  To: openrisc

During reviews of the OpenRISC SMP patch series it was suggested to add
stdout-path to the SMP dts file.  Add stdout-path to our other dts files
to be a good example.

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 arch/openrisc/boot/dts/or1ksim.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/openrisc/boot/dts/or1ksim.dts b/arch/openrisc/boot/dts/or1ksim.dts
index 5d4f9027afaf..ecc30968cbcb 100644
--- a/arch/openrisc/boot/dts/or1ksim.dts
+++ b/arch/openrisc/boot/dts/or1ksim.dts
@@ -7,6 +7,7 @@
 
 	chosen {
 		bootargs = "console=uart,mmio,0x90000000,115200";
+		stdout-path = &serial0;
 	};
 
 	memory at 0 {
-- 
2.13.5


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

* Re: [PATCH] openrisc: dts: or1ksim: Add stdout-path
@ 2017-09-19 16:49   ` Geert Uytterhoeven
  0 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2017-09-19 16:49 UTC (permalink / raw)
  To: Stafford Horne
  Cc: LKML, Openrisc, Rob Herring, Mark Rutland, Jonas Bonn,
	Stefan Kristiansson, devicetree

Hi Stafford,

On Tue, Sep 19, 2017 at 4:00 PM, Stafford Horne <shorne@gmail.com> wrote:
> During reviews of the OpenRISC SMP patch series it was suggested to add
> stdout-path to the SMP dts file.  Add stdout-path to our other dts files
> to be a good example.
>
> Signed-off-by: Stafford Horne <shorne@gmail.com>
> ---
>  arch/openrisc/boot/dts/or1ksim.dts | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/openrisc/boot/dts/or1ksim.dts b/arch/openrisc/boot/dts/or1ksim.dts
> index 5d4f9027afaf..ecc30968cbcb 100644
> --- a/arch/openrisc/boot/dts/or1ksim.dts
> +++ b/arch/openrisc/boot/dts/or1ksim.dts
> @@ -7,6 +7,7 @@
>
>         chosen {
>                 bootargs = "console=uart,mmio,0x90000000,115200";
> +               stdout-path = &serial0;

I think that should be:

-               bootargs = "console=uart,mmio,0x90000000,115200";
+               stdout-path = "serial0:115200";

If stdout-path is present, it will become the default console.
All other UART parameters except for the serial speed are derived from
the serial0 node (= serial@90000000) in DT.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] openrisc: dts: or1ksim: Add stdout-path
@ 2017-09-19 16:49   ` Geert Uytterhoeven
  0 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2017-09-19 16:49 UTC (permalink / raw)
  To: Stafford Horne
  Cc: LKML, Openrisc, Rob Herring, Mark Rutland, Jonas Bonn,
	Stefan Kristiansson, devicetree-u79uwXL29TY76Z2rM5mHXA

Hi Stafford,

On Tue, Sep 19, 2017 at 4:00 PM, Stafford Horne <shorne-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> During reviews of the OpenRISC SMP patch series it was suggested to add
> stdout-path to the SMP dts file.  Add stdout-path to our other dts files
> to be a good example.
>
> Signed-off-by: Stafford Horne <shorne-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  arch/openrisc/boot/dts/or1ksim.dts | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/openrisc/boot/dts/or1ksim.dts b/arch/openrisc/boot/dts/or1ksim.dts
> index 5d4f9027afaf..ecc30968cbcb 100644
> --- a/arch/openrisc/boot/dts/or1ksim.dts
> +++ b/arch/openrisc/boot/dts/or1ksim.dts
> @@ -7,6 +7,7 @@
>
>         chosen {
>                 bootargs = "console=uart,mmio,0x90000000,115200";
> +               stdout-path = &serial0;

I think that should be:

-               bootargs = "console=uart,mmio,0x90000000,115200";
+               stdout-path = "serial0:115200";

If stdout-path is present, it will become the default console.
All other UART parameters except for the serial speed are derived from
the serial0 node (= serial@90000000) in DT.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [OpenRISC] [PATCH] openrisc: dts: or1ksim: Add stdout-path
@ 2017-09-19 16:49   ` Geert Uytterhoeven
  0 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2017-09-19 16:49 UTC (permalink / raw)
  To: openrisc

Hi Stafford,

On Tue, Sep 19, 2017 at 4:00 PM, Stafford Horne <shorne@gmail.com> wrote:
> During reviews of the OpenRISC SMP patch series it was suggested to add
> stdout-path to the SMP dts file.  Add stdout-path to our other dts files
> to be a good example.
>
> Signed-off-by: Stafford Horne <shorne@gmail.com>
> ---
>  arch/openrisc/boot/dts/or1ksim.dts | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/openrisc/boot/dts/or1ksim.dts b/arch/openrisc/boot/dts/or1ksim.dts
> index 5d4f9027afaf..ecc30968cbcb 100644
> --- a/arch/openrisc/boot/dts/or1ksim.dts
> +++ b/arch/openrisc/boot/dts/or1ksim.dts
> @@ -7,6 +7,7 @@
>
>         chosen {
>                 bootargs = "console=uart,mmio,0x90000000,115200";
> +               stdout-path = &serial0;

I think that should be:

-               bootargs = "console=uart,mmio,0x90000000,115200";
+               stdout-path = "serial0:115200";

If stdout-path is present, it will become the default console.
All other UART parameters except for the serial speed are derived from
the serial0 node (= serial at 90000000) in DT.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] openrisc: dts: or1ksim: Add stdout-path
@ 2017-09-20 14:04     ` Stafford Horne
  0 siblings, 0 replies; 9+ messages in thread
From: Stafford Horne @ 2017-09-20 14:04 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: LKML, Openrisc, Rob Herring, Mark Rutland, Jonas Bonn,
	Stefan Kristiansson, devicetree

Hi Geert,

On Tue, Sep 19, 2017 at 06:49:48PM +0200, Geert Uytterhoeven wrote:
> Hi Stafford,
> 
> On Tue, Sep 19, 2017 at 4:00 PM, Stafford Horne <shorne@gmail.com> wrote:
> > During reviews of the OpenRISC SMP patch series it was suggested to add
> > stdout-path to the SMP dts file.  Add stdout-path to our other dts files
> > to be a good example.
> >
> > Signed-off-by: Stafford Horne <shorne@gmail.com>
> > ---
> >  arch/openrisc/boot/dts/or1ksim.dts | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/openrisc/boot/dts/or1ksim.dts b/arch/openrisc/boot/dts/or1ksim.dts
> > index 5d4f9027afaf..ecc30968cbcb 100644
> > --- a/arch/openrisc/boot/dts/or1ksim.dts
> > +++ b/arch/openrisc/boot/dts/or1ksim.dts
> > @@ -7,6 +7,7 @@
> >
> >         chosen {
> >                 bootargs = "console=uart,mmio,0x90000000,115200";
> > +               stdout-path = &serial0;
> 
> I think that should be:
> 
> -               bootargs = "console=uart,mmio,0x90000000,115200";
> +               stdout-path = "serial0:115200";
> 
> If stdout-path is present, it will become the default console.
> All other UART parameters except for the serial speed are derived from
> the serial0 node (= serial@90000000) in DT.

Thanks for the tip.  I have seen examples using alias `&serial0;` and using
the name directly `serio0:115200', but I guess I didnt really understand
what was going on.  I read through as much of the console initialization,
of, earlycon and printk code as I needed to refresh my memory on this...

It seems there are a few other issues here:
  - To use "serial0:115200" we will need an alias to the path (or specify
    the full path)
  - It looks like we can't use console= and stdout-path at the same time
  - We still need "earlycon" to define that we want to initialize early
    printk

I think updating to something like the below works, but its a few extra
lines:


diff --git a/arch/openrisc/boot/dts/or1ksim.dts b/arch/openrisc/boot/dts/or1ksim.dts
index ecc30968cbcb..37779a45947c 100644
--- a/arch/openrisc/boot/dts/or1ksim.dts
+++ b/arch/openrisc/boot/dts/or1ksim.dts
@@ -5,9 +5,13 @@
 	#size-cells = <1>;
 	interrupt-parent = <&pic>;
 
+	aliases {
+		uart0 = &serial0;
+	};
+
 	chosen {
-		bootargs = "console=uart,mmio,0x90000000,115200";
-		stdout-path = &serial0;
+		bootargs = "earlycon";
+		stdout-path = "uart0:115200";
 	};
 
 	memory@0 {


The boot prompt before showed:

    Kernel command line: console=uart,mmio,0x90000000,115200
    earlycon: uart0 at MMIO 0x90000000 (options '115200')
    bootconsole [uart0] enabled

Now it shows:

    Kernel command line: earlycon
    earlycon: ns16550a0 at MMIO 0x90000000 (options '115200')
    bootconsole [ns16550a0] enabled

-Stafford

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

* Re: [PATCH] openrisc: dts: or1ksim: Add stdout-path
@ 2017-09-20 14:04     ` Stafford Horne
  0 siblings, 0 replies; 9+ messages in thread
From: Stafford Horne @ 2017-09-20 14:04 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: LKML, Openrisc, Rob Herring, Mark Rutland, Jonas Bonn,
	Stefan Kristiansson, devicetree-u79uwXL29TY76Z2rM5mHXA

Hi Geert,

On Tue, Sep 19, 2017 at 06:49:48PM +0200, Geert Uytterhoeven wrote:
> Hi Stafford,
> 
> On Tue, Sep 19, 2017 at 4:00 PM, Stafford Horne <shorne-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > During reviews of the OpenRISC SMP patch series it was suggested to add
> > stdout-path to the SMP dts file.  Add stdout-path to our other dts files
> > to be a good example.
> >
> > Signed-off-by: Stafford Horne <shorne-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> >  arch/openrisc/boot/dts/or1ksim.dts | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/openrisc/boot/dts/or1ksim.dts b/arch/openrisc/boot/dts/or1ksim.dts
> > index 5d4f9027afaf..ecc30968cbcb 100644
> > --- a/arch/openrisc/boot/dts/or1ksim.dts
> > +++ b/arch/openrisc/boot/dts/or1ksim.dts
> > @@ -7,6 +7,7 @@
> >
> >         chosen {
> >                 bootargs = "console=uart,mmio,0x90000000,115200";
> > +               stdout-path = &serial0;
> 
> I think that should be:
> 
> -               bootargs = "console=uart,mmio,0x90000000,115200";
> +               stdout-path = "serial0:115200";
> 
> If stdout-path is present, it will become the default console.
> All other UART parameters except for the serial speed are derived from
> the serial0 node (= serial@90000000) in DT.

Thanks for the tip.  I have seen examples using alias `&serial0;` and using
the name directly `serio0:115200', but I guess I didnt really understand
what was going on.  I read through as much of the console initialization,
of, earlycon and printk code as I needed to refresh my memory on this...

It seems there are a few other issues here:
  - To use "serial0:115200" we will need an alias to the path (or specify
    the full path)
  - It looks like we can't use console= and stdout-path at the same time
  - We still need "earlycon" to define that we want to initialize early
    printk

I think updating to something like the below works, but its a few extra
lines:


diff --git a/arch/openrisc/boot/dts/or1ksim.dts b/arch/openrisc/boot/dts/or1ksim.dts
index ecc30968cbcb..37779a45947c 100644
--- a/arch/openrisc/boot/dts/or1ksim.dts
+++ b/arch/openrisc/boot/dts/or1ksim.dts
@@ -5,9 +5,13 @@
 	#size-cells = <1>;
 	interrupt-parent = <&pic>;
 
+	aliases {
+		uart0 = &serial0;
+	};
+
 	chosen {
-		bootargs = "console=uart,mmio,0x90000000,115200";
-		stdout-path = &serial0;
+		bootargs = "earlycon";
+		stdout-path = "uart0:115200";
 	};
 
 	memory@0 {


The boot prompt before showed:

    Kernel command line: console=uart,mmio,0x90000000,115200
    earlycon: uart0 at MMIO 0x90000000 (options '115200')
    bootconsole [uart0] enabled

Now it shows:

    Kernel command line: earlycon
    earlycon: ns16550a0 at MMIO 0x90000000 (options '115200')
    bootconsole [ns16550a0] enabled

-Stafford
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [OpenRISC] [PATCH] openrisc: dts: or1ksim: Add stdout-path
@ 2017-09-20 14:04     ` Stafford Horne
  0 siblings, 0 replies; 9+ messages in thread
From: Stafford Horne @ 2017-09-20 14:04 UTC (permalink / raw)
  To: openrisc

Hi Geert,

On Tue, Sep 19, 2017 at 06:49:48PM +0200, Geert Uytterhoeven wrote:
> Hi Stafford,
> 
> On Tue, Sep 19, 2017 at 4:00 PM, Stafford Horne <shorne@gmail.com> wrote:
> > During reviews of the OpenRISC SMP patch series it was suggested to add
> > stdout-path to the SMP dts file.  Add stdout-path to our other dts files
> > to be a good example.
> >
> > Signed-off-by: Stafford Horne <shorne@gmail.com>
> > ---
> >  arch/openrisc/boot/dts/or1ksim.dts | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/openrisc/boot/dts/or1ksim.dts b/arch/openrisc/boot/dts/or1ksim.dts
> > index 5d4f9027afaf..ecc30968cbcb 100644
> > --- a/arch/openrisc/boot/dts/or1ksim.dts
> > +++ b/arch/openrisc/boot/dts/or1ksim.dts
> > @@ -7,6 +7,7 @@
> >
> >         chosen {
> >                 bootargs = "console=uart,mmio,0x90000000,115200";
> > +               stdout-path = &serial0;
> 
> I think that should be:
> 
> -               bootargs = "console=uart,mmio,0x90000000,115200";
> +               stdout-path = "serial0:115200";
> 
> If stdout-path is present, it will become the default console.
> All other UART parameters except for the serial speed are derived from
> the serial0 node (= serial at 90000000) in DT.

Thanks for the tip.  I have seen examples using alias `&serial0;` and using
the name directly `serio0:115200', but I guess I didnt really understand
what was going on.  I read through as much of the console initialization,
of, earlycon and printk code as I needed to refresh my memory on this...

It seems there are a few other issues here:
  - To use "serial0:115200" we will need an alias to the path (or specify
    the full path)
  - It looks like we can't use console= and stdout-path at the same time
  - We still need "earlycon" to define that we want to initialize early
    printk

I think updating to something like the below works, but its a few extra
lines:


diff --git a/arch/openrisc/boot/dts/or1ksim.dts b/arch/openrisc/boot/dts/or1ksim.dts
index ecc30968cbcb..37779a45947c 100644
--- a/arch/openrisc/boot/dts/or1ksim.dts
+++ b/arch/openrisc/boot/dts/or1ksim.dts
@@ -5,9 +5,13 @@
 	#size-cells = <1>;
 	interrupt-parent = <&pic>;
 
+	aliases {
+		uart0 = &serial0;
+	};
+
 	chosen {
-		bootargs = "console=uart,mmio,0x90000000,115200";
-		stdout-path = &serial0;
+		bootargs = "earlycon";
+		stdout-path = "uart0:115200";
 	};
 
 	memory at 0 {


The boot prompt before showed:

    Kernel command line: console=uart,mmio,0x90000000,115200
    earlycon: uart0 at MMIO 0x90000000 (options '115200')
    bootconsole [uart0] enabled

Now it shows:

    Kernel command line: earlycon
    earlycon: ns16550a0 at MMIO 0x90000000 (options '115200')
    bootconsole [ns16550a0] enabled

-Stafford

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

end of thread, other threads:[~2017-09-20 14:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-19 14:00 [PATCH] openrisc: dts: or1ksim: Add stdout-path Stafford Horne
2017-09-19 14:00 ` [OpenRISC] " Stafford Horne
2017-09-19 14:00 ` Stafford Horne
2017-09-19 16:49 ` Geert Uytterhoeven
2017-09-19 16:49   ` [OpenRISC] " Geert Uytterhoeven
2017-09-19 16:49   ` Geert Uytterhoeven
2017-09-20 14:04   ` Stafford Horne
2017-09-20 14:04     ` [OpenRISC] " Stafford Horne
2017-09-20 14:04     ` Stafford Horne

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.