mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] of: reserved-mem: add debug print for reservations
@ 2023-11-22 17:31 Ahmad Fatoum
  2023-11-23  7:23 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-11-22 17:31 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

reserve_sdram_region can now involve cache maintenance, so add a debug
print beforehand to aid debugging.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/of/reserved-mem.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/of/reserved-mem.c b/drivers/of/reserved-mem.c
index f50a0bd8374d..599a7c968afd 100644
--- a/drivers/of/reserved-mem.c
+++ b/drivers/of/reserved-mem.c
@@ -1,6 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
 // SPDX-FileCopyrightText: 2021 Rouven Czerwinski <r.czerwinski@pengutronix.de>, Pengutronix
 
+#define pr_fmt(fmt) "of-reserved-mem: " fmt
+
 #include <stdio.h>
 #include <of.h>
 #include <of_address.h>
@@ -17,6 +19,8 @@ static void request_region(struct resource *r)
 		if (!resource_contains(bank->res, r))
 			continue;
 
+		pr_debug("reserving %s at %pad-%pad\n", r->name, &r->start, &r->end);
+
 		if (!reserve_sdram_region(r->name, r->start, resource_size(r)))
 			pr_warn("couldn't request reserved sdram region %pa-%pa\n",
 				&r->start, &r->end);
-- 
2.39.2




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

* Re: [PATCH] of: reserved-mem: add debug print for reservations
  2023-11-22 17:31 [PATCH] of: reserved-mem: add debug print for reservations Ahmad Fatoum
@ 2023-11-23  7:23 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2023-11-23  7:23 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Wed, Nov 22, 2023 at 06:31:18PM +0100, Ahmad Fatoum wrote:
> reserve_sdram_region can now involve cache maintenance, so add a debug
> print beforehand to aid debugging.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  drivers/of/reserved-mem.c | 4 ++++
>  1 file changed, 4 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/drivers/of/reserved-mem.c b/drivers/of/reserved-mem.c
> index f50a0bd8374d..599a7c968afd 100644
> --- a/drivers/of/reserved-mem.c
> +++ b/drivers/of/reserved-mem.c
> @@ -1,6 +1,8 @@
>  // SPDX-License-Identifier: GPL-2.0-only
>  // SPDX-FileCopyrightText: 2021 Rouven Czerwinski <r.czerwinski@pengutronix.de>, Pengutronix
>  
> +#define pr_fmt(fmt) "of-reserved-mem: " fmt
> +
>  #include <stdio.h>
>  #include <of.h>
>  #include <of_address.h>
> @@ -17,6 +19,8 @@ static void request_region(struct resource *r)
>  		if (!resource_contains(bank->res, r))
>  			continue;
>  
> +		pr_debug("reserving %s at %pad-%pad\n", r->name, &r->start, &r->end);
> +
>  		if (!reserve_sdram_region(r->name, r->start, resource_size(r)))
>  			pr_warn("couldn't request reserved sdram region %pa-%pa\n",
>  				&r->start, &r->end);
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2023-11-23  7:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-22 17:31 [PATCH] of: reserved-mem: add debug print for reservations Ahmad Fatoum
2023-11-23  7:23 ` Sascha Hauer

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