[PATCH] of: reserved-mem: add debug print for reservations
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Nov 22 09:31:18 PST 2023
reserve_sdram_region can now involve cache maintenance, so add a debug
print beforehand to aid debugging.
Signed-off-by: Ahmad Fatoum <a.fatoum at 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 at 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
More information about the barebox
mailing list