aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-05-14 09:23:13 -0400
committerArnd Bergmann <arnd@arndb.de>2012-05-14 09:23:13 -0400
commit6b204283f2802a92cf91fc14c2c1b04e7295761b (patch)
treee323818ac7f159c13f646fdf75bf0f016d7ae368 /drivers/mmc
parentffc505c0b99d6caf5b10d813f9a0ce3576f68996 (diff)
parenta0f5e3631b07cabf624e7d818df76d47d9d21017 (diff)
Merge branch 'imx/pinctrl' into imx/dt
Conflicts: drivers/mmc/host/sdhci-esdhc-imx.c drivers/net/ethernet/freescale/fec.c drivers/spi/spi-imx.c drivers/tty/serial/imx.c This resolves some simply but annoying conflicts. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
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 ce83d6191f4a..6b0e3f33ede3 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 struct clk *clk_ipg; 74 struct clk *clk_ipg;
73 struct clk *clk_ahb; 75 struct clk *clk_ahb;
@@ -484,6 +486,12 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
484 clk_prepare_enable(imx_data->clk_ipg); 486 clk_prepare_enable(imx_data->clk_ipg);
485 clk_prepare_enable(imx_data->clk_ahb); 487 clk_prepare_enable(imx_data->clk_ahb);
486 488
489 imx_data->pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
490 if (IS_ERR(imx_data->pinctrl)) {
491 err = PTR_ERR(imx_data->pinctrl);
492 goto pin_err;
493 }
494
487 host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; 495 host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
488 496
489 if (is_imx25_esdhc(imx_data) || is_imx35_esdhc(imx_data)) 497 if (is_imx25_esdhc(imx_data) || is_imx35_esdhc(imx_data))
@@ -575,6 +583,7 @@ no_card_detect_irq:
575 gpio_free(boarddata->wp_gpio); 583 gpio_free(boarddata->wp_gpio);
576no_card_detect_pin: 584no_card_detect_pin:
577no_board_data: 585no_board_data:
586pin_err:
578 clk_disable_unprepare(imx_data->clk_per); 587 clk_disable_unprepare(imx_data->clk_per);
579 clk_disable_unprepare(imx_data->clk_ipg); 588 clk_disable_unprepare(imx_data->clk_ipg);
580 clk_disable_unprepare(imx_data->clk_ahb); 589 clk_disable_unprepare(imx_data->clk_ahb);