MMC: Expose mmc_switch to higher drivers.
authorAndrei Warkentin <andreiw@motorola.com>
Wed, 6 Apr 2011 21:33:44 +0000 (16:33 -0500)
committerKen Sumrall <ksumrall@android.com>
Fri, 8 Apr 2011 00:53:31 +0000 (17:53 -0700)
Needed for Sandisk workaround (manipulate EXT_CSD).

Change-Id: I7bfe50a1503ac73ae072db718b60c27526521e41
Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
drivers/mmc/core/mmc_ops.c
drivers/mmc/core/mmc_ops.h
include/linux/mmc/core.h

index 326447c9ede8aa5a9153f8019a47f706f20917ec..b6d75eec4b367f59c58059bd6254ed2b9b797efd 100644 (file)
@@ -387,6 +387,15 @@ int mmc_spi_set_crc(struct mmc_host *host, int use_crc)
        return err;
 }
 
+/**
+ *     mmc_switch - modify EXT_CSD register
+ *     @card: the MMC card associated with the data transfer
+ *     @set: cmd set values
+ *     @index: EXT_CSD register index
+ *     @value: value to program into EXT_CSD register
+ *
+ *     Modifies the EXT_CSD register for selected card.
+ */
 int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value)
 {
        int err;
@@ -434,6 +443,8 @@ int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value)
        return 0;
 }
 
+EXPORT_SYMBOL(mmc_switch);
+
 int mmc_send_status(struct mmc_card *card, u32 *status)
 {
        int err;
index 653eb8e841789d0c440875e07bacbef5cc6877fe..b1a806fbd3960be697ad7bca6c7177c661d7bd68 100644 (file)
@@ -20,7 +20,6 @@ int mmc_all_send_cid(struct mmc_host *host, u32 *cid);
 int mmc_set_relative_addr(struct mmc_card *card);
 int mmc_send_csd(struct mmc_card *card, u32 *csd);
 int mmc_send_ext_csd(struct mmc_card *card, u8 *ext_csd);
-int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value);
 int mmc_send_status(struct mmc_card *card, u32 *status);
 int mmc_send_cid(struct mmc_host *host, u32 *cid);
 int mmc_spi_read_ocr(struct mmc_host *host, int highcap, u32 *ocrp);
index 7429033acb663dc4974a5ecdf44b696da416976d..a6cd7c35958a31832c6701e1e53f3617eb83b01f 100644 (file)
@@ -135,6 +135,7 @@ extern void mmc_wait_for_req(struct mmc_host *, struct mmc_request *);
 extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int);
 extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *,
        struct mmc_command *, int);
+extern int mmc_switch(struct mmc_card *, u8, u8, u8);
 
 #define MMC_ERASE_ARG          0x00000000
 #define MMC_SECURE_ERASE_ARG   0x80000000