diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-07 14:06:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-07 14:06:17 -0400 |
commit | 38f56f33ca381751f9b8910f67e7a805ec0b68cb (patch) | |
tree | 202f2ce60f3f43a948607ec76c8cc48c1cf73a4b /drivers/mmc/host | |
parent | fcba914542082b272f31c8e4c40000b88ed3208d (diff) | |
parent | 4183bef2e093a2f0aab45f2d5fed82b0e02aeacf (diff) |
Merge tag 'dt-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC device tree updates (part 2) from Arnd Bergmann:
"These are mostly new device tree bindings for existing drivers, as
well as changes to the device tree source files to add support for
those devices, and a couple of new boards, most notably Samsung's
Exynos5 based Chromebook.
The changes depend on earlier platform specific updates and touch the
usual platforms: omap, exynos, tegra, mxs, mvebu and davinci."
* tag 'dt-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (169 commits)
ARM: exynos: dts: cros5250: add EC device
ARM: dts: Add sbs-battery for exynos5250-snow
ARM: dts: Add i2c-arbitrator bus for exynos5250-snow
ARM: dts: add mshc controller node for Exynos4x12 SoCs
ARM: dts: Add chip-id controller node on Exynos4/5 SoC
ARM: EXYNOS: Create virtual I/O mapping for Chip-ID controller using device tree
ARM: davinci: da850-evm: add SPI flash support
ARM: davinci: da850: override SPI DT node device name
ARM: davinci: da850: add SPI1 DT node
spi/davinci: add DT binding documentation
spi/davinci: no wildcards in DT compatible property
ARM: dts: mvebu: Convert mvebu device tree files to 64 bits
ARM: dts: mvebu: introduce internal-regs node
ARM: dts: mvebu: Convert all the mvebu files to use the range property
ARM: dts: mvebu: move all peripherals inside soc
ARM: dts: mvebu: fix cpus section indentation
ARM: davinci: da850: add EHRPWM & ECAP DT node
ARM/dts: OMAP3: fix pinctrl-single configuration
ARM: dts: Add OMAP3430 SDP NOR flash memory binding
ARM: dts: Add NOR flash bindings for OMAP2420 H4
...
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/mxs-mmc.c | 48 |
1 files changed, 5 insertions, 43 deletions
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 146a53bfab71..4278a1787d08 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c | |||
@@ -552,22 +552,6 @@ static const struct mmc_host_ops mxs_mmc_ops = { | |||
552 | .enable_sdio_irq = mxs_mmc_enable_sdio_irq, | 552 | .enable_sdio_irq = mxs_mmc_enable_sdio_irq, |
553 | }; | 553 | }; |
554 | 554 | ||
555 | static bool mxs_mmc_dma_filter(struct dma_chan *chan, void *param) | ||
556 | { | ||
557 | struct mxs_mmc_host *host = param; | ||
558 | struct mxs_ssp *ssp = &host->ssp; | ||
559 | |||
560 | if (!mxs_dma_is_apbh(chan)) | ||
561 | return false; | ||
562 | |||
563 | if (chan->chan_id != ssp->dma_channel) | ||
564 | return false; | ||
565 | |||
566 | chan->private = &ssp->dma_data; | ||
567 | |||
568 | return true; | ||
569 | } | ||
570 | |||
571 | static struct platform_device_id mxs_ssp_ids[] = { | 555 | static struct platform_device_id mxs_ssp_ids[] = { |
572 | { | 556 | { |
573 | .name = "imx23-mmc", | 557 | .name = "imx23-mmc", |
@@ -595,20 +579,17 @@ static int mxs_mmc_probe(struct platform_device *pdev) | |||
595 | struct device_node *np = pdev->dev.of_node; | 579 | struct device_node *np = pdev->dev.of_node; |
596 | struct mxs_mmc_host *host; | 580 | struct mxs_mmc_host *host; |
597 | struct mmc_host *mmc; | 581 | struct mmc_host *mmc; |
598 | struct resource *iores, *dmares; | 582 | struct resource *iores; |
599 | struct pinctrl *pinctrl; | 583 | struct pinctrl *pinctrl; |
600 | int ret = 0, irq_err, irq_dma; | 584 | int ret = 0, irq_err; |
601 | dma_cap_mask_t mask; | ||
602 | struct regulator *reg_vmmc; | 585 | struct regulator *reg_vmmc; |
603 | enum of_gpio_flags flags; | 586 | enum of_gpio_flags flags; |
604 | struct mxs_ssp *ssp; | 587 | struct mxs_ssp *ssp; |
605 | u32 bus_width = 0; | 588 | u32 bus_width = 0; |
606 | 589 | ||
607 | iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 590 | iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
608 | dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0); | ||
609 | irq_err = platform_get_irq(pdev, 0); | 591 | irq_err = platform_get_irq(pdev, 0); |
610 | irq_dma = platform_get_irq(pdev, 1); | 592 | if (!iores || irq_err < 0) |
611 | if (!iores || irq_err < 0 || irq_dma < 0) | ||
612 | return -EINVAL; | 593 | return -EINVAL; |
613 | 594 | ||
614 | mmc = mmc_alloc_host(sizeof(struct mxs_mmc_host), &pdev->dev); | 595 | mmc = mmc_alloc_host(sizeof(struct mxs_mmc_host), &pdev->dev); |
@@ -624,23 +605,7 @@ static int mxs_mmc_probe(struct platform_device *pdev) | |||
624 | goto out_mmc_free; | 605 | goto out_mmc_free; |
625 | } | 606 | } |
626 | 607 | ||
627 | if (np) { | 608 | ssp->devid = (enum mxs_ssp_id) of_id->data; |
628 | ssp->devid = (enum mxs_ssp_id) of_id->data; | ||
629 | /* | ||
630 | * TODO: This is a temporary solution and should be changed | ||
631 | * to use generic DMA binding later when the helpers get in. | ||
632 | */ | ||
633 | ret = of_property_read_u32(np, "fsl,ssp-dma-channel", | ||
634 | &ssp->dma_channel); | ||
635 | if (ret) { | ||
636 | dev_err(mmc_dev(host->mmc), | ||
637 | "failed to get dma channel\n"); | ||
638 | goto out_mmc_free; | ||
639 | } | ||
640 | } else { | ||
641 | ssp->devid = pdev->id_entry->driver_data; | ||
642 | ssp->dma_channel = dmares->start; | ||
643 | } | ||
644 | 609 | ||
645 | host->mmc = mmc; | 610 | host->mmc = mmc; |
646 | host->sdio_irq_en = 0; | 611 | host->sdio_irq_en = 0; |
@@ -670,10 +635,7 @@ static int mxs_mmc_probe(struct platform_device *pdev) | |||
670 | 635 | ||
671 | mxs_mmc_reset(host); | 636 | mxs_mmc_reset(host); |
672 | 637 | ||
673 | dma_cap_zero(mask); | 638 | ssp->dmach = dma_request_slave_channel(&pdev->dev, "rx-tx"); |
674 | dma_cap_set(DMA_SLAVE, mask); | ||
675 | ssp->dma_data.chan_irq = irq_dma; | ||
676 | ssp->dmach = dma_request_channel(mask, mxs_mmc_dma_filter, host); | ||
677 | if (!ssp->dmach) { | 639 | if (!ssp->dmach) { |
678 | dev_err(mmc_dev(host->mmc), | 640 | dev_err(mmc_dev(host->mmc), |
679 | "%s: failed to request dma\n", __func__); | 641 | "%s: failed to request dma\n", __func__); |