mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v3 1/4] drivers: mci: Make two functions public
@ 2015-09-02  6:28 Daniel Schultz
  2015-09-02  6:28 ` [PATCH v3 2/4] include: mci: Add new ext. CSD field defines Daniel Schultz
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Daniel Schultz @ 2015-09-02  6:28 UTC (permalink / raw)
  To: barebox

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>
---

Changes:
	v2:
	Changed patch order

	v3:
	No changes

 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-09-07  7:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-02  6:28 [PATCH v3 1/4] drivers: mci: Make two functions public Daniel Schultz
2015-09-02  6:28 ` [PATCH v3 2/4] include: mci: Add new ext. CSD field defines Daniel Schultz
2015-09-02  6:28 ` [PATCH v3 3/4] drivers: mci: Add mci_get_device_by_name function Daniel Schultz
2015-09-07  5:47   ` Sascha Hauer
2015-09-02  6:28 ` [PATCH v3 4/4] commands: Add MMC ext. CSD register tool Daniel Schultz
2015-09-07  7:00   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox