From: Daniel Schultz <d.schultz@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/3] drivers: mci: Make two functions public
Date: Mon, 24 Aug 2015 13:32:14 +0200 [thread overview]
Message-ID: <1440415935-32674-2-git-send-email-d.schultz@phytec.de> (raw)
In-Reply-To: <1440415935-32674-1-git-send-email-d.schultz@phytec.de>
There is no possibility to read/write to the extended CSD register of MMC devices from a command.
To avoid duplicated driver code, two driver functions have to be public.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
drivers/mci/mci-core.c | 4 ++--
include/mci.h | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index bd5cae2..c22f932 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -370,7 +370,7 @@ static int mmc_send_op_cond(struct mci *mci)
* Note: Only cards newer than Version 1.1 (Physical Layer Spec) support
* this command
*/
-static int mci_send_ext_csd(struct mci *mci, char *ext_csd)
+int mci_send_ext_csd(struct mci *mci, char *ext_csd)
{
struct mci_cmd cmd;
struct mci_data data;
@@ -394,7 +394,7 @@ static int mci_send_ext_csd(struct mci *mci, char *ext_csd)
* @param value FIXME
* @return Transaction status (0 on success)
*/
-static int mci_switch(struct mci *mci, unsigned set, unsigned index,
+int mci_switch(struct mci *mci, unsigned set, unsigned index,
unsigned value)
{
struct mci_cmd cmd;
diff --git a/include/mci.h b/include/mci.h
index c5ab5b3..a7bf8cd 100644
--- a/include/mci.h
+++ b/include/mci.h
@@ -372,6 +372,9 @@ struct mci {
int mci_register(struct mci_host*);
void mci_of_parse(struct mci_host *host);
int mci_detect_card(struct mci_host *);
+int mci_send_ext_csd(struct mci *mci, char *ext_csd);
+int mci_switch(struct mci *mci, unsigned set, unsigned index,
+ unsigned value);
static inline int mmc_host_is_spi(struct mci_host *host)
{
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-08-24 11:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-24 11:32 [PATCH 1/3] commands: Add MMC ext. CSD register tool Daniel Schultz
2015-08-24 11:32 ` Daniel Schultz [this message]
2015-08-25 5:51 ` [PATCH 2/3] drivers: mci: Make two functions public Sascha Hauer
2015-08-24 11:32 ` [PATCH 3/3] include: mci: Add new ext. CSD field defines Daniel Schultz
2015-08-25 5:50 ` Sascha Hauer
2015-08-25 7:06 ` [PATCH 1/3] commands: Add MMC ext. CSD register tool Sascha Hauer
2015-08-25 13:16 ` Jan Lübbe
2015-08-25 13:20 ` Jan Lübbe
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=1440415935-32674-2-git-send-email-d.schultz@phytec.de \
--to=d.schultz@phytec.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.