diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/at91_mci.c | 3 | ||||
-rw-r--r-- | drivers/mmc/au1xmmc.c | 4 | ||||
-rw-r--r-- | drivers/mmc/imxmmc.c | 60 | ||||
-rw-r--r-- | drivers/mmc/mmc.c | 62 | ||||
-rw-r--r-- | drivers/mmc/mmc_block.c | 6 | ||||
-rw-r--r-- | drivers/mmc/mmci.c | 3 | ||||
-rw-r--r-- | drivers/mmc/pxamci.c | 13 | ||||
-rw-r--r-- | drivers/mmc/sdhci.c | 4 | ||||
-rw-r--r-- | drivers/mmc/wbsd.c | 4 |
9 files changed, 93 insertions, 66 deletions
diff --git a/drivers/mmc/at91_mci.c b/drivers/mmc/at91_mci.c index 6061c2d101a0..88f0eef9cf33 100644 --- a/drivers/mmc/at91_mci.c +++ b/drivers/mmc/at91_mci.c | |||
@@ -621,9 +621,6 @@ static void at91_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
621 | struct at91mci_host *host = mmc_priv(mmc); | 621 | struct at91mci_host *host = mmc_priv(mmc); |
622 | unsigned long at91_master_clock = clk_get_rate(mci_clk); | 622 | unsigned long at91_master_clock = clk_get_rate(mci_clk); |
623 | 623 | ||
624 | DBG("Clock %uHz, busmode %u, powermode %u, Vdd %u\n", | ||
625 | ios->clock, ios->bus_mode, ios->power_mode, ios->vdd); | ||
626 | |||
627 | if (host) | 624 | if (host) |
628 | host->bus_mode = ios->bus_mode; | 625 | host->bus_mode = ios->bus_mode; |
629 | else | 626 | else |
diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c index c0326bbc5f28..914d62b24064 100644 --- a/drivers/mmc/au1xmmc.c +++ b/drivers/mmc/au1xmmc.c | |||
@@ -720,10 +720,6 @@ static void au1xmmc_set_ios(struct mmc_host* mmc, struct mmc_ios* ios) | |||
720 | { | 720 | { |
721 | struct au1xmmc_host *host = mmc_priv(mmc); | 721 | struct au1xmmc_host *host = mmc_priv(mmc); |
722 | 722 | ||
723 | DBG("set_ios (power=%u, clock=%uHz, vdd=%u, mode=%u)\n", | ||
724 | host->id, ios->power_mode, ios->clock, ios->vdd, | ||
725 | ios->bus_mode); | ||
726 | |||
727 | if (ios->power_mode == MMC_POWER_OFF) | 723 | if (ios->power_mode == MMC_POWER_OFF) |
728 | au1xmmc_set_power(host, 0); | 724 | au1xmmc_set_power(host, 0); |
729 | else if (ios->power_mode == MMC_POWER_ON) { | 725 | else if (ios->power_mode == MMC_POWER_ON) { |
diff --git a/drivers/mmc/imxmmc.c b/drivers/mmc/imxmmc.c index ffb7f55d3467..79358e223f57 100644 --- a/drivers/mmc/imxmmc.c +++ b/drivers/mmc/imxmmc.c | |||
@@ -102,6 +102,7 @@ struct imxmci_host { | |||
102 | #define IMXMCI_PEND_CPU_DATA_b 5 | 102 | #define IMXMCI_PEND_CPU_DATA_b 5 |
103 | #define IMXMCI_PEND_CARD_XCHG_b 6 | 103 | #define IMXMCI_PEND_CARD_XCHG_b 6 |
104 | #define IMXMCI_PEND_SET_INIT_b 7 | 104 | #define IMXMCI_PEND_SET_INIT_b 7 |
105 | #define IMXMCI_PEND_STARTED_b 8 | ||
105 | 106 | ||
106 | #define IMXMCI_PEND_IRQ_m (1 << IMXMCI_PEND_IRQ_b) | 107 | #define IMXMCI_PEND_IRQ_m (1 << IMXMCI_PEND_IRQ_b) |
107 | #define IMXMCI_PEND_DMA_END_m (1 << IMXMCI_PEND_DMA_END_b) | 108 | #define IMXMCI_PEND_DMA_END_m (1 << IMXMCI_PEND_DMA_END_b) |
@@ -111,6 +112,7 @@ struct imxmci_host { | |||
111 | #define IMXMCI_PEND_CPU_DATA_m (1 << IMXMCI_PEND_CPU_DATA_b) | 112 | #define IMXMCI_PEND_CPU_DATA_m (1 << IMXMCI_PEND_CPU_DATA_b) |
112 | #define IMXMCI_PEND_CARD_XCHG_m (1 << IMXMCI_PEND_CARD_XCHG_b) | 113 | #define IMXMCI_PEND_CARD_XCHG_m (1 << IMXMCI_PEND_CARD_XCHG_b) |
113 | #define IMXMCI_PEND_SET_INIT_m (1 << IMXMCI_PEND_SET_INIT_b) | 114 | #define IMXMCI_PEND_SET_INIT_m (1 << IMXMCI_PEND_SET_INIT_b) |
115 | #define IMXMCI_PEND_STARTED_m (1 << IMXMCI_PEND_STARTED_b) | ||
114 | 116 | ||
115 | static void imxmci_stop_clock(struct imxmci_host *host) | 117 | static void imxmci_stop_clock(struct imxmci_host *host) |
116 | { | 118 | { |
@@ -131,23 +133,52 @@ static void imxmci_stop_clock(struct imxmci_host *host) | |||
131 | dev_dbg(mmc_dev(host->mmc), "imxmci_stop_clock blocked, no luck\n"); | 133 | dev_dbg(mmc_dev(host->mmc), "imxmci_stop_clock blocked, no luck\n"); |
132 | } | 134 | } |
133 | 135 | ||
134 | static void imxmci_start_clock(struct imxmci_host *host) | 136 | static int imxmci_start_clock(struct imxmci_host *host) |
135 | { | 137 | { |
136 | int i = 0; | 138 | unsigned int trials = 0; |
139 | unsigned int delay_limit = 128; | ||
140 | unsigned long flags; | ||
141 | |||
137 | MMC_STR_STP_CLK &= ~STR_STP_CLK_STOP_CLK; | 142 | MMC_STR_STP_CLK &= ~STR_STP_CLK_STOP_CLK; |
138 | while(i < 0x1000) { | ||
139 | if(!(i & 0x7f)) | ||
140 | MMC_STR_STP_CLK |= STR_STP_CLK_START_CLK; | ||
141 | 143 | ||
142 | if(MMC_STATUS & STATUS_CARD_BUS_CLK_RUN) { | 144 | clear_bit(IMXMCI_PEND_STARTED_b, &host->pending_events); |
143 | /* Check twice before cut */ | 145 | |
146 | /* | ||
147 | * Command start of the clock, this usually succeeds in less | ||
148 | * then 6 delay loops, but during card detection (low clockrate) | ||
149 | * it takes up to 5000 delay loops and sometimes fails for the first time | ||
150 | */ | ||
151 | MMC_STR_STP_CLK |= STR_STP_CLK_START_CLK; | ||
152 | |||
153 | do { | ||
154 | unsigned int delay = delay_limit; | ||
155 | |||
156 | while(delay--){ | ||
144 | if(MMC_STATUS & STATUS_CARD_BUS_CLK_RUN) | 157 | if(MMC_STATUS & STATUS_CARD_BUS_CLK_RUN) |
145 | return; | 158 | /* Check twice before cut */ |
159 | if(MMC_STATUS & STATUS_CARD_BUS_CLK_RUN) | ||
160 | return 0; | ||
161 | |||
162 | if(test_bit(IMXMCI_PEND_STARTED_b, &host->pending_events)) | ||
163 | return 0; | ||
146 | } | 164 | } |
147 | 165 | ||
148 | i++; | 166 | local_irq_save(flags); |
149 | } | 167 | /* |
150 | dev_dbg(mmc_dev(host->mmc), "imxmci_start_clock blocked, no luck\n"); | 168 | * Ensure, that request is not doubled under all possible circumstances. |
169 | * It is possible, that cock running state is missed, because some other | ||
170 | * IRQ or schedule delays this function execution and the clocks has | ||
171 | * been already stopped by other means (response processing, SDHC HW) | ||
172 | */ | ||
173 | if(!test_bit(IMXMCI_PEND_STARTED_b, &host->pending_events)) | ||
174 | MMC_STR_STP_CLK |= STR_STP_CLK_START_CLK; | ||
175 | local_irq_restore(flags); | ||
176 | |||
177 | } while(++trials<256); | ||
178 | |||
179 | dev_err(mmc_dev(host->mmc), "imxmci_start_clock blocked, no luck\n"); | ||
180 | |||
181 | return -1; | ||
151 | } | 182 | } |
152 | 183 | ||
153 | static void imxmci_softreset(void) | 184 | static void imxmci_softreset(void) |
@@ -498,7 +529,7 @@ static int imxmci_data_done(struct imxmci_host *host, unsigned int stat) | |||
498 | 529 | ||
499 | data_error = imxmci_finish_data(host, stat); | 530 | data_error = imxmci_finish_data(host, stat); |
500 | 531 | ||
501 | if (host->req->stop && (data_error == MMC_ERR_NONE)) { | 532 | if (host->req->stop) { |
502 | imxmci_stop_clock(host); | 533 | imxmci_stop_clock(host); |
503 | imxmci_start_cmd(host, host->req->stop, 0); | 534 | imxmci_start_cmd(host, host->req->stop, 0); |
504 | } else { | 535 | } else { |
@@ -622,6 +653,7 @@ static irqreturn_t imxmci_irq(int irq, void *devid, struct pt_regs *regs) | |||
622 | atomic_set(&host->stuck_timeout, 0); | 653 | atomic_set(&host->stuck_timeout, 0); |
623 | host->status_reg = stat; | 654 | host->status_reg = stat; |
624 | set_bit(IMXMCI_PEND_IRQ_b, &host->pending_events); | 655 | set_bit(IMXMCI_PEND_IRQ_b, &host->pending_events); |
656 | set_bit(IMXMCI_PEND_STARTED_b, &host->pending_events); | ||
625 | tasklet_schedule(&host->tasklet); | 657 | tasklet_schedule(&host->tasklet); |
626 | 658 | ||
627 | return IRQ_RETVAL(handled);; | 659 | return IRQ_RETVAL(handled);; |
@@ -775,10 +807,6 @@ static void imxmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
775 | struct imxmci_host *host = mmc_priv(mmc); | 807 | struct imxmci_host *host = mmc_priv(mmc); |
776 | int prescaler; | 808 | int prescaler; |
777 | 809 | ||
778 | dev_dbg(mmc_dev(host->mmc), "clock %u power %u vdd %u width %u\n", | ||
779 | ios->clock, ios->power_mode, ios->vdd, | ||
780 | (ios->bus_width==MMC_BUS_WIDTH_4)?4:1); | ||
781 | |||
782 | if( ios->bus_width==MMC_BUS_WIDTH_4 ) { | 810 | if( ios->bus_width==MMC_BUS_WIDTH_4 ) { |
783 | host->actual_bus_width = MMC_BUS_WIDTH_4; | 811 | host->actual_bus_width = MMC_BUS_WIDTH_4; |
784 | imx_gpio_mode(PB11_PF_SD_DAT3); | 812 | imx_gpio_mode(PB11_PF_SD_DAT3); |
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index da6ddd910fc5..1ca2c8b9c9b5 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
@@ -59,21 +59,23 @@ static const unsigned int tacc_mant[] = { | |||
59 | 59 | ||
60 | 60 | ||
61 | /** | 61 | /** |
62 | * mmc_request_done - finish processing an MMC command | 62 | * mmc_request_done - finish processing an MMC request |
63 | * @host: MMC host which completed command | 63 | * @host: MMC host which completed request |
64 | * @mrq: MMC request which completed | 64 | * @mrq: MMC request which request |
65 | * | 65 | * |
66 | * MMC drivers should call this function when they have completed | 66 | * MMC drivers should call this function when they have completed |
67 | * their processing of a command. This should be called before the | 67 | * their processing of a request. |
68 | * data part of the command has completed. | ||
69 | */ | 68 | */ |
70 | void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq) | 69 | void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq) |
71 | { | 70 | { |
72 | struct mmc_command *cmd = mrq->cmd; | 71 | struct mmc_command *cmd = mrq->cmd; |
73 | int err = mrq->cmd->error; | 72 | int err = cmd->error; |
74 | pr_debug("MMC: req done (%02x): %d: %08x %08x %08x %08x\n", | 73 | |
75 | cmd->opcode, err, cmd->resp[0], cmd->resp[1], | 74 | pr_debug("%s: req done (CMD%u): %d/%d/%d: %08x %08x %08x %08x\n", |
76 | cmd->resp[2], cmd->resp[3]); | 75 | mmc_hostname(host), cmd->opcode, err, |
76 | mrq->data ? mrq->data->error : 0, | ||
77 | mrq->stop ? mrq->stop->error : 0, | ||
78 | cmd->resp[0], cmd->resp[1], cmd->resp[2], cmd->resp[3]); | ||
77 | 79 | ||
78 | if (err && cmd->retries) { | 80 | if (err && cmd->retries) { |
79 | cmd->retries--; | 81 | cmd->retries--; |
@@ -97,8 +99,9 @@ EXPORT_SYMBOL(mmc_request_done); | |||
97 | void | 99 | void |
98 | mmc_start_request(struct mmc_host *host, struct mmc_request *mrq) | 100 | mmc_start_request(struct mmc_host *host, struct mmc_request *mrq) |
99 | { | 101 | { |
100 | pr_debug("MMC: starting cmd %02x arg %08x flags %08x\n", | 102 | pr_debug("%s: starting CMD%u arg %08x flags %08x\n", |
101 | mrq->cmd->opcode, mrq->cmd->arg, mrq->cmd->flags); | 103 | mmc_hostname(host), mrq->cmd->opcode, |
104 | mrq->cmd->arg, mrq->cmd->flags); | ||
102 | 105 | ||
103 | WARN_ON(host->card_busy == NULL); | 106 | WARN_ON(host->card_busy == NULL); |
104 | 107 | ||
@@ -312,6 +315,18 @@ void mmc_release_host(struct mmc_host *host) | |||
312 | 315 | ||
313 | EXPORT_SYMBOL(mmc_release_host); | 316 | EXPORT_SYMBOL(mmc_release_host); |
314 | 317 | ||
318 | static inline void mmc_set_ios(struct mmc_host *host) | ||
319 | { | ||
320 | struct mmc_ios *ios = &host->ios; | ||
321 | |||
322 | pr_debug("%s: clock %uHz busmode %u powermode %u cs %u Vdd %u width %u\n", | ||
323 | mmc_hostname(host), ios->clock, ios->bus_mode, | ||
324 | ios->power_mode, ios->chip_select, ios->vdd, | ||
325 | ios->bus_width); | ||
326 | |||
327 | host->ops->set_ios(host, ios); | ||
328 | } | ||
329 | |||
315 | static int mmc_select_card(struct mmc_host *host, struct mmc_card *card) | 330 | static int mmc_select_card(struct mmc_host *host, struct mmc_card *card) |
316 | { | 331 | { |
317 | int err; | 332 | int err; |
@@ -364,7 +379,7 @@ static int mmc_select_card(struct mmc_host *host, struct mmc_card *card) | |||
364 | } | 379 | } |
365 | } | 380 | } |
366 | 381 | ||
367 | host->ops->set_ios(host, &host->ios); | 382 | mmc_set_ios(host); |
368 | 383 | ||
369 | return MMC_ERR_NONE; | 384 | return MMC_ERR_NONE; |
370 | } | 385 | } |
@@ -415,7 +430,7 @@ static u32 mmc_select_voltage(struct mmc_host *host, u32 ocr) | |||
415 | ocr = 3 << bit; | 430 | ocr = 3 << bit; |
416 | 431 | ||
417 | host->ios.vdd = bit; | 432 | host->ios.vdd = bit; |
418 | host->ops->set_ios(host, &host->ios); | 433 | mmc_set_ios(host); |
419 | } else { | 434 | } else { |
420 | ocr = 0; | 435 | ocr = 0; |
421 | } | 436 | } |
@@ -549,6 +564,7 @@ static void mmc_decode_csd(struct mmc_card *card) | |||
549 | csd->read_partial = UNSTUFF_BITS(resp, 79, 1); | 564 | csd->read_partial = UNSTUFF_BITS(resp, 79, 1); |
550 | csd->write_misalign = UNSTUFF_BITS(resp, 78, 1); | 565 | csd->write_misalign = UNSTUFF_BITS(resp, 78, 1); |
551 | csd->read_misalign = UNSTUFF_BITS(resp, 77, 1); | 566 | csd->read_misalign = UNSTUFF_BITS(resp, 77, 1); |
567 | csd->r2w_factor = UNSTUFF_BITS(resp, 26, 3); | ||
552 | csd->write_blkbits = UNSTUFF_BITS(resp, 22, 4); | 568 | csd->write_blkbits = UNSTUFF_BITS(resp, 22, 4); |
553 | csd->write_partial = UNSTUFF_BITS(resp, 21, 1); | 569 | csd->write_partial = UNSTUFF_BITS(resp, 21, 1); |
554 | } else { | 570 | } else { |
@@ -583,6 +599,7 @@ static void mmc_decode_csd(struct mmc_card *card) | |||
583 | csd->read_partial = UNSTUFF_BITS(resp, 79, 1); | 599 | csd->read_partial = UNSTUFF_BITS(resp, 79, 1); |
584 | csd->write_misalign = UNSTUFF_BITS(resp, 78, 1); | 600 | csd->write_misalign = UNSTUFF_BITS(resp, 78, 1); |
585 | csd->read_misalign = UNSTUFF_BITS(resp, 77, 1); | 601 | csd->read_misalign = UNSTUFF_BITS(resp, 77, 1); |
602 | csd->r2w_factor = UNSTUFF_BITS(resp, 26, 3); | ||
586 | csd->write_blkbits = UNSTUFF_BITS(resp, 22, 4); | 603 | csd->write_blkbits = UNSTUFF_BITS(resp, 22, 4); |
587 | csd->write_partial = UNSTUFF_BITS(resp, 21, 1); | 604 | csd->write_partial = UNSTUFF_BITS(resp, 21, 1); |
588 | } | 605 | } |
@@ -666,7 +683,7 @@ static void mmc_idle_cards(struct mmc_host *host) | |||
666 | struct mmc_command cmd; | 683 | struct mmc_command cmd; |
667 | 684 | ||
668 | host->ios.chip_select = MMC_CS_HIGH; | 685 | host->ios.chip_select = MMC_CS_HIGH; |
669 | host->ops->set_ios(host, &host->ios); | 686 | mmc_set_ios(host); |
670 | 687 | ||
671 | mmc_delay(1); | 688 | mmc_delay(1); |
672 | 689 | ||
@@ -679,7 +696,7 @@ static void mmc_idle_cards(struct mmc_host *host) | |||
679 | mmc_delay(1); | 696 | mmc_delay(1); |
680 | 697 | ||
681 | host->ios.chip_select = MMC_CS_DONTCARE; | 698 | host->ios.chip_select = MMC_CS_DONTCARE; |
682 | host->ops->set_ios(host, &host->ios); | 699 | mmc_set_ios(host); |
683 | 700 | ||
684 | mmc_delay(1); | 701 | mmc_delay(1); |
685 | } | 702 | } |
@@ -704,13 +721,13 @@ static void mmc_power_up(struct mmc_host *host) | |||
704 | host->ios.chip_select = MMC_CS_DONTCARE; | 721 | host->ios.chip_select = MMC_CS_DONTCARE; |
705 | host->ios.power_mode = MMC_POWER_UP; | 722 | host->ios.power_mode = MMC_POWER_UP; |
706 | host->ios.bus_width = MMC_BUS_WIDTH_1; | 723 | host->ios.bus_width = MMC_BUS_WIDTH_1; |
707 | host->ops->set_ios(host, &host->ios); | 724 | mmc_set_ios(host); |
708 | 725 | ||
709 | mmc_delay(1); | 726 | mmc_delay(1); |
710 | 727 | ||
711 | host->ios.clock = host->f_min; | 728 | host->ios.clock = host->f_min; |
712 | host->ios.power_mode = MMC_POWER_ON; | 729 | host->ios.power_mode = MMC_POWER_ON; |
713 | host->ops->set_ios(host, &host->ios); | 730 | mmc_set_ios(host); |
714 | 731 | ||
715 | mmc_delay(2); | 732 | mmc_delay(2); |
716 | } | 733 | } |
@@ -723,7 +740,7 @@ static void mmc_power_off(struct mmc_host *host) | |||
723 | host->ios.chip_select = MMC_CS_DONTCARE; | 740 | host->ios.chip_select = MMC_CS_DONTCARE; |
724 | host->ios.power_mode = MMC_POWER_OFF; | 741 | host->ios.power_mode = MMC_POWER_OFF; |
725 | host->ios.bus_width = MMC_BUS_WIDTH_1; | 742 | host->ios.bus_width = MMC_BUS_WIDTH_1; |
726 | host->ops->set_ios(host, &host->ios); | 743 | mmc_set_ios(host); |
727 | } | 744 | } |
728 | 745 | ||
729 | static int mmc_send_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr) | 746 | static int mmc_send_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr) |
@@ -971,7 +988,8 @@ static unsigned int mmc_calculate_clock(struct mmc_host *host) | |||
971 | if (!mmc_card_dead(card) && max_dtr > card->csd.max_dtr) | 988 | if (!mmc_card_dead(card) && max_dtr > card->csd.max_dtr) |
972 | max_dtr = card->csd.max_dtr; | 989 | max_dtr = card->csd.max_dtr; |
973 | 990 | ||
974 | pr_debug("MMC: selected %d.%03dMHz transfer rate\n", | 991 | pr_debug("%s: selected %d.%03dMHz transfer rate\n", |
992 | mmc_hostname(host), | ||
975 | max_dtr / 1000000, (max_dtr / 1000) % 1000); | 993 | max_dtr / 1000000, (max_dtr / 1000) % 1000); |
976 | 994 | ||
977 | return max_dtr; | 995 | return max_dtr; |
@@ -1046,7 +1064,7 @@ static void mmc_setup(struct mmc_host *host) | |||
1046 | } else { | 1064 | } else { |
1047 | host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN; | 1065 | host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN; |
1048 | host->ios.clock = host->f_min; | 1066 | host->ios.clock = host->f_min; |
1049 | host->ops->set_ios(host, &host->ios); | 1067 | mmc_set_ios(host); |
1050 | 1068 | ||
1051 | /* | 1069 | /* |
1052 | * We should remember the OCR mask from the existing | 1070 | * We should remember the OCR mask from the existing |
@@ -1082,7 +1100,7 @@ static void mmc_setup(struct mmc_host *host) | |||
1082 | * Ok, now switch to push-pull mode. | 1100 | * Ok, now switch to push-pull mode. |
1083 | */ | 1101 | */ |
1084 | host->ios.bus_mode = MMC_BUSMODE_PUSHPULL; | 1102 | host->ios.bus_mode = MMC_BUSMODE_PUSHPULL; |
1085 | host->ops->set_ios(host, &host->ios); | 1103 | mmc_set_ios(host); |
1086 | 1104 | ||
1087 | mmc_read_csds(host); | 1105 | mmc_read_csds(host); |
1088 | 1106 | ||
@@ -1128,7 +1146,7 @@ static void mmc_rescan(void *data) | |||
1128 | * attached cards and the host support. | 1146 | * attached cards and the host support. |
1129 | */ | 1147 | */ |
1130 | host->ios.clock = mmc_calculate_clock(host); | 1148 | host->ios.clock = mmc_calculate_clock(host); |
1131 | host->ops->set_ios(host, &host->ios); | 1149 | mmc_set_ios(host); |
1132 | } | 1150 | } |
1133 | 1151 | ||
1134 | mmc_release_host(host); | 1152 | mmc_release_host(host); |
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index 8eb2a2ede64b..06bd1f4cb9b1 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c | |||
@@ -187,6 +187,12 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
187 | brq.cmd.opcode = MMC_WRITE_BLOCK; | 187 | brq.cmd.opcode = MMC_WRITE_BLOCK; |
188 | brq.data.flags |= MMC_DATA_WRITE; | 188 | brq.data.flags |= MMC_DATA_WRITE; |
189 | brq.data.blocks = 1; | 189 | brq.data.blocks = 1; |
190 | |||
191 | /* | ||
192 | * Scale up the timeout by the r2w factor | ||
193 | */ | ||
194 | brq.data.timeout_ns <<= card->csd.r2w_factor; | ||
195 | brq.data.timeout_clks <<= card->csd.r2w_factor; | ||
190 | } | 196 | } |
191 | 197 | ||
192 | if (brq.data.blocks > 1) { | 198 | if (brq.data.blocks > 1) { |
diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c index df7e861e2fc7..da8e4d7339cc 100644 --- a/drivers/mmc/mmci.c +++ b/drivers/mmc/mmci.c | |||
@@ -402,9 +402,6 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
402 | struct mmci_host *host = mmc_priv(mmc); | 402 | struct mmci_host *host = mmc_priv(mmc); |
403 | u32 clk = 0, pwr = 0; | 403 | u32 clk = 0, pwr = 0; |
404 | 404 | ||
405 | DBG(host, "clock %uHz busmode %u powermode %u Vdd %u\n", | ||
406 | ios->clock, ios->bus_mode, ios->power_mode, ios->vdd); | ||
407 | |||
408 | if (ios->clock) { | 405 | if (ios->clock) { |
409 | if (ios->clock >= host->mclk) { | 406 | if (ios->clock >= host->mclk) { |
410 | clk = MCI_CLK_BYPASS; | 407 | clk = MCI_CLK_BYPASS; |
diff --git a/drivers/mmc/pxamci.c b/drivers/mmc/pxamci.c index eb42cb349420..f97b472085cb 100644 --- a/drivers/mmc/pxamci.c +++ b/drivers/mmc/pxamci.c | |||
@@ -198,7 +198,6 @@ static void pxamci_start_cmd(struct pxamci_host *host, struct mmc_command *cmd, | |||
198 | 198 | ||
199 | static void pxamci_finish_request(struct pxamci_host *host, struct mmc_request *mrq) | 199 | static void pxamci_finish_request(struct pxamci_host *host, struct mmc_request *mrq) |
200 | { | 200 | { |
201 | pr_debug("PXAMCI: request done\n"); | ||
202 | host->mrq = NULL; | 201 | host->mrq = NULL; |
203 | host->cmd = NULL; | 202 | host->cmd = NULL; |
204 | host->data = NULL; | 203 | host->data = NULL; |
@@ -291,7 +290,7 @@ static int pxamci_data_done(struct pxamci_host *host, unsigned int stat) | |||
291 | pxamci_disable_irq(host, DATA_TRAN_DONE); | 290 | pxamci_disable_irq(host, DATA_TRAN_DONE); |
292 | 291 | ||
293 | host->data = NULL; | 292 | host->data = NULL; |
294 | if (host->mrq->stop && data->error == MMC_ERR_NONE) { | 293 | if (host->mrq->stop) { |
295 | pxamci_stop_clock(host); | 294 | pxamci_stop_clock(host); |
296 | pxamci_start_cmd(host, host->mrq->stop, 0); | 295 | pxamci_start_cmd(host, host->mrq->stop, 0); |
297 | } else { | 296 | } else { |
@@ -309,12 +308,10 @@ static irqreturn_t pxamci_irq(int irq, void *devid, struct pt_regs *regs) | |||
309 | 308 | ||
310 | ireg = readl(host->base + MMC_I_REG); | 309 | ireg = readl(host->base + MMC_I_REG); |
311 | 310 | ||
312 | pr_debug("PXAMCI: irq %08x\n", ireg); | ||
313 | |||
314 | if (ireg) { | 311 | if (ireg) { |
315 | unsigned stat = readl(host->base + MMC_STAT); | 312 | unsigned stat = readl(host->base + MMC_STAT); |
316 | 313 | ||
317 | pr_debug("PXAMCI: stat %08x\n", stat); | 314 | pr_debug("PXAMCI: irq %08x stat %08x\n", ireg, stat); |
318 | 315 | ||
319 | if (ireg & END_CMD_RES) | 316 | if (ireg & END_CMD_RES) |
320 | handled |= pxamci_cmd_done(host, stat); | 317 | handled |= pxamci_cmd_done(host, stat); |
@@ -368,10 +365,6 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
368 | { | 365 | { |
369 | struct pxamci_host *host = mmc_priv(mmc); | 366 | struct pxamci_host *host = mmc_priv(mmc); |
370 | 367 | ||
371 | pr_debug("pxamci_set_ios: clock %u power %u vdd %u.%02u\n", | ||
372 | ios->clock, ios->power_mode, ios->vdd / 100, | ||
373 | ios->vdd % 100); | ||
374 | |||
375 | if (ios->clock) { | 368 | if (ios->clock) { |
376 | unsigned int clk = CLOCKRATE / ios->clock; | 369 | unsigned int clk = CLOCKRATE / ios->clock; |
377 | if (CLOCKRATE / clk > ios->clock) | 370 | if (CLOCKRATE / clk > ios->clock) |
@@ -397,7 +390,7 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
397 | host->cmdat |= CMDAT_INIT; | 390 | host->cmdat |= CMDAT_INIT; |
398 | } | 391 | } |
399 | 392 | ||
400 | pr_debug("pxamci_set_ios: clkrt = %x cmdat = %x\n", | 393 | pr_debug("PXAMCI: clkrt = %x cmdat = %x\n", |
401 | host->clkrt, host->cmdat); | 394 | host->clkrt, host->cmdat); |
402 | } | 395 | } |
403 | 396 | ||
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index bdbfca050029..b0053280ff2d 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c | |||
@@ -570,10 +570,6 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
570 | 570 | ||
571 | spin_lock_irqsave(&host->lock, flags); | 571 | spin_lock_irqsave(&host->lock, flags); |
572 | 572 | ||
573 | DBG("clock %uHz busmode %u powermode %u cs %u Vdd %u width %u\n", | ||
574 | ios->clock, ios->bus_mode, ios->power_mode, ios->chip_select, | ||
575 | ios->vdd, ios->bus_width); | ||
576 | |||
577 | /* | 573 | /* |
578 | * Reset the chip on each power off. | 574 | * Reset the chip on each power off. |
579 | * Should clear out any weird states. | 575 | * Should clear out any weird states. |
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index 511f7b0b31d2..39b3d97f891e 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c | |||
@@ -931,10 +931,6 @@ static void wbsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
931 | struct wbsd_host *host = mmc_priv(mmc); | 931 | struct wbsd_host *host = mmc_priv(mmc); |
932 | u8 clk, setup, pwr; | 932 | u8 clk, setup, pwr; |
933 | 933 | ||
934 | DBGF("clock %uHz busmode %u powermode %u cs %u Vdd %u width %u\n", | ||
935 | ios->clock, ios->bus_mode, ios->power_mode, ios->chip_select, | ||
936 | ios->vdd, ios->bus_width); | ||
937 | |||
938 | spin_lock_bh(&host->lock); | 934 | spin_lock_bh(&host->lock); |
939 | 935 | ||
940 | /* | 936 | /* |