aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-12-05 05:31:22 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2014-12-08 03:11:04 -0500
commitfe5afb13d46e76b07ab7e732f2b694dcafef4d9d (patch)
treed424d9f91774042e9c7e57883052b61bf3d99e29
parentfdb409f636cd6fc3ac4e2f9c880402860e738554 (diff)
mmc: core: Let mmc_send_tuning() to take struct mmc_host* as parameter
To be able to use mmc_send_tuning() prior the struct mmc_card has been allocated, let's convert it to take the struct mmc_host* as parameter instead. Suggested-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Dong Aisheng <b29396@freescale.com> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r--drivers/mmc/core/mmc_ops.c7
-rw-r--r--include/linux/mmc/core.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 12b2a32df346..3b044c5b029c 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -547,14 +547,13 @@ int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
547} 547}
548EXPORT_SYMBOL_GPL(mmc_switch); 548EXPORT_SYMBOL_GPL(mmc_switch);
549 549
550int mmc_send_tuning(struct mmc_card *card) 550int mmc_send_tuning(struct mmc_host *host)
551{ 551{
552 struct mmc_request mrq = {NULL}; 552 struct mmc_request mrq = {NULL};
553 struct mmc_command cmd = {0}; 553 struct mmc_command cmd = {0};
554 struct mmc_data data = {0}; 554 struct mmc_data data = {0};
555 struct scatterlist sg; 555 struct scatterlist sg;
556 struct mmc_host *mmc = card->host; 556 struct mmc_ios *ios = &host->ios;
557 struct mmc_ios *ios = &mmc->ios;
558 const u8 *tuning_block_pattern; 557 const u8 *tuning_block_pattern;
559 int size, err = 0; 558 int size, err = 0;
560 u8 *data_buf; 559 u8 *data_buf;
@@ -596,7 +595,7 @@ int mmc_send_tuning(struct mmc_card *card)
596 data.sg_len = 1; 595 data.sg_len = 1;
597 sg_init_one(&sg, data_buf, size); 596 sg_init_one(&sg, data_buf, size);
598 597
599 mmc_wait_for_req(mmc, &mrq); 598 mmc_wait_for_req(host, &mrq);
600 599
601 if (cmd.error) { 600 if (cmd.error) {
602 err = cmd.error; 601 err = cmd.error;
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index c4bdaa128693..cb2b0400d284 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -154,7 +154,7 @@ extern void mmc_start_bkops(struct mmc_card *card, bool from_exception);
154extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool, 154extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool,
155 bool, bool); 155 bool, bool);
156extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int); 156extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int);
157extern int mmc_send_tuning(struct mmc_card *card); 157extern int mmc_send_tuning(struct mmc_host *host);
158extern int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd); 158extern int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd);
159 159
160#define MMC_ERASE_ARG 0x00000000 160#define MMC_ERASE_ARG 0x00000000