DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Robert Schwebel <r.schwebel@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: distrokit@pengutronix.de, ore@pengutronix.de
Subject: Re: [DistroKit] [PATCH 1/3] MIPS(EL): barebox: add /chosen/stdout-path properties for all boards
Date: Thu, 22 Aug 2024 19:39:35 +0200	[thread overview]
Message-ID: <Zsd31wMrfIQFJYFk@pengutronix.de> (raw)
In-Reply-To: <20240822134551.3176638-1-a.fatoum@pengutronix.de>

Series applied to next.

On Thu, Aug 22, 2024 at 03:45:49PM +0200, Ahmad Fatoum wrote:
> A lot of MIPS boards lack a /chosen/stdout-path property, instead
> relying on the options CONFIG_CONSOLE_ACTIVATE_ALL/FIRST to select an
> appropriate console. To allow usage of the barebox console with
> CONFIG_CONSOLE_ACTIVATE_NONE, let's add explicit console activation.
> 
> The patches have already been submitted for upstream inclusion[1].
> 
> [1]: https://lore.barebox.org/barebox/20240822115701.1184099-1-a.fatoum@pengutronix.de
> 
> Fixes: 4c0d7cecdd75 ("mips/mipsel: barebox: use CONSOLE_ACTIVATE_NONE")
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  ...osen-stdout-path-where-it-is-missing.patch | 99 +++++++++++++++++++
>  ...emu-malta-explicitly-set-stdout-path.patch | 35 +++++++
>  .../patches/barebox-2021.02.0/series          |  2 +
>  ...osen-stdout-path-where-it-is-missing.patch | 99 +++++++++++++++++++
>  ...emu-malta-explicitly-set-stdout-path.patch | 35 +++++++
>  .../patches/barebox-2021.06.0/series          |  2 +
>  6 files changed, 272 insertions(+)
>  create mode 100644 configs/platform-mips/patches/barebox-2021.02.0/0001-MIPS-dts-add-chosen-stdout-path-where-it-is-missing.patch
>  create mode 100644 configs/platform-mips/patches/barebox-2021.02.0/0002-MIPS-qemu-malta-explicitly-set-stdout-path.patch
>  create mode 100644 configs/platform-mips/patches/barebox-2021.02.0/series
>  create mode 100644 configs/platform-mipsel/patches/barebox-2021.06.0/0001-MIPS-dts-add-chosen-stdout-path-where-it-is-missing.patch
>  create mode 100644 configs/platform-mipsel/patches/barebox-2021.06.0/0002-MIPS-qemu-malta-explicitly-set-stdout-path.patch
>  create mode 100644 configs/platform-mipsel/patches/barebox-2021.06.0/series
> 
> diff --git a/configs/platform-mips/patches/barebox-2021.02.0/0001-MIPS-dts-add-chosen-stdout-path-where-it-is-missing.patch b/configs/platform-mips/patches/barebox-2021.02.0/0001-MIPS-dts-add-chosen-stdout-path-where-it-is-missing.patch
> new file mode 100644
> index 000000000000..fbe71b59f523
> --- /dev/null
> +++ b/configs/platform-mips/patches/barebox-2021.02.0/0001-MIPS-dts-add-chosen-stdout-path-where-it-is-missing.patch
> @@ -0,0 +1,99 @@
> +From 9af92b9cd64cb4a2df8ad03685e38fedf4ca78b4 Mon Sep 17 00:00:00 2001
> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +Date: Wed, 21 Aug 2024 15:02:02 +0200
> +Subject: [PATCH 1/2] MIPS: dts: add /chosen/stdout-path where it is missing
> +
> +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
> +
> diff --git a/configs/platform-mips/patches/barebox-2021.02.0/0002-MIPS-qemu-malta-explicitly-set-stdout-path.patch b/configs/platform-mips/patches/barebox-2021.02.0/0002-MIPS-qemu-malta-explicitly-set-stdout-path.patch
> new file mode 100644
> index 000000000000..074b8c70036a
> --- /dev/null
> +++ b/configs/platform-mips/patches/barebox-2021.02.0/0002-MIPS-qemu-malta-explicitly-set-stdout-path.patch
> @@ -0,0 +1,35 @@
> +From 0da08cd25a0bacfa22cde380d5ead90077b6c7b3 Mon Sep 17 00:00:00 2001
> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +Date: Wed, 21 Aug 2024 15:12:02 +0200
> +Subject: [PATCH 2/2] MIPS: qemu-malta: explicitly set stdout-path
> +
> +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
> +
> diff --git a/configs/platform-mips/patches/barebox-2021.02.0/series b/configs/platform-mips/patches/barebox-2021.02.0/series
> new file mode 100644
> index 000000000000..b9b6f404fa41
> --- /dev/null
> +++ b/configs/platform-mips/patches/barebox-2021.02.0/series
> @@ -0,0 +1,2 @@
> +0001-MIPS-dts-add-chosen-stdout-path-where-it-is-missing.patch
> +0002-MIPS-qemu-malta-explicitly-set-stdout-path.patch
> diff --git a/configs/platform-mipsel/patches/barebox-2021.06.0/0001-MIPS-dts-add-chosen-stdout-path-where-it-is-missing.patch b/configs/platform-mipsel/patches/barebox-2021.06.0/0001-MIPS-dts-add-chosen-stdout-path-where-it-is-missing.patch
> new file mode 100644
> index 000000000000..fbe71b59f523
> --- /dev/null
> +++ b/configs/platform-mipsel/patches/barebox-2021.06.0/0001-MIPS-dts-add-chosen-stdout-path-where-it-is-missing.patch
> @@ -0,0 +1,99 @@
> +From 9af92b9cd64cb4a2df8ad03685e38fedf4ca78b4 Mon Sep 17 00:00:00 2001
> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +Date: Wed, 21 Aug 2024 15:02:02 +0200
> +Subject: [PATCH 1/2] MIPS: dts: add /chosen/stdout-path where it is missing
> +
> +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
> +
> diff --git a/configs/platform-mipsel/patches/barebox-2021.06.0/0002-MIPS-qemu-malta-explicitly-set-stdout-path.patch b/configs/platform-mipsel/patches/barebox-2021.06.0/0002-MIPS-qemu-malta-explicitly-set-stdout-path.patch
> new file mode 100644
> index 000000000000..074b8c70036a
> --- /dev/null
> +++ b/configs/platform-mipsel/patches/barebox-2021.06.0/0002-MIPS-qemu-malta-explicitly-set-stdout-path.patch
> @@ -0,0 +1,35 @@
> +From 0da08cd25a0bacfa22cde380d5ead90077b6c7b3 Mon Sep 17 00:00:00 2001
> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +Date: Wed, 21 Aug 2024 15:12:02 +0200
> +Subject: [PATCH 2/2] MIPS: qemu-malta: explicitly set stdout-path
> +
> +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
> +
> diff --git a/configs/platform-mipsel/patches/barebox-2021.06.0/series b/configs/platform-mipsel/patches/barebox-2021.06.0/series
> new file mode 100644
> index 000000000000..b9b6f404fa41
> --- /dev/null
> +++ b/configs/platform-mipsel/patches/barebox-2021.06.0/series
> @@ -0,0 +1,2 @@
> +0001-MIPS-dts-add-chosen-stdout-path-where-it-is-missing.patch
> +0002-MIPS-qemu-malta-explicitly-set-stdout-path.patch
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |



      parent reply	other threads:[~2024-08-22 17:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22 13:45 Ahmad Fatoum
2024-08-22 13:45 ` [DistroKit] [PATCH 2/3] MIPS: qemu-run: fix barebox Malta image name Ahmad Fatoum
2024-08-22 13:45 ` [DistroKit] [PATCH 3/3] mipsel: qemu-run: enable emulation of little endian barebox Ahmad Fatoum
2024-08-22 17:26 ` [DistroKit] [PATCH 1/3] MIPS(EL): barebox: add /chosen/stdout-path properties for all boards Oleksij Rempel
2024-08-22 17:39 ` Robert Schwebel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zsd31wMrfIQFJYFk@pengutronix.de \
    --to=r.schwebel@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    --cc=ore@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox