mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: has@pengutronix.de, bst@pengutronix.de,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] mfd: pca9450: print reset reason as hex if unknown
Date: Thu,  2 May 2024 12:17:24 +0200	[thread overview]
Message-ID: <20240502101724.2609941-1-a.fatoum@pengutronix.de> (raw)

On an i.MX93-based board, it was observed that a potential ELE-induced
reset ended up with an unknown reset reason. To aid in debugging this,
print the value in hexadecimal when no mapping is known.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/mfd/pca9450.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/pca9450.c b/drivers/mfd/pca9450.c
index 8fa5363f8a60..be357c10239f 100644
--- a/drivers/mfd/pca9450.c
+++ b/drivers/mfd/pca9450.c
@@ -52,7 +52,7 @@ static int pca9450_get_reset_source(struct device *dev, struct regmap *map)
 		type = RESET_EXT;
 		break;
 	default:
-		dev_warn(dev, "Could not determine reset reason.\n");
+		dev_warn(dev, "Unknown reset reason: 0x%02x\n", reg);
 		type = RESET_UKWN;
 	}
 
-- 
2.39.2




             reply	other threads:[~2024-05-02 10:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02 10:17 Ahmad Fatoum [this message]
2024-05-03  6:54 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240502101724.2609941-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=bst@pengutronix.de \
    --cc=has@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox