Linux-Samsung-soc Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] arm64: dts: exynos: Add minimal bootargs
       [not found] <CGME20200703184543epcas5p4adb3db7693094c72477b8469d9f205ba@epcas5p4.samsung.com>
@ 2020-07-03 18:25 ` Alim Akhtar
  2020-07-03 18:49   ` Alim Akhtar
  0 siblings, 1 reply; 5+ messages in thread
From: Alim Akhtar @ 2020-07-03 18:25 UTC (permalink / raw)
  To: rzk
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	robh+dt, Alim Akhtar

Add minimal bootargs to enable earlycon and console.
This really useful in case kernel has crashed early in
boot process.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
---
 arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
index 790f12ca8981..d7b42d5a3b2d 100644
--- a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
+++ b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
@@ -24,6 +24,7 @@
 
 	chosen {
 		stdout-path = &serial_2;
+		bootargs = "earlycon=exynos4210,0x14c30000 console=ttySAC0,115200n8";
 	};
 
 	memory@40000000 {

base-commit: 9e50b94b3eb0d859a2586b5a40d7fd6e5afd9210
-- 
2.17.1


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

* RE: [PATCH] arm64: dts: exynos: Add minimal bootargs
  2020-07-03 18:25 ` [PATCH] arm64: dts: exynos: Add minimal bootargs Alim Akhtar
@ 2020-07-03 18:49   ` Alim Akhtar
  2020-07-04 10:22     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Alim Akhtar @ 2020-07-03 18:49 UTC (permalink / raw)
  To: krzk
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel, robh+dt

Adding Krzysztof's correct email address.
Sorry about noise.

> -----Original Message-----
> From: Alim Akhtar <alim.akhtar@samsung.com>
> Sent: 03 July 2020 23:56
> To: rzk@kernel.org
> Cc: devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org;
> robh+dt@kernel.org; Alim Akhtar <alim.akhtar@samsung.com>
> Subject: [PATCH] arm64: dts: exynos: Add minimal bootargs
> 
> Add minimal bootargs to enable earlycon and console.
> This really useful in case kernel has crashed early in boot process.
> 
> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
> ---
>  arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
> b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
> index 790f12ca8981..d7b42d5a3b2d 100644
> --- a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
> +++ b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
> @@ -24,6 +24,7 @@
> 
>  	chosen {
>  		stdout-path = &serial_2;
> +		bootargs = "earlycon=exynos4210,0x14c30000
> console=ttySAC0,115200n8";
>  	};
> 
>  	memory@40000000 {
> 
> base-commit: 9e50b94b3eb0d859a2586b5a40d7fd6e5afd9210
> --
> 2.17.1



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

* Re: [PATCH] arm64: dts: exynos: Add minimal bootargs
  2020-07-03 18:49   ` Alim Akhtar
@ 2020-07-04 10:22     ` Krzysztof Kozlowski
  2020-07-05  1:39       ` Alim Akhtar
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-04 10:22 UTC (permalink / raw)
  To: Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel, robh+dt

On Sat, Jul 04, 2020 at 12:19:40AM +0530, Alim Akhtar wrote:
> Adding Krzysztof's correct email address.
> Sorry about noise.
> 
> > -----Original Message-----
> > From: Alim Akhtar <alim.akhtar@samsung.com>
> > Sent: 03 July 2020 23:56
> > To: rzk@kernel.org
> > Cc: devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> > samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org;
> > robh+dt@kernel.org; Alim Akhtar <alim.akhtar@samsung.com>
> > Subject: [PATCH] arm64: dts: exynos: Add minimal bootargs
> > 
> > Add minimal bootargs to enable earlycon and console.
> > This really useful in case kernel has crashed early in boot process.
> > 
> > Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
> > ---
> >  arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
> > b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
> > index 790f12ca8981..d7b42d5a3b2d 100644
> > --- a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
> > +++ b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
> > @@ -24,6 +24,7 @@
> > 
> >  	chosen {
> >  		stdout-path = &serial_2;
> > +		bootargs = "earlycon=exynos4210,0x14c30000
> > console=ttySAC0,115200n8";

Hi,

The console is already chosen by stdout-path and earlycon would use it
as well, so no need for the address. It should be just "earlycon" if you
want to enable it unconditionally.

Also, why did you use different serial for console?

However the question is, are you sure you want earlycon on every,
including successful boot? On most of the boards we do not enable by
default. If developer needs, he can choose it for example via U-Boot
"setenv opts earlycon".

However it's a development kit so it could be enabled on default...

Best regards,
Krzysztof

> >  	};
> > 
> >  	memory@40000000 {
> > 
> > base-commit: 9e50b94b3eb0d859a2586b5a40d7fd6e5afd9210
> > --
> > 2.17.1
> 
> 

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

* RE: [PATCH] arm64: dts: exynos: Add minimal bootargs
  2020-07-04 10:22     ` Krzysztof Kozlowski
@ 2020-07-05  1:39       ` Alim Akhtar
  2020-07-05 18:09         ` 'Krzysztof Kozlowski'
  0 siblings, 1 reply; 5+ messages in thread
From: Alim Akhtar @ 2020-07-05  1:39 UTC (permalink / raw)
  To: 'Krzysztof Kozlowski'
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel, robh+dt

Hi Krzysztof,

> > > @@ -24,6 +24,7 @@
> > >
> > >  	chosen {
> > >  		stdout-path = &serial_2;
> > > +		bootargs = "earlycon=exynos4210,0x14c30000
> > > console=ttySAC0,115200n8";
> 
> Hi,
> 
> The console is already chosen by stdout-path and earlycon would use it as well,
> so no need for the address. It should be just "earlycon" if you want to enable it
> unconditionally.
> 
Indeed only "earlycon" will do here. Thanks for point this out.

> Also, why did you use different serial for console?
> 
Once UART driver gets probed then console changes to ttySAC0. In case I am using stdout-path only,
after bootconsole is disabled, kernel logs re-start printing from beginning (which might be expected behaviour?)

[    0.012416] printk: console [tty0] enabled
[    0.016491] printk: bootconsole [exynos4210] disabled
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd032]
[    0.000000] Linux version 5.8.0-rc3-next-20200703-00008-g4af626444f4a-dirty (alim@alim) (aarch64-linux-gnu-gcc (Linaro GCC 7.4-2019.02) 7.4.1 20181213 [l0
[    0.000000] Machine model: Samsung Exynos7 Espresso board based on Exynos7

> However the question is, are you sure you want earlycon on every, including
> successful boot? On most of the boards we do not enable by default. If
> developer needs, he can choose it for example via U-Boot "setenv opts
> earlycon".
> 
Using U-Boot is not the case always, any bootload can be used to boot the Linux, currently I am Coreboot.
And 'earlycon' is not setup by default.
As Espresson board is development board, IMO it is ok to keep it enable all the time, this helps in quickly knowing what going on incase boot fails early.
Let me know if it is ok to keep " console=ttySAC0,115200n8" or shell I just re-spin with only 'earlycon'? or any other suggestion?

Thanks!

> However it's a development kit so it could be enabled on default...
> 
> Best regards,
> Krzysztof
> 
> > >  	};
> > >
> > >  	memory@40000000 {
> > >
> > > base-commit: 9e50b94b3eb0d859a2586b5a40d7fd6e5afd9210
> > > --
> > > 2.17.1
> >
> >


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

* Re: [PATCH] arm64: dts: exynos: Add minimal bootargs
  2020-07-05  1:39       ` Alim Akhtar
@ 2020-07-05 18:09         ` 'Krzysztof Kozlowski'
  0 siblings, 0 replies; 5+ messages in thread
From: 'Krzysztof Kozlowski' @ 2020-07-05 18:09 UTC (permalink / raw)
  To: Alim Akhtar
  Cc: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel, robh+dt

On Sun, Jul 05, 2020 at 07:09:14AM +0530, Alim Akhtar wrote:
> Hi Krzysztof,
> > Also, why did you use different serial for console?
> > 
> Once UART driver gets probed then console changes to ttySAC0. In case I am using stdout-path only,
> after bootconsole is disabled, kernel logs re-start printing from beginning (which might be expected behaviour?)
> 
> [    0.012416] printk: console [tty0] enabled
> [    0.016491] printk: bootconsole [exynos4210] disabled
> [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd032]
> [    0.000000] Linux version 5.8.0-rc3-next-20200703-00008-g4af626444f4a-dirty (alim@alim) (aarch64-linux-gnu-gcc (Linaro GCC 7.4-2019.02) 7.4.1 20181213 [l0
> [    0.000000] Machine model: Samsung Exynos7 Espresso board based on Exynos7
> 

No, this is not desired. The fix for it should not be redefining the
console to wrong argument.

For example on Odroid MC1 this problem does not exist:

[    0.000000] earlycon: exynos4210 at MMIO 0x12c20000 (options '115200n8')
[    0.000000] printk: bootconsole [exynos4210] enabled
[    3.111883] printk: console [ttySAC2] enabled
[    3.111883] printk: console [ttySAC2] enabled
[    3.120102] printk: bootconsole [exynos4210] disabled
[    3.120102] printk: bootconsole [exynos4210] disabled


but your console for some reason is tty0... why? Is your console
ttySAC2? Maybe it is the effect of alias:
serial0 = &serial_2;

> > However the question is, are you sure you want earlycon on every, including
> > successful boot? On most of the boards we do not enable by default. If
> > developer needs, he can choose it for example via U-Boot "setenv opts
> > earlycon".
> > 
> Using U-Boot is not the case always, any bootload can be used to boot the Linux, currently I am Coreboot.
> And 'earlycon' is not setup by default.
> As Espresson board is development board, IMO it is ok to keep it enable all the time, this helps in quickly knowing what going on incase boot fails early.
> Let me know if it is ok to keep " console=ttySAC0,115200n8" or shell I just re-spin with only 'earlycon'? or any other suggestion?

It should be just earlycon.

Best regards,
Krzysztof


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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200703184543epcas5p4adb3db7693094c72477b8469d9f205ba@epcas5p4.samsung.com>
2020-07-03 18:25 ` [PATCH] arm64: dts: exynos: Add minimal bootargs Alim Akhtar
2020-07-03 18:49   ` Alim Akhtar
2020-07-04 10:22     ` Krzysztof Kozlowski
2020-07-05  1:39       ` Alim Akhtar
2020-07-05 18:09         ` 'Krzysztof Kozlowski'

Linux-Samsung-soc Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-samsung-soc/0 linux-samsung-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-samsung-soc linux-samsung-soc/ https://lore.kernel.org/linux-samsung-soc \
		linux-samsung-soc@vger.kernel.org
	public-inbox-index linux-samsung-soc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-samsung-soc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git