mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] ARM: rpi: turn fixup message into debug messages
@ 2024-09-11  8:17 Ahmad Fatoum
  2024-09-11  8:17 ` [PATCH 2/3] ARM: rpi: always add built-in env Ahmad Fatoum
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2024-09-11  8:17 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

When network booted, these properties may be missing and informing the
user about it arguably just clutters the log.

Thus bump down the log level to debug.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/boards/raspberry-pi/rpi-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index 628f657ea216..ee0b0f63dbef 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -301,7 +301,7 @@ static struct device_node *register_vc_fixup(struct device_node *root,
 		tmp->full_name = xstrdup(ret->full_name);
 		of_register_fixup(rpi_vc_fdt_fixup, tmp);
 	} else {
-		pr_info("no '%s' node found in vc fdt\n", path);
+		pr_debug("no '%s' node found in vc fdt\n", path);
 	}
 
 	return ret;
@@ -341,7 +341,7 @@ static int register_vc_property_fixup(struct device_node *root,
 
 		of_register_fixup(rpi_vc_fdt_fixup_property, fixup_data);
 	} else {
-		pr_info("no '%s' node found in vc fdt\n", path);
+		pr_debug("no '%s' node found in vc fdt\n", path);
 		return -ENOENT;
 	}
 
-- 
2.39.2




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

* [PATCH 2/3] ARM: rpi: always add built-in env
  2024-09-11  8:17 [PATCH 1/3] ARM: rpi: turn fixup message into debug messages Ahmad Fatoum
@ 2024-09-11  8:17 ` Ahmad Fatoum
  2024-09-11  8:17 ` [PATCH 3/3] ARM: rpi: return correct error code when failing to read revision Ahmad Fatoum
  2024-09-11  8:29 ` [PATCH 1/3] ARM: rpi: turn fixup message into debug messages Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2024-09-11  8:17 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The function loads both the built-in env and the barebox.env file on the
SD-Card's boot partition. Failure to mount the SD-Card should still
result in the built-in env being loaded, therefore move it to the start
of the function.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/boards/raspberry-pi/rpi-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index ee0b0f63dbef..7a3911e36fa1 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -196,6 +196,8 @@ static int rpi_env_init(void)
 	const char *diskdev;
 	int ret;
 
+	defaultenv_append_directory(defaultenv_rpi);
+
 	device_detect_by_name("mci0");
 	device_detect_by_name("mci1");
 
@@ -218,8 +220,6 @@ static int rpi_env_init(void)
 		return 0;
 	}
 
-	defaultenv_append_directory(defaultenv_rpi);
-
 	default_environment_path_set("/boot/barebox.env");
 
 	return 0;
-- 
2.39.2




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

* [PATCH 3/3] ARM: rpi: return correct error code when failing to read revision
  2024-09-11  8:17 [PATCH 1/3] ARM: rpi: turn fixup message into debug messages Ahmad Fatoum
  2024-09-11  8:17 ` [PATCH 2/3] ARM: rpi: always add built-in env Ahmad Fatoum
@ 2024-09-11  8:17 ` Ahmad Fatoum
  2024-09-11  8:29 ` [PATCH 1/3] ARM: rpi: turn fixup message into debug messages Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2024-09-11  8:17 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

When rpi_get_dcfg() returned an error, ret wasn't set and continued to
hold the value of the hardware revision, which would be used as return
value for the initcall.

rpi_get_dcfg() already prints an error message with the HW revision when
returning an error pointer, so passing along the extra error code
results in no loss of information.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/boards/raspberry-pi/rpi-common.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index 7a3911e36fa1..754772da460f 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -552,8 +552,10 @@ static int rpi_devices_probe(struct device *dev)
 	priv->hw_id = ret;
 
 	dcfg = rpi_get_dcfg(priv);
-	if (IS_ERR(dcfg))
+	if (IS_ERR(dcfg)) {
+		ret = PTR_ERR(dcfg);
 		goto free_priv;
+	}
 
 	/* construct short recognizable host name */
 	name = of_device_get_match_compatible(priv->dev);
-- 
2.39.2




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

* Re: [PATCH 1/3] ARM: rpi: turn fixup message into debug messages
  2024-09-11  8:17 [PATCH 1/3] ARM: rpi: turn fixup message into debug messages Ahmad Fatoum
  2024-09-11  8:17 ` [PATCH 2/3] ARM: rpi: always add built-in env Ahmad Fatoum
  2024-09-11  8:17 ` [PATCH 3/3] ARM: rpi: return correct error code when failing to read revision Ahmad Fatoum
@ 2024-09-11  8:29 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2024-09-11  8:29 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Wed, 11 Sep 2024 10:17:45 +0200, Ahmad Fatoum wrote:
> When network booted, these properties may be missing and informing the
> user about it arguably just clutters the log.
> 
> Thus bump down the log level to debug.
> 
> 

Applied, thanks!

[1/3] ARM: rpi: turn fixup message into debug messages
      https://git.pengutronix.de/cgit/barebox/commit/?id=514157b1ae5b (link may not be stable)
[2/3] ARM: rpi: always add built-in env
      https://git.pengutronix.de/cgit/barebox/commit/?id=7f8daea2da40 (link may not be stable)
[3/3] ARM: rpi: return correct error code when failing to read revision
      https://git.pengutronix.de/cgit/barebox/commit/?id=314ef77d68ba (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-09-11  8:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-11  8:17 [PATCH 1/3] ARM: rpi: turn fixup message into debug messages Ahmad Fatoum
2024-09-11  8:17 ` [PATCH 2/3] ARM: rpi: always add built-in env Ahmad Fatoum
2024-09-11  8:17 ` [PATCH 3/3] ARM: rpi: return correct error code when failing to read revision Ahmad Fatoum
2024-09-11  8:29 ` [PATCH 1/3] ARM: rpi: turn fixup message into debug messages Sascha Hauer

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