aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-05-12 01:59:11 -0400
committerOlof Johansson <olof@lixom.net>2012-05-12 01:59:11 -0400
commit4a0dfe69fe489b06ae5bad26ae67ae8aefaca3aa (patch)
treecdac4232b95103402e8328815be80105620d41f2 /drivers/mmc
parent7488185d0777ef84be7b365b08037fc7213010f6 (diff)
parenta0f5e3631b07cabf624e7d818df76d47d9d21017 (diff)
Merge branch 'imx/pinctrl/for-3.5' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/pinctrl
* 'imx/pinctrl/for-3.5' of git://git.linaro.org/people/shawnguo/linux-2.6: (290 commits) ARM: mxs: enable pinctrl support video: mxsfb: adopt pinctrl support ASoC: mxs-saif: adopt pinctrl support i2c: mxs: adopt pinctrl support mtd: nand: gpmi: adopt pinctrl support mmc: mxs-mmc: adopt pinctrl support serial: mxs-auart: adopt pinctrl support serial: amba-pl011: adopt pinctrl support spi/imx: adopt pinctrl support i2c: imx: adopt pinctrl support can: flexcan: adopt pinctrl support net: fec: adopt pinctrl support tty: serial: imx: adopt pinctrl support mmc: sdhci-imx-esdhc: adopt pinctrl support ARM: imx6q: switch to use pinctrl subsystem ARM: mxs: enable pinctrl dummy states ARM: imx: enable pinctrl dummy states +3.4-rc5 update
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mxs-mmc.c11
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c9
2 files changed, 20 insertions, 0 deletions
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index b0f2ef988188..bb03ddda481d 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -39,6 +39,7 @@
39#include <linux/regulator/consumer.h> 39#include <linux/regulator/consumer.h>
40#include <linux/module.h> 40#include <linux/module.h>
41#include <linux/fsl/mxs-dma.h> 41#include <linux/fsl/mxs-dma.h>
42#include <linux/pinctrl/consumer.h>
42 43
43#include <mach/mxs.h> 44#include <mach/mxs.h>
44#include <mach/common.h> 45#include <mach/common.h>
@@ -363,6 +364,7 @@ static void mxs_mmc_bc(struct mxs_mmc_host *host)
363 goto out; 364 goto out;
364 365
365 dmaengine_submit(desc); 366 dmaengine_submit(desc);
367 dma_async_issue_pending(host->dmach);
366 return; 368 return;
367 369
368out: 370out:
@@ -403,6 +405,7 @@ static void mxs_mmc_ac(struct mxs_mmc_host *host)
403 goto out; 405 goto out;
404 406
405 dmaengine_submit(desc); 407 dmaengine_submit(desc);
408 dma_async_issue_pending(host->dmach);
406 return; 409 return;
407 410
408out: 411out:
@@ -531,6 +534,7 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)
531 goto out; 534 goto out;
532 535
533 dmaengine_submit(desc); 536 dmaengine_submit(desc);
537 dma_async_issue_pending(host->dmach);
534 return; 538 return;
535out: 539out:
536 dev_warn(mmc_dev(host->mmc), 540 dev_warn(mmc_dev(host->mmc),
@@ -679,6 +683,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
679 struct mmc_host *mmc; 683 struct mmc_host *mmc;
680 struct resource *iores, *dmares, *r; 684 struct resource *iores, *dmares, *r;
681 struct mxs_mmc_platform_data *pdata; 685 struct mxs_mmc_platform_data *pdata;
686 struct pinctrl *pinctrl;
682 int ret = 0, irq_err, irq_dma; 687 int ret = 0, irq_err, irq_dma;
683 dma_cap_mask_t mask; 688 dma_cap_mask_t mask;
684 689
@@ -716,6 +721,12 @@ static int mxs_mmc_probe(struct platform_device *pdev)
716 host->irq = irq_err; 721 host->irq = irq_err;
717 host->sdio_irq_en = 0; 722 host->sdio_irq_en = 0;
718 723
724 pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
725 if (IS_ERR(pinctrl)) {
726 ret = PTR_ERR(pinctrl);
727 goto out_iounmap;
728 }
729
719 host->clk = clk_get(&pdev->dev, NULL); 730 host->clk = clk_get(&pdev->dev, NULL);
720 if (IS_ERR(host->clk)) { 731 if (IS_ERR(host->clk)) {
721 ret = PTR_ERR(host->clk); 732 ret = PTR_ERR(host->clk);
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 8abdaf6697a8..d190d04636a7 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -24,6 +24,7 @@
24#include <linux/of.h> 24#include <linux/of.h>
25#include <linux/of_device.h> 25#include <linux/of_device.h>
26#include <linux/of_gpio.h> 26#include <linux/of_gpio.h>
27#include <linux/pinctrl/consumer.h>
27#include <mach/esdhc.h> 28#include <mach/esdhc.h>
28#include "sdhci-pltfm.h" 29#include "sdhci-pltfm.h"
29#include "sdhci-esdhc.h" 30#include "sdhci-esdhc.h"
@@ -68,6 +69,7 @@ struct pltfm_imx_data {
68 int flags; 69 int flags;
69 u32 scratchpad; 70 u32 scratchpad;
70 enum imx_esdhc_type devtype; 71 enum imx_esdhc_type devtype;
72 struct pinctrl *pinctrl;
71 struct esdhc_platform_data boarddata; 73 struct esdhc_platform_data boarddata;
72}; 74};
73 75
@@ -467,6 +469,12 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
467 clk_prepare_enable(clk); 469 clk_prepare_enable(clk);
468 pltfm_host->clk = clk; 470 pltfm_host->clk = clk;
469 471
472 imx_data->pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
473 if (IS_ERR(imx_data->pinctrl)) {
474 err = PTR_ERR(imx_data->pinctrl);
475 goto pin_err;
476 }
477
470 host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; 478 host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
471 479
472 if (is_imx25_esdhc(imx_data) || is_imx35_esdhc(imx_data)) 480 if (is_imx25_esdhc(imx_data) || is_imx35_esdhc(imx_data))
@@ -558,6 +566,7 @@ no_card_detect_irq:
558 gpio_free(boarddata->wp_gpio); 566 gpio_free(boarddata->wp_gpio);
559no_card_detect_pin: 567no_card_detect_pin:
560no_board_data: 568no_board_data:
569pin_err:
561 clk_disable_unprepare(pltfm_host->clk); 570 clk_disable_unprepare(pltfm_host->clk);
562 clk_put(pltfm_host->clk); 571 clk_put(pltfm_host->clk);
563err_clk_get: 572err_clk_get: