diff options
Diffstat (limited to 'drivers/mmc/host/omap_hsmmc.c')
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 21e4a799df48..e8ff12396680 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -450,15 +450,14 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) | |||
450 | * framework is fixed, we need a workaround like this | 450 | * framework is fixed, we need a workaround like this |
451 | * (which is safe for MMC, but not in general). | 451 | * (which is safe for MMC, but not in general). |
452 | */ | 452 | */ |
453 | if (regulator_is_enabled(host->vcc) > 0) { | 453 | if (regulator_is_enabled(host->vcc) > 0 || |
454 | regulator_enable(host->vcc); | 454 | (host->vcc_aux && regulator_is_enabled(host->vcc_aux))) { |
455 | regulator_disable(host->vcc); | 455 | int vdd = ffs(mmc_slot(host).ocr_mask) - 1; |
456 | } | 456 | |
457 | if (host->vcc_aux) { | 457 | mmc_slot(host).set_power(host->dev, host->slot_id, |
458 | if (regulator_is_enabled(reg) > 0) { | 458 | 1, vdd); |
459 | regulator_enable(reg); | 459 | mmc_slot(host).set_power(host->dev, host->slot_id, |
460 | regulator_disable(reg); | 460 | 0, 0); |
461 | } | ||
462 | } | 461 | } |
463 | } | 462 | } |
464 | 463 | ||
@@ -1264,14 +1263,14 @@ static void omap_hsmmc_protect_card(struct omap_hsmmc_host *host) | |||
1264 | host->reqs_blocked = 0; | 1263 | host->reqs_blocked = 0; |
1265 | if (mmc_slot(host).get_cover_state(host->dev, host->slot_id)) { | 1264 | if (mmc_slot(host).get_cover_state(host->dev, host->slot_id)) { |
1266 | if (host->protect_card) { | 1265 | if (host->protect_card) { |
1267 | printk(KERN_INFO "%s: cover is closed, " | 1266 | pr_info("%s: cover is closed, " |
1268 | "card is now accessible\n", | 1267 | "card is now accessible\n", |
1269 | mmc_hostname(host->mmc)); | 1268 | mmc_hostname(host->mmc)); |
1270 | host->protect_card = 0; | 1269 | host->protect_card = 0; |
1271 | } | 1270 | } |
1272 | } else { | 1271 | } else { |
1273 | if (!host->protect_card) { | 1272 | if (!host->protect_card) { |
1274 | printk(KERN_INFO "%s: cover is open, " | 1273 | pr_info"%s: cover is open, " |
1275 | "card is now inaccessible\n", | 1274 | "card is now inaccessible\n", |
1276 | mmc_hostname(host->mmc)); | 1275 | mmc_hostname(host->mmc)); |
1277 | host->protect_card = 1; | 1276 | host->protect_card = 1; |
@@ -1422,7 +1421,7 @@ static int omap_hsmmc_pre_dma_transfer(struct omap_hsmmc_host *host, | |||
1422 | 1421 | ||
1423 | if (!next && data->host_cookie && | 1422 | if (!next && data->host_cookie && |
1424 | data->host_cookie != host->next_data.cookie) { | 1423 | data->host_cookie != host->next_data.cookie) { |
1425 | printk(KERN_WARNING "[%s] invalid cookie: data->host_cookie %d" | 1424 | pr_warning("[%s] invalid cookie: data->host_cookie %d" |
1426 | " host->next_data.cookie %d\n", | 1425 | " host->next_data.cookie %d\n", |
1427 | __func__, data->host_cookie, host->next_data.cookie); | 1426 | __func__, data->host_cookie, host->next_data.cookie); |
1428 | data->host_cookie = 0; | 1427 | data->host_cookie = 0; |
@@ -1943,6 +1942,10 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) | |||
1943 | omap_hsmmc_context_save(host); | 1942 | omap_hsmmc_context_save(host); |
1944 | 1943 | ||
1945 | mmc->caps |= MMC_CAP_DISABLE; | 1944 | mmc->caps |= MMC_CAP_DISABLE; |
1945 | if (host->pdata->controller_flags & OMAP_HSMMC_BROKEN_MULTIBLOCK_READ) { | ||
1946 | dev_info(&pdev->dev, "multiblock reads disabled due to 35xx erratum 2.1.1.128; MMC read performance may suffer\n"); | ||
1947 | mmc->caps2 |= MMC_CAP2_NO_MULTI_READ; | ||
1948 | } | ||
1946 | 1949 | ||
1947 | pm_runtime_enable(host->dev); | 1950 | pm_runtime_enable(host->dev); |
1948 | pm_runtime_get_sync(host->dev); | 1951 | pm_runtime_get_sync(host->dev); |
@@ -2015,7 +2018,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) | |||
2015 | } | 2018 | } |
2016 | 2019 | ||
2017 | /* Request IRQ for MMC operations */ | 2020 | /* Request IRQ for MMC operations */ |
2018 | ret = request_irq(host->irq, omap_hsmmc_irq, IRQF_DISABLED, | 2021 | ret = request_irq(host->irq, omap_hsmmc_irq, 0, |
2019 | mmc_hostname(mmc), host); | 2022 | mmc_hostname(mmc), host); |
2020 | if (ret) { | 2023 | if (ret) { |
2021 | dev_dbg(mmc_dev(host->mmc), "Unable to grab HSMMC IRQ\n"); | 2024 | dev_dbg(mmc_dev(host->mmc), "Unable to grab HSMMC IRQ\n"); |
@@ -2043,8 +2046,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) | |||
2043 | if ((mmc_slot(host).card_detect_irq)) { | 2046 | if ((mmc_slot(host).card_detect_irq)) { |
2044 | ret = request_irq(mmc_slot(host).card_detect_irq, | 2047 | ret = request_irq(mmc_slot(host).card_detect_irq, |
2045 | omap_hsmmc_cd_handler, | 2048 | omap_hsmmc_cd_handler, |
2046 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | 2049 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
2047 | | IRQF_DISABLED, | ||
2048 | mmc_hostname(mmc), host); | 2050 | mmc_hostname(mmc), host); |
2049 | if (ret) { | 2051 | if (ret) { |
2050 | dev_dbg(mmc_dev(host->mmc), | 2052 | dev_dbg(mmc_dev(host->mmc), |