From patchwork Fri Mar 4 10:25:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 314 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:39 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs9841qah; Fri, 4 Mar 2011 02:25:12 -0800 (PST) Received: by 10.229.45.3 with SMTP id c3mr282407qcf.249.1299234311689; Fri, 04 Mar 2011 02:25:11 -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 g28si4122214qcq.96.2011.03.04.02.25.11 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 02:25:11 -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 mail-qw0-f50.google.com with SMTP id 3so1840963qwk.37 for ; Fri, 04 Mar 2011 02:25:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.37.10 with SMTP id v10mr338669qad.84.1299234311563; Fri, 04 Mar 2011 02:25:11 -0800 (PST) Received: by 10.224.28.201 with HTTP; Fri, 4 Mar 2011 02:25:11 -0800 (PST) In-Reply-To: <1297350486-1004-1-git-send-email-linus.walleij@linaro.org> References: <1297350486-1004-1-git-send-email-linus.walleij@linaro.org> Date: Fri, 4 Mar 2011 11:25:11 +0100 Message-ID: Subject: Fwd: [PATCH 01/11] atmel-mci: map DMA sglist on the DMA engine From: Linus Walleij To: Patch Tracking ---------- Forwarded message ---------- From: Linus Walleij Date: Thu, Feb 10, 2011 at 4:08 PM Subject: [PATCH 01/11] atmel-mci: map DMA sglist on the DMA engine To: linux-mmc@vger.kernel.org, Chris Ball Cc: Dan Williams , Nicolas Ferre , 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/atmel-mci.c |    8 +++++---  1 files changed, 5 insertions(+), 3 deletions(-)        desc = chan->device->device_prep_slave_sg(chan, @@ -699,7 +701,7 @@ atmci_prepare_data_dma(struct atmel_mci *host, struct mmc_data *data)        return 0;  unmap_exit: -       dma_unmap_sg(&host->pdev->dev, data->sg, sglen, direction); +       dma_unmap_sg(chan->device->dev, data->sg, sglen, direction);        return -ENOMEM;  } -- 1.7.4 diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index ad2a7a0..045bdbb 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -578,7 +578,8 @@ static void atmci_dma_cleanup(struct atmel_mci *host)        struct mmc_data                 *data = host->data;        if (data) -               dma_unmap_sg(&host->pdev->dev, data->sg, data->sg_len, +               dma_unmap_sg(host->dma.chan->device->dev, +                            data->sg, data->sg_len,                             ((data->flags & MMC_DATA_WRITE)                              ? DMA_TO_DEVICE : DMA_FROM_DEVICE));  } @@ -684,7 +685,8 @@ atmci_prepare_data_dma(struct atmel_mci *host, struct mmc_data *data)        else                direction = DMA_TO_DEVICE; -       sglen = dma_map_sg(&host->pdev->dev, data->sg, data->sg_len, direction); +       sglen = dma_map_sg(chan->device->dev, data->sg, +                          data->sg_len, direction);        if (sglen != data->sg_len)                goto unmap_exit;