diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/card/block.c | 8 | ||||
-rw-r--r-- | drivers/mmc/core/core.c | 4 | ||||
-rw-r--r-- | drivers/mmc/host/Kconfig | 2 | ||||
-rw-r--r-- | drivers/mmc/host/mmci.c | 4 | ||||
-rw-r--r-- | drivers/mmc/host/mvsdio.c | 11 | ||||
-rw-r--r-- | drivers/mmc/host/omap.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 6 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-pci.c | 8 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.h | 2 |
9 files changed, 27 insertions, 20 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index fe8041e619ea..b25e9b6516ae 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -254,6 +254,14 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
254 | brq.data.blocks = req->nr_sectors; | 254 | brq.data.blocks = req->nr_sectors; |
255 | 255 | ||
256 | /* | 256 | /* |
257 | * The block layer doesn't support all sector count | ||
258 | * restrictions, so we need to be prepared for too big | ||
259 | * requests. | ||
260 | */ | ||
261 | if (brq.data.blocks > card->host->max_blk_count) | ||
262 | brq.data.blocks = card->host->max_blk_count; | ||
263 | |||
264 | /* | ||
257 | * After a read error, we redo the request one sector at a time | 265 | * After a read error, we redo the request one sector at a time |
258 | * in order to accurately determine which sectors can be read | 266 | * in order to accurately determine which sectors can be read |
259 | * successfully. | 267 | * successfully. |
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index fa073ab3fa34..264911732756 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -706,7 +706,7 @@ static void mmc_power_up(struct mmc_host *host) | |||
706 | * This delay should be sufficient to allow the power supply | 706 | * This delay should be sufficient to allow the power supply |
707 | * to reach the minimum voltage. | 707 | * to reach the minimum voltage. |
708 | */ | 708 | */ |
709 | mmc_delay(2); | 709 | mmc_delay(10); |
710 | 710 | ||
711 | host->ios.clock = host->f_min; | 711 | host->ios.clock = host->f_min; |
712 | host->ios.power_mode = MMC_POWER_ON; | 712 | host->ios.power_mode = MMC_POWER_ON; |
@@ -716,7 +716,7 @@ static void mmc_power_up(struct mmc_host *host) | |||
716 | * This delay must be at least 74 clock sizes, or 1 ms, or the | 716 | * This delay must be at least 74 clock sizes, or 1 ms, or the |
717 | * time required to reach a stable voltage. | 717 | * time required to reach a stable voltage. |
718 | */ | 718 | */ |
719 | mmc_delay(2); | 719 | mmc_delay(10); |
720 | } | 720 | } |
721 | 721 | ||
722 | static void mmc_power_off(struct mmc_host *host) | 722 | static void mmc_power_off(struct mmc_host *host) |
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index b4cf691f3f64..3eb87bda14f3 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig | |||
@@ -155,7 +155,7 @@ config MMC_ATMELMCI_DMA | |||
155 | 155 | ||
156 | config MMC_IMX | 156 | config MMC_IMX |
157 | tristate "Motorola i.MX Multimedia Card Interface support" | 157 | tristate "Motorola i.MX Multimedia Card Interface support" |
158 | depends on ARCH_IMX | 158 | depends on ARCH_MX1 |
159 | help | 159 | help |
160 | This selects the Motorola i.MX Multimedia card Interface. | 160 | This selects the Motorola i.MX Multimedia card Interface. |
161 | If you have a i.MX platform with a Multimedia Card slot, | 161 | If you have a i.MX platform with a Multimedia Card slot, |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index a663429b3d55..7d4febdab286 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -490,7 +490,7 @@ static void mmci_check_status(unsigned long data) | |||
490 | mod_timer(&host->timer, jiffies + HZ); | 490 | mod_timer(&host->timer, jiffies + HZ); |
491 | } | 491 | } |
492 | 492 | ||
493 | static int __devinit mmci_probe(struct amba_device *dev, void *id) | 493 | static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id) |
494 | { | 494 | { |
495 | struct mmc_platform_data *plat = dev->dev.platform_data; | 495 | struct mmc_platform_data *plat = dev->dev.platform_data; |
496 | struct mmci_host *host; | 496 | struct mmci_host *host; |
@@ -514,6 +514,7 @@ static int __devinit mmci_probe(struct amba_device *dev, void *id) | |||
514 | } | 514 | } |
515 | 515 | ||
516 | host = mmc_priv(mmc); | 516 | host = mmc_priv(mmc); |
517 | host->mmc = mmc; | ||
517 | /* Bits 12 thru 19 is the designer */ | 518 | /* Bits 12 thru 19 is the designer */ |
518 | host->hw_designer = (dev->periphid >> 12) & 0xff; | 519 | host->hw_designer = (dev->periphid >> 12) & 0xff; |
519 | /* Bits 20 thru 23 is the revison */ | 520 | /* Bits 20 thru 23 is the revison */ |
@@ -545,7 +546,6 @@ static int __devinit mmci_probe(struct amba_device *dev, void *id) | |||
545 | host->mclk = clk_get_rate(host->clk); | 546 | host->mclk = clk_get_rate(host->clk); |
546 | DBG(host, "eventual mclk rate: %u Hz\n", host->mclk); | 547 | DBG(host, "eventual mclk rate: %u Hz\n", host->mclk); |
547 | } | 548 | } |
548 | host->mmc = mmc; | ||
549 | host->base = ioremap(dev->res.start, SZ_4K); | 549 | host->base = ioremap(dev->res.start, SZ_4K); |
550 | if (!host->base) { | 550 | if (!host->base) { |
551 | ret = -ENOMEM; | 551 | ret = -ENOMEM; |
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index b5c375d94ab3..c643d0fe118f 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c | |||
@@ -825,24 +825,23 @@ static int __exit mvsd_remove(struct platform_device *pdev) | |||
825 | } | 825 | } |
826 | 826 | ||
827 | #ifdef CONFIG_PM | 827 | #ifdef CONFIG_PM |
828 | static int mvsd_suspend(struct platform_device *dev, pm_message_t state, | 828 | static int mvsd_suspend(struct platform_device *dev, pm_message_t state) |
829 | u32 level) | ||
830 | { | 829 | { |
831 | struct mmc_host *mmc = platform_get_drvdata(dev); | 830 | struct mmc_host *mmc = platform_get_drvdata(dev); |
832 | int ret = 0; | 831 | int ret = 0; |
833 | 832 | ||
834 | if (mmc && level == SUSPEND_DISABLE) | 833 | if (mmc) |
835 | ret = mmc_suspend_host(mmc, state); | 834 | ret = mmc_suspend_host(mmc, state); |
836 | 835 | ||
837 | return ret; | 836 | return ret; |
838 | } | 837 | } |
839 | 838 | ||
840 | static int mvsd_resume(struct platform_device *dev, u32 level) | 839 | static int mvsd_resume(struct platform_device *dev) |
841 | { | 840 | { |
842 | struct mmc_host *mmc = platform_dev_get_drvdata(dev); | 841 | struct mmc_host *mmc = platform_get_drvdata(dev); |
843 | int ret = 0; | 842 | int ret = 0; |
844 | 843 | ||
845 | if (mmc && level == RESUME_ENABLE) | 844 | if (mmc) |
846 | ret = mmc_resume_host(mmc); | 845 | ret = mmc_resume_host(mmc); |
847 | 846 | ||
848 | return ret; | 847 | return ret; |
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 5570849188cc..bfa25c01c872 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c | |||
@@ -157,8 +157,6 @@ struct mmc_omap_host { | |||
157 | struct timer_list dma_timer; | 157 | struct timer_list dma_timer; |
158 | unsigned dma_len; | 158 | unsigned dma_len; |
159 | 159 | ||
160 | short power_pin; | ||
161 | |||
162 | struct mmc_omap_slot *slots[OMAP_MMC_MAX_SLOTS]; | 160 | struct mmc_omap_slot *slots[OMAP_MMC_MAX_SLOTS]; |
163 | struct mmc_omap_slot *current_slot; | 161 | struct mmc_omap_slot *current_slot; |
164 | spinlock_t slot_lock; | 162 | spinlock_t slot_lock; |
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index e62a22a7f00c..2f19c635bc6e 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -1073,7 +1073,6 @@ static int __init omap_mmc_probe(struct platform_device *pdev) | |||
1073 | mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; | 1073 | mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; |
1074 | mmc->max_seg_size = mmc->max_req_size; | 1074 | mmc->max_seg_size = mmc->max_req_size; |
1075 | 1075 | ||
1076 | mmc->ocr_avail = mmc_slot(host).ocr_mask; | ||
1077 | mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED; | 1076 | mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED; |
1078 | 1077 | ||
1079 | if (pdata->slots[host->slot_id].wires >= 8) | 1078 | if (pdata->slots[host->slot_id].wires >= 8) |
@@ -1110,13 +1109,14 @@ static int __init omap_mmc_probe(struct platform_device *pdev) | |||
1110 | goto err_irq; | 1109 | goto err_irq; |
1111 | } | 1110 | } |
1112 | 1111 | ||
1112 | /* initialize power supplies, gpios, etc */ | ||
1113 | if (pdata->init != NULL) { | 1113 | if (pdata->init != NULL) { |
1114 | if (pdata->init(&pdev->dev) != 0) { | 1114 | if (pdata->init(&pdev->dev) != 0) { |
1115 | dev_dbg(mmc_dev(host->mmc), | 1115 | dev_dbg(mmc_dev(host->mmc), "late init error\n"); |
1116 | "Unable to configure MMC IRQs\n"); | ||
1117 | goto err_irq_cd_init; | 1116 | goto err_irq_cd_init; |
1118 | } | 1117 | } |
1119 | } | 1118 | } |
1119 | mmc->ocr_avail = mmc_slot(host).ocr_mask; | ||
1120 | 1120 | ||
1121 | /* Request IRQ for card detect */ | 1121 | /* Request IRQ for card detect */ |
1122 | if ((mmc_slot(host).card_detect_irq)) { | 1122 | if ((mmc_slot(host).card_detect_irq)) { |
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index cd37962ec44f..65be27995d5c 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c | |||
@@ -522,8 +522,8 @@ static struct sdhci_pci_slot * __devinit sdhci_pci_probe_slot( | |||
522 | 522 | ||
523 | host = sdhci_alloc_host(&pdev->dev, sizeof(struct sdhci_pci_slot)); | 523 | host = sdhci_alloc_host(&pdev->dev, sizeof(struct sdhci_pci_slot)); |
524 | if (IS_ERR(host)) { | 524 | if (IS_ERR(host)) { |
525 | ret = PTR_ERR(host); | 525 | dev_err(&pdev->dev, "cannot allocate host\n"); |
526 | goto unmap; | 526 | return ERR_PTR(PTR_ERR(host)); |
527 | } | 527 | } |
528 | 528 | ||
529 | slot = sdhci_priv(host); | 529 | slot = sdhci_priv(host); |
@@ -541,7 +541,7 @@ static struct sdhci_pci_slot * __devinit sdhci_pci_probe_slot( | |||
541 | ret = pci_request_region(pdev, bar, mmc_hostname(host->mmc)); | 541 | ret = pci_request_region(pdev, bar, mmc_hostname(host->mmc)); |
542 | if (ret) { | 542 | if (ret) { |
543 | dev_err(&pdev->dev, "cannot request region\n"); | 543 | dev_err(&pdev->dev, "cannot request region\n"); |
544 | return ERR_PTR(ret); | 544 | goto free; |
545 | } | 545 | } |
546 | 546 | ||
547 | addr = pci_resource_start(pdev, bar); | 547 | addr = pci_resource_start(pdev, bar); |
@@ -572,6 +572,8 @@ unmap: | |||
572 | 572 | ||
573 | release: | 573 | release: |
574 | pci_release_region(pdev, bar); | 574 | pci_release_region(pdev, bar); |
575 | |||
576 | free: | ||
575 | sdhci_free_host(host); | 577 | sdhci_free_host(host); |
576 | 578 | ||
577 | return ERR_PTR(ret); | 579 | return ERR_PTR(ret); |
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index f20a834f4309..65c6f996bbd3 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h | |||
@@ -125,7 +125,7 @@ | |||
125 | #define SDHCI_INT_DATA_MASK (SDHCI_INT_DATA_END | SDHCI_INT_DMA_END | \ | 125 | #define SDHCI_INT_DATA_MASK (SDHCI_INT_DATA_END | SDHCI_INT_DMA_END | \ |
126 | SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | \ | 126 | SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | \ |
127 | SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_DATA_CRC | \ | 127 | SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_DATA_CRC | \ |
128 | SDHCI_INT_DATA_END_BIT) | 128 | SDHCI_INT_DATA_END_BIT | SDHCI_ADMA_ERROR) |
129 | #define SDHCI_INT_ALL_MASK ((unsigned int)-1) | 129 | #define SDHCI_INT_ALL_MASK ((unsigned int)-1) |
130 | 130 | ||
131 | #define SDHCI_ACMD12_ERR 0x3C | 131 | #define SDHCI_ACMD12_ERR 0x3C |