Hello,

Thanks for the report.

>> >>> Neha bisected it down to 197376fbf300e92afa0a1583815d9c9eb52d613a commit
>> >>> which is this patch.
>> >>
>> >> And assuming it's the same failure I got reported this morning by one of
>> >> my coworkers, we just get:
>> >> U-Boot SPL 2025.04-01050-ga40fc5afaec0 (Apr 14 2025 - 07:31:32 +0000)
>> >> SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')
>> 
>> This is not the failure I am seeing, we hang before console comes up so
>> no prints. Looks like the different failure signature is due to TIFS
>> (SYSFW) firmware being different (v9.2.7 vs. 11.0.4)
>
> To me it was failing freezing just after this
>
> U-Boot SPL 2025.04-01076-g739ad58dbee8 (Apr 14 2025 - 17:23:46 +0200)
> SYSFW ABI: 4.0 (firmware rev 0x000b '11.0.7--v11.00.07 (Fancy Rat)')
>
> and, with commit 197376fbf300 ("power-domain: Add refcounting") reverted
> the issue is fixed and I get to the U-Boot command line.

Francesco, are you also testing on K3 platforms?

Can one of you boot with the patch below applied? It should partially
revert the commit to the ancient behaviour, while adding more debug
traces (please enable the debug logs as well). This should clarify
which one of the 3 different path is likely failing. It should also help
identify who's the user that fails to enable/disable its own power
domain. I will need to know what board/SoC was used for the test, so I
can look the relevant driver up.

Thanks for your help,
Miquèl

---

>From 4b128872b2dbcdfb626b8683fbb6c75d17a5089c Mon Sep 17 00:00:00 2001
From: Miquel Raynal <miquel.ray...@bootlin.com>
Date: Tue, 15 Apr 2025 10:07:05 +0200
Subject: [PATCH] HACK: power-domain: Add debug traces without actually failing

Signed-off-by: Miquel Raynal <miquel.ray...@bootlin.com>
---
 drivers/power/domain/power-domain-uclass.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c
index a6e5f9ed0369..18ace2cc7256 100644
--- a/drivers/power/domain/power-domain-uclass.c
+++ b/drivers/power/domain/power-domain-uclass.c
@@ -117,10 +117,12 @@ int power_domain_on_lowlevel(struct power_domain *power_domain)
 	struct power_domain_ops *ops = power_domain_dev_ops(power_domain->dev);
 	int ret;
 
-	debug("%s(power_domain=%p)\n", __func__, power_domain);
+	debug("%s(power_domain=%p, id %d)\n", __func__, power_domain, power_domain->id);
 
-	if (priv->on_count++ > 0)
-		return -EALREADY;
+	if (priv->on_count++ > 0) {
+		debug("Power domain %s already on.\n", power_domain->dev->name);
+		//return -EALREADY;
+	}
 
 	ret = ops->on ? ops->on(power_domain) : 0;
 	if (ret) {
@@ -137,15 +139,17 @@ int power_domain_off_lowlevel(struct power_domain *power_domain)
 	struct power_domain_ops *ops = power_domain_dev_ops(power_domain->dev);
 	int ret;
 
-	debug("%s(power_domain=%p)\n", __func__, power_domain);
+	debug("%s(power_domain=%p, id %d)\n", __func__, power_domain, power_domain->id);
 
 	if (priv->on_count <= 0) {
 		debug("Power domain %s already off.\n", power_domain->dev->name);
-		return -EALREADY;
+		//return -EALREADY;
 	}
 
-	if (priv->on_count-- > 1)
-		return -EBUSY;
+	if (priv->on_count-- > 1) {
+		debug("Power domain %s still in use.\n", power_domain->dev->name);
+		//return -EBUSY;
+	}
 
 	ret = ops->off ? ops->off(power_domain) : 0;
 	if (ret) {
-- 
2.48.1

Reply via email to