LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [RESEND PATCH] arm64: dts: specify console via command line
@ 2020-03-11 11:21 Chunyan Zhang
  2020-03-11 14:31 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Chunyan Zhang @ 2020-03-11 11:21 UTC (permalink / raw)
  To: soc, Rob Herring, Mark Rutland
  Cc: Arnd Bergmann, devicetree, linux-kernel, linux-arm-kernel,
	Orson Zhai, Baolin Wang, Chunyan Zhang, Chunyan Zhang

From: Chunyan Zhang <chunyan.zhang@unisoc.com>

The SPRD serial driver need to know which serial port would be used as
console in an early period during initialization, otherwise console
init would fail since we added this feature[1].

So this patch add console to command line via devicetree.

[1] https://lore.kernel.org/lkml/20190826072929.7696-4-zhang.lyra@gmail.com/

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
---
I guess no comments on this, so resending this and add soc@kernel.org,
hope Arnd or Olof can help to merge into arch_arm tree.

Thanks,
Chunyan
---
 arch/arm64/boot/dts/sprd/sp9863a-1h10.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts b/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts
index 2047f7a74265..510f65f4d8b8 100644
--- a/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts
+++ b/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts
@@ -28,7 +28,7 @@
 
 	chosen {
 		stdout-path = "serial1:115200n8";
-		bootargs = "earlycon";
+		bootargs = "earlycon console=ttyS1";
 	};
 };
 
-- 
2.20.1


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

* Re: [RESEND PATCH] arm64: dts: specify console via command line
  2020-03-11 11:21 [RESEND PATCH] arm64: dts: specify console via command line Chunyan Zhang
@ 2020-03-11 14:31 ` Arnd Bergmann
  2020-03-12  7:34   ` Chunyan Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2020-03-11 14:31 UTC (permalink / raw)
  To: Chunyan Zhang
  Cc: SoC Team, Rob Herring, Mark Rutland, DTML, linux-kernel,
	Linux ARM, Orson Zhai, Baolin Wang, Chunyan Zhang

On Wed, Mar 11, 2020 at 12:21 PM Chunyan Zhang <zhang.lyra@gmail.com> wrote:
>

> diff --git a/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts b/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts
> index 2047f7a74265..510f65f4d8b8 100644
> --- a/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts
> +++ b/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts
> @@ -28,7 +28,7 @@
>
>         chosen {
>                 stdout-path = "serial1:115200n8";
> -               bootargs = "earlycon";
> +               bootargs = "earlycon console=ttyS1";
>         };
>  };

Hi Chunyan,

I would expect that you need to either specify the stdout-path, or the console=
kernel parameter, but not both.

If earlycon was used, shouldn't the driver know which port is the console?

      Arnd

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

* Re: [RESEND PATCH] arm64: dts: specify console via command line
  2020-03-11 14:31 ` Arnd Bergmann
@ 2020-03-12  7:34   ` Chunyan Zhang
  0 siblings, 0 replies; 3+ messages in thread
From: Chunyan Zhang @ 2020-03-12  7:34 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: SoC Team, Rob Herring, Mark Rutland, DTML, linux-kernel,
	Linux ARM, Orson Zhai, Baolin Wang, Chunyan Zhang

Hi Arnd,

On Wed, 11 Mar 2020 at 22:31, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Wed, Mar 11, 2020 at 12:21 PM Chunyan Zhang <zhang.lyra@gmail.com> wrote:
> >
>
> > diff --git a/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts b/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts
> > index 2047f7a74265..510f65f4d8b8 100644
> > --- a/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts
> > +++ b/arch/arm64/boot/dts/sprd/sp9863a-1h10.dts
> > @@ -28,7 +28,7 @@
> >
> >         chosen {
> >                 stdout-path = "serial1:115200n8";
> > -               bootargs = "earlycon";
> > +               bootargs = "earlycon console=ttyS1";
> >         };
> >  };
>
> Hi Chunyan,
>
> I would expect that you need to either specify the stdout-path, or the console=
> kernel parameter, but not both.
>

Ok, now I know how to fix the problem without adding 'console=' :)
of_console_check() [1] can tell if a given port is the console by
reading 'stdout-path'.
I will address this issue in serial driver.

Thanks for your reminder,
Chunyan

[1] https://elixir.bootlin.com/linux/v5.6-rc5/source/drivers/of/base.c#L2135

> If earlycon was used, shouldn't the driver know which port is the console?
>
>       Arnd

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

end of thread, other threads:[~2020-03-12  7:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 11:21 [RESEND PATCH] arm64: dts: specify console via command line Chunyan Zhang
2020-03-11 14:31 ` Arnd Bergmann
2020-03-12  7:34   ` Chunyan Zhang

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