From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/9] mci: move mci_setup_cmd definition into header
Date: Tue, 22 Apr 2025 07:26:29 +0200 [thread overview]
Message-ID: <20250422052635.3423961-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250422052635.3423961-1-a.fatoum@pengutronix.de>
For use outside of mci-core, e.g. in PBL drivers, move the helper
function into the header.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/mci/mci-core.c | 15 ---------------
include/mci.h | 16 ++++++++++++++++
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 5ab07d09c546..9a8e1ce656b5 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -97,21 +97,6 @@ static int mci_send_cmd_retry(struct mci *mci, struct mci_cmd *cmd,
return ret;
}
-/**
- * @param p Command definition to setup
- * @param cmd Valid SD/MMC command (refer MMC_CMD_* / SD_CMD_*)
- * @param arg Argument for the command (optional)
- * @param response Command's response type (refer MMC_RSP_*)
- *
- * Note: When calling, the 'response' must match command's requirements
- */
-static void mci_setup_cmd(struct mci_cmd *p, unsigned cmd, unsigned arg, unsigned response)
-{
- p->cmdidx = cmd;
- p->cmdarg = arg;
- p->resp_type = response;
-}
-
/**
* configure optional DSR value
* @param mci_dev MCI instance
diff --git a/include/mci.h b/include/mci.h
index 43a0b0131572..10bba878a8f9 100644
--- a/include/mci.h
+++ b/include/mci.h
@@ -480,6 +480,22 @@ struct mci_cmd {
unsigned response[4]; /**< card's response */
};
+/**
+ * @param p Command definition to setup
+ * @param cmd Valid SD/MMC command (refer MMC_CMD_* / SD_CMD_*)
+ * @param arg Argument for the command (optional)
+ * @param response Command's response type (refer MMC_RSP_*)
+ *
+ * Note: When calling, the 'response' must match command's requirements
+ */
+static inline void mci_setup_cmd(struct mci_cmd *p, unsigned cmd,
+ unsigned arg, unsigned response)
+{
+ p->cmdidx = cmd;
+ p->cmdarg = arg;
+ p->resp_type = response;
+}
+
/** data information to be used with some SD/MMC commands */
struct mci_data {
union {
--
2.39.5
next prev parent reply other threads:[~2025-04-22 5:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 5:26 [PATCH 0/9] ARM: OMAP: beaglebone: add PBL SD xload support Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 1/9] clocksource: make available in PBL Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 2/9] clocksource: ti-dm: " Ahmad Fatoum
2025-04-22 5:26 ` Ahmad Fatoum [this message]
2025-04-22 5:26 ` [PATCH 4/9] mci: add common PBL helper for chainloading after BootROM initialization Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 5/9] mci: pbl: add autodetection of BootROM-initialized standard capacity cards Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 6/9] mci: omap_hsmmc: split out common code Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 7/9] ARM: OMAP: add am33xx_hsmmc_start_image for PBL Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 8/9] mci: omap_hsmmc: add xload implementation " Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 9/9] ARM: OMAP: beaglebone: add PBL SD xload support Ahmad Fatoum
2025-04-22 10:55 ` [PATCH 0/9] " 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=20250422052635.3423961-4-a.fatoum@pengutronix.de \
--to=a.fatoum@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