From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] mci: move optee_rpmb_detected() to where the card is detected
Date: Thu, 19 Mar 2026 08:02:00 +0100 [thread overview]
Message-ID: <20260319070201.1930012-1-s.hauer@pengutronix.de> (raw)
mci_register() only registers a host controller, but depending on
configuration the card is not detected in this function. Move
the call to optee_rpmb_detected() to mci_card_probe() where the
card is actually detected.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/mci/mci-core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index b5a7e6f6bf..cdb20a5625 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -2984,6 +2984,9 @@ static int mci_card_probe(struct mci *mci)
mci_parse_cid(mci);
+ if (mci->rpmb_part)
+ optee_rpmb_detected();
+
dev_dbg(&mci->dev, "Card successfully added\n");
on_error:
@@ -3123,9 +3126,6 @@ int mci_register(struct mci_host *host)
class_add_device(&mmc_class, &mci->dev);
- if (mci->rpmb_part)
- optee_rpmb_detected();
-
return 0;
err_free:
--
2.47.3
next reply other threads:[~2026-03-19 7:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 7:02 Sascha Hauer [this message]
2026-03-20 6:34 ` 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=20260319070201.1930012-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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