From patchwork Fri Mar 4 10:26:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 315 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:41:40 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs9900qah; Fri, 4 Mar 2011 02:26:55 -0800 (PST) Received: by 10.224.218.138 with SMTP id hq10mr332174qab.114.1299234415220; Fri, 04 Mar 2011 02:26:55 -0800 (PST) Received: from mail-qw0-f50.google.com (mail-qw0-f50.google.com [209.85.216.50]) by mx.google.com with ESMTPS id m14si4123960qcu.110.2011.03.04.02.26.55 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 02:26:55 -0800 (PST) Received-SPF: neutral (google.com: 209.85.216.50 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.216.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.50 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) smtp.mail=linus.walleij@linaro.org Received: by qwk3 with SMTP id 3so1842112qwk.37 for ; Fri, 04 Mar 2011 02:26:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.11.20 with SMTP id r20mr286141qar.384.1299234415069; Fri, 04 Mar 2011 02:26:55 -0800 (PST) Received: by 10.224.28.201 with HTTP; Fri, 4 Mar 2011 02:26:55 -0800 (PST) In-Reply-To: <1297350637-2877-1-git-send-email-linus.walleij@linaro.org> References: <1297350637-2877-1-git-send-email-linus.walleij@linaro.org> Date: Fri, 4 Mar 2011 11:26:55 +0100 Message-ID: Subject: Fwd: [PATCH 08/11] tmio_mmc: map DMA buffers on the DMA engine device From: Linus Walleij To: Patch Tracking ---------- Forwarded message ---------- From: Linus Walleij Date: Thu, Feb 10, 2011 at 4:10 PM Subject: [PATCH 08/11] tmio_mmc: map DMA buffers on the DMA engine device To: linux-mmc@vger.kernel.org, Chris Ball Cc: Dan Williams , Ian Molton , Linus Walleij As established for the MMCI, it is proper to map the DMA buffers on the DMA engine which is the one actually performing the DMA. Signed-off-by: Linus Walleij ---  drivers/mmc/host/tmio_mmc.c |   10 ++++++----  1 files changed, 6 insertions(+), 4 deletions(-)                desc = chan->device->device_prep_slave_sg(chan, sg, ret, @@ -906,7 +906,7 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host)                sg = host->sg_ptr;        } -       ret = dma_map_sg(&host->pdev->dev, sg, host->sg_len, DMA_TO_DEVICE); +       ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_TO_DEVICE);        if (ret > 0) {                host->dma_sglen = ret;                desc = chan->device->device_prep_slave_sg(chan, sg, ret, @@ -978,10 +978,12 @@ static void tmio_tasklet_fn(unsigned long arg)                goto out;        if (host->data->flags & MMC_DATA_READ) -               dma_unmap_sg(&host->pdev->dev, host->sg_ptr, host->dma_sglen, +               dma_unmap_sg(host->chan_rx->device->dev, +                            host->sg_ptr, host->dma_sglen,                             DMA_FROM_DEVICE);        else -               dma_unmap_sg(&host->pdev->dev, host->sg_ptr, host->dma_sglen, +               dma_unmap_sg(host->chan_tx->device->dev, +                            host->sg_ptr, host->dma_sglen,                             DMA_TO_DEVICE);        tmio_mmc_do_data_irq(host); -- 1.7.4 diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index e3c6ef2..c82d8e2 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -825,7 +825,7 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host)                sg = host->sg_ptr;        } -       ret = dma_map_sg(&host->pdev->dev, sg, host->sg_len, DMA_FROM_DEVICE); +       ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_FROM_DEVICE);        if (ret > 0) {                host->dma_sglen = ret;