Re: [PATCH] OMAP HSMMC: fix MMC3 dma

From: David Brownell
Date: Sun Feb 08 2009 - 14:38:02 EST


On Tuesday 27 January 2009, Grazvydas Ignotas wrote:
> @@ -1058,6 +1054,25 @@ static int __init omap_mmc_probe(struct platform_device *pdev)
>         OMAP_HSMMC_WRITE(host->base, HCTL,
>                         OMAP_HSMMC_READ(host->base, HCTL) | SDBP);
>  
> +       /* Select DMA lines */
> +       switch (host->id) {
> +       case OMAP_MMC1_DEVID:
> +               host->dma_line_tx = OMAP24XX_DMA_MMC1_TX;
> +               host->dma_line_rx = OMAP24XX_DMA_MMC1_RX;
> +               break;

Actually the cleanest way to do that is through IORESOURCE_DMA
type resources associated with the platform devices ... but
doing it that way requires reworking the MMC platform device
setup logic. Which I can understand wanting to avoid here.

(I think that rework is worth doing for multiple reasons; this
is just one more.)


> +       case OMAP_MMC2_DEVID:
> +               host->dma_line_tx = OMAP24XX_DMA_MMC2_TX;
> +               host->dma_line_rx = OMAP24XX_DMA_MMC2_RX;
> +               break;
> +       case OMAP_MMC3_DEVID:
> +               host->dma_line_tx = OMAP34XX_DMA_MMC3_TX;
> +               host->dma_line_rx = OMAP34XX_DMA_MMC3_RX;
> +               break;
> +       default:
> +               dev_err(mmc_dev(host->mmc), "Invalid MMC id\n");
> +               goto err_irq;
> +       }
> +
>         /* Request IRQ for MMC operations */
>         ret = request_irq(host->irq, mmc_omap_irq, IRQF_DISABLED,
>                         mmc_hostname(mmc), host);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/