diff options
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 6779b4ecab18..fc96f8cb9c0b 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -773,8 +773,14 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) | |||
773 | } | 773 | } |
774 | 774 | ||
775 | if (!(host->flags & SDHCI_REQ_USE_DMA)) { | 775 | if (!(host->flags & SDHCI_REQ_USE_DMA)) { |
776 | sg_miter_start(&host->sg_miter, | 776 | int flags; |
777 | data->sg, data->sg_len, SG_MITER_ATOMIC); | 777 | |
778 | flags = SG_MITER_ATOMIC; | ||
779 | if (host->data->flags & MMC_DATA_READ) | ||
780 | flags |= SG_MITER_TO_SG; | ||
781 | else | ||
782 | flags |= SG_MITER_FROM_SG; | ||
783 | sg_miter_start(&host->sg_miter, data->sg, data->sg_len, flags); | ||
778 | host->blocks = data->blocks; | 784 | host->blocks = data->blocks; |
779 | } | 785 | } |
780 | 786 | ||
@@ -1766,7 +1772,10 @@ int sdhci_add_host(struct sdhci_host *host) | |||
1766 | * Set host parameters. | 1772 | * Set host parameters. |
1767 | */ | 1773 | */ |
1768 | mmc->ops = &sdhci_ops; | 1774 | mmc->ops = &sdhci_ops; |
1769 | mmc->f_min = host->max_clk / 256; | 1775 | if (host->ops->get_min_clock) |
1776 | mmc->f_min = host->ops->get_min_clock(host); | ||
1777 | else | ||
1778 | mmc->f_min = host->max_clk / 256; | ||
1770 | mmc->f_max = host->max_clk; | 1779 | mmc->f_max = host->max_clk; |
1771 | mmc->caps = MMC_CAP_SDIO_IRQ; | 1780 | mmc->caps = MMC_CAP_SDIO_IRQ; |
1772 | 1781 | ||