mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] MIPS: dts: add /chosen/stdout-path where it is missing
@ 2024-08-22 11:56 Ahmad Fatoum
  2024-08-22 11:57 ` [PATCH 2/3] MIPS: qemu-malta: explicitly set stdout-path Ahmad Fatoum
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2024-08-22 11:56 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

A number of MIPS boards don't have a stdout-path set and instead rely on
CONFIG_CONSOLE_ACTIVATE_ALL/FIRST to enable a console.

This can get problematic if more consoles are added in future, or
CONFIG_CONSOLE_ACTIVATE_NONE is to be used. So on systems that currently
have a single console, let's have /chosen/stdout-path point at it.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/mips/dts/black-swift.dts   | 4 ++++
 arch/mips/dts/dlink-dir-320.dts | 4 ++++
 arch/mips/dts/img-ci20.dts      | 4 ++++
 arch/mips/dts/loongson-ls1b.dts | 4 ++++
 arch/mips/dts/rzx50.dts         | 4 ++++
 5 files changed, 20 insertions(+)

diff --git a/arch/mips/dts/black-swift.dts b/arch/mips/dts/black-swift.dts
index af817dbfc7e1..6bb26d427f2d 100644
--- a/arch/mips/dts/black-swift.dts
+++ b/arch/mips/dts/black-swift.dts
@@ -13,6 +13,10 @@ aliases {
 		spiflash = &spiflash;
 	};
 
+	chosen {
+		stdout-path = &uart;
+	};
+
 	memory@0 {
 		device_type = "memory";
 		reg = <0x00000000 0x4000000>;
diff --git a/arch/mips/dts/dlink-dir-320.dts b/arch/mips/dts/dlink-dir-320.dts
index d19c3087d017..beec40f3dcc5 100644
--- a/arch/mips/dts/dlink-dir-320.dts
+++ b/arch/mips/dts/dlink-dir-320.dts
@@ -7,6 +7,10 @@ / {
 	#address-cells = <1>;
 	#size-cells = <1>;
 
+	chosen {
+		stdout-path = &serial0;
+	};
+
 	memory@0 {
 		device_type = "memory";
 		reg = <0x00000000 0x2000000>;
diff --git a/arch/mips/dts/img-ci20.dts b/arch/mips/dts/img-ci20.dts
index e1d3280c4e11..71038890d977 100644
--- a/arch/mips/dts/img-ci20.dts
+++ b/arch/mips/dts/img-ci20.dts
@@ -14,6 +14,10 @@ / {
 	model = "MIPS Creator CI20";
 	compatible = "img,ci20";
 
+	chosen {
+		stdout-path = &uart0;
+	};
+
 	memory@0 {
 		device_type = "memory";
 		reg = <0x0 0x10000000>;
diff --git a/arch/mips/dts/loongson-ls1b.dts b/arch/mips/dts/loongson-ls1b.dts
index 89cce5636bcf..30520a34f53b 100644
--- a/arch/mips/dts/loongson-ls1b.dts
+++ b/arch/mips/dts/loongson-ls1b.dts
@@ -6,6 +6,10 @@ / {
 	model = "Loongson Tech LS1B Demo Board";
 	compatible = "loongson,ls1b";
 
+	chosen {
+		stdout-path = &serial2;
+	};
+
 	oscillator: oscillator {
 			#clock-cells = <0>;
 			compatible = "fixed-clock";
diff --git a/arch/mips/dts/rzx50.dts b/arch/mips/dts/rzx50.dts
index bd3631f7c451..93211a97a59f 100644
--- a/arch/mips/dts/rzx50.dts
+++ b/arch/mips/dts/rzx50.dts
@@ -6,6 +6,10 @@ / {
 	model = "Ritmix RZX-50";
 	compatible = "ritmix,rzx50";
 
+	chosen {
+		stdout-path = &serial1;
+	};
+
 	memory@0 {
 		device_type = "memory";
 		reg = <0x00000000 0x4000000>;
-- 
2.39.2




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

* [PATCH 2/3] MIPS: qemu-malta: explicitly set stdout-path
  2024-08-22 11:56 [PATCH 1/3] MIPS: dts: add /chosen/stdout-path where it is missing Ahmad Fatoum
@ 2024-08-22 11:57 ` Ahmad Fatoum
  2024-08-22 11:57 ` [PATCH 3/3] test: mips: use new qemu-maltael_defconfig Ahmad Fatoum
  2024-08-23  8:05 ` [PATCH 1/3] MIPS: dts: add /chosen/stdout-path where it is missing Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2024-08-22 11:57 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The Malta device tree describes and enables two consoles, but doesn't
specify which one to use for barebox console.

In configurations with CONFIG_CONSOLE_ACTIVATE_FIRST, it's thus
dependent on device tree probe order, which console ends up being used
by barebox.

Fix this by explicitly pointing stdout-path at the first console.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/mips/dts/qemu-malta.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/mips/dts/qemu-malta.dts b/arch/mips/dts/qemu-malta.dts
index c2bc03dd4631..6cf7513ff5fa 100644
--- a/arch/mips/dts/qemu-malta.dts
+++ b/arch/mips/dts/qemu-malta.dts
@@ -8,6 +8,8 @@ / {
 	#size-cells = <1>;
 
 	chosen {
+		stdout-path = &uart0;
+
 		environment {
 			compatible = "barebox,environment";
 			device-path = &env_nor;
-- 
2.39.2




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

* [PATCH 3/3] test: mips: use new qemu-maltael_defconfig
  2024-08-22 11:56 [PATCH 1/3] MIPS: dts: add /chosen/stdout-path where it is missing Ahmad Fatoum
  2024-08-22 11:57 ` [PATCH 2/3] MIPS: qemu-malta: explicitly set stdout-path Ahmad Fatoum
@ 2024-08-22 11:57 ` Ahmad Fatoum
  2024-08-23  8:05 ` [PATCH 1/3] MIPS: dts: add /chosen/stdout-path where it is missing Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2024-08-22 11:57 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

We have a qemu-maltael_defconfig, which is generated by Kbuild by
merging qemu-maltael_defconfig with a Kconfig fragment that switches
to little endian. Let's make use of it, instead of depending on
the runner kconfig_add key, which is only evaluated by emulate.pl.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 ...e@qemu-malta_defconfig.yaml => qemu-maltael_defconfig.yaml} | 3 ---
 1 file changed, 3 deletions(-)
 rename test/mips/{le@qemu-malta_defconfig.yaml => qemu-maltael_defconfig.yaml} (88%)

diff --git a/test/mips/le@qemu-malta_defconfig.yaml b/test/mips/qemu-maltael_defconfig.yaml
similarity index 88%
rename from test/mips/le@qemu-malta_defconfig.yaml
rename to test/mips/qemu-maltael_defconfig.yaml
index ecf9484dcc1e..1b3f15fec5e9 100644
--- a/test/mips/le@qemu-malta_defconfig.yaml
+++ b/test/mips/qemu-maltael_defconfig.yaml
@@ -14,9 +14,6 @@ targets:
       BareboxTestStrategy: {}
     features:
       - virtio-pci
-    runner:
-      kconfig_add:
-        - CONFIG_CPU_LITTLE_ENDIAN=y
 images:
   barebox-qemu-malta.img.swapped: !template "$LG_BUILDDIR/images/barebox-qemu-malta.img.swapped"
 imports:
-- 
2.39.2




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

* Re: [PATCH 1/3] MIPS: dts: add /chosen/stdout-path where it is missing
  2024-08-22 11:56 [PATCH 1/3] MIPS: dts: add /chosen/stdout-path where it is missing Ahmad Fatoum
  2024-08-22 11:57 ` [PATCH 2/3] MIPS: qemu-malta: explicitly set stdout-path Ahmad Fatoum
  2024-08-22 11:57 ` [PATCH 3/3] test: mips: use new qemu-maltael_defconfig Ahmad Fatoum
@ 2024-08-23  8:05 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2024-08-23  8:05 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Thu, 22 Aug 2024 13:56:59 +0200, Ahmad Fatoum wrote:
> A number of MIPS boards don't have a stdout-path set and instead rely on
> CONFIG_CONSOLE_ACTIVATE_ALL/FIRST to enable a console.
> 
> This can get problematic if more consoles are added in future, or
> CONFIG_CONSOLE_ACTIVATE_NONE is to be used. So on systems that currently
> have a single console, let's have /chosen/stdout-path point at it.
> 
> [...]

Applied, thanks!

[1/3] MIPS: dts: add /chosen/stdout-path where it is missing
      https://git.pengutronix.de/cgit/barebox/commit/?id=74d57cd67b21 (link may not be stable)
[2/3] MIPS: qemu-malta: explicitly set stdout-path
      https://git.pengutronix.de/cgit/barebox/commit/?id=bd4479498829 (link may not be stable)
[3/3] test: mips: use new qemu-maltael_defconfig
      https://git.pengutronix.de/cgit/barebox/commit/?id=7f7bec8ebb95 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




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

end of thread, other threads:[~2024-08-23  8:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-22 11:56 [PATCH 1/3] MIPS: dts: add /chosen/stdout-path where it is missing Ahmad Fatoum
2024-08-22 11:57 ` [PATCH 2/3] MIPS: qemu-malta: explicitly set stdout-path Ahmad Fatoum
2024-08-22 11:57 ` [PATCH 3/3] test: mips: use new qemu-maltael_defconfig Ahmad Fatoum
2024-08-23  8:05 ` [PATCH 1/3] MIPS: dts: add /chosen/stdout-path where it is missing Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox