From: Patrick Delaunay <patrick.delaunay@foss.st.com>
Date: Thu, 10 Nov 2022 10:49:04 +0000 (+0100)
Subject: env: mmc: add debug message when mmc-env-partition is not found
X-Git-Tag: v2025.01-rc5-pxa1908~1156^2~1
X-Git-Url: http://git.dujemihanovic.xyz/img/html/static/gitweb.css?a=commitdiff_plain;h=52e9aa3cd28396f1bf28640860a95784fb8a7302;p=u-boot.git

env: mmc: add debug message when mmc-env-partition is not found

Add a debug message to indicate a potential issue when
"u-boot,mmc-env-partition" is present in config node of device tree
but this partition name is not found in the mmc device.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
---

diff --git a/env/mmc.c b/env/mmc.c
index bd7d51e6b6..8941e0f5ff 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -120,6 +120,7 @@ static inline s64 mmc_offset(int copy)
 		err = mmc_offset_try_partition(str, copy, &val);
 		if (!err)
 			return val;
+		debug("env partition '%s' not found (%d)", str, err);
 	}
 
 	/* try the GPT partition with "U-Boot ENV" TYPE GUID */