diff mbox series

[RESEND] arm64: dts: specify console via command line

Message ID 20200311112120.30890-1-zhang.lyra@gmail.com (mailing list archive)
State Mainlined
Commit 2cedfe1247c087a82ea3d12af8546f6de60c1f36
Headers show
Series [RESEND] arm64: dts: specify console via command line | expand

Commit Message

Chunyan Zhang March 11, 2020, 11:21 a.m. UTC
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(-)

Comments

Arnd Bergmann March 11, 2020, 2:31 p.m. UTC | #1
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
Chunyan Zhang March 12, 2020, 7:34 a.m. UTC | #2
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
patchwork-bot+linux-soc@kernel.org March 26, 2020, 9:46 a.m. UTC | #3
Hello:

This patch was applied to soc/soc.git (refs/heads/for-next).

On Wed, 11 Mar 2020 19:21:20 +0800 you wrote:
> 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.
> 
> [...]


Here is a summary with links:
  - [RESEND] arm64: dts: specify console via command line
    https://git.kernel.org/soc/soc/c/2cedfe1247c087a82ea3d12af8546f6de60c1f36

You are awesome, thank you!
Chunyan Zhang March 26, 2020, 10:20 a.m. UTC | #4
Hi,

This patch shouldn't be merged since I've changed to another way to
solve the problem, and that patch has been accepted.

Sorry for the trouble.

Chunyan

On Thu, 26 Mar 2020 at 17:46, <patchwork-bot+linux-soc@kernel.org> wrote:
>
> Hello:
>
> This patch was applied to soc/soc.git (refs/heads/for-next).
>
> On Wed, 11 Mar 2020 19:21:20 +0800 you wrote:
> > 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.
> >
> > [...]
>
>
> Here is a summary with links:
>   - [RESEND] arm64: dts: specify console via command line
>     https://git.kernel.org/soc/soc/c/2cedfe1247c087a82ea3d12af8546f6de60c1f36
>
> You are awesome, thank you!
>
> --
> Deet-doot-dot, I am a bot.
> https://korg.wiki.kernel.org/userdoc/pwbot
Arnd Bergmann March 26, 2020, 12:58 p.m. UTC | #5
On Thu, Mar 26, 2020 at 11:20 AM Chunyan Zhang <zhang.lyra@gmail.com> wrote:
>
> Hi,
>
> This patch shouldn't be merged since I've changed to another way to
> solve the problem, and that patch has been accepted.

Thanks a lot for paying attention! I merged it by accident when I went through
the backlog and misremembered the outcome of my earlier comment. I've
reverted the patch now, to avoid having to rebase all the other merges.

      Arnd
diff mbox series

Patch

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";
 	};
 };