From patchwork Mon Mar 1 11:27:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatraman S X-Patchwork-Id: 82909 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o21BRV3D022449 for ; Mon, 1 Mar 2010 11:27:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751231Ab0CAL1a (ORCPT ); Mon, 1 Mar 2010 06:27:30 -0500 Received: from mail-iw0-f182.google.com ([209.85.223.182]:38974 "EHLO mail-iw0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065Ab0CAL13 (ORCPT ); Mon, 1 Mar 2010 06:27:29 -0500 Received: by iwn12 with SMTP id 12so2260890iwn.21 for ; Mon, 01 Mar 2010 03:27:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=Z09TAQDf44AfdEc/VKibvjtDgitWTMZxAvjRv9cWL8k=; b=ftJg28XIPYv+1qXlWD6kweferTh7uxcK8C8FPwie/H9ODlhTUspFuffsNj8+7Zgdyt 0zz6SNnO2Xsrd5XTuxEN3ElmjgUmiT3PfKAeVFJ6+0BLX6aMYqz/qRDT/S3zVE9yt1zH LybmO8kgYyl24dJDeOo4uimnRKPfAeZLstUnU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=TXxCQ8GgqnBQp+hFs3AYMGx1sUGpoEgOJjubmaObkd+Eu28BxOHTJVp4b+N5stpN1M V3uFr4Uxlh+phrMiBTM9cNMBzRx74UZKLH2cEgpK6c1THZr6joTaJ3occG1HSwfdKtLw QtnMgqNbsE0FPWX+tBFTFv29VZgOct70KLcc4= MIME-Version: 1.0 Received: by 10.231.149.10 with SMTP id r10mr230452ibv.63.1267442849032; Mon, 01 Mar 2010 03:27:29 -0800 (PST) Date: Mon, 1 Mar 2010 16:57:28 +0530 X-Google-Sender-Auth: 42ebd950c5611af9 Message-ID: <618f0c911003010327s290fcce1ud665b5a16392aea1@mail.gmail.com> Subject: [PATCH 03/03] omap hsmmc: adaptation of sdma descriptor autoloading feature From: Venkatraman S To: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 01 Mar 2010 11:27:32 +0000 (UTC) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 06337f6..425129b 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -102,6 +102,7 @@ #define SRD (1 << 26) #define SOFTRESET (1 << 1) #define RESETDONE (1 << 0) +#define DMA_ICR_QUIET 0xD00 /* * FIXME: Most likely all the data using these _DEVID defines should come @@ -118,6 +119,12 @@ #define OMAP_MMC_MASTER_CLOCK 96000000 #define DRIVER_NAME "mmci-omap-hs" +#define DMA_TYPE_NODMA 0 +#define DMA_TYPE_SDMA 1 +#define DMA_TYPE_SDMA_DLOAD 2 + +#define DMA_CTRL_BUF_SIZE (PAGE_SIZE * 3) + /* Timeouts for entering power saving states on inactivity, msec */ #define OMAP_MMC_DISABLED_TIMEOUT 100 #define OMAP_MMC_SLEEP_TIMEOUT 1000 @@ -172,7 +179,11 @@ struct omap_hsmmc_host { u32 bytesleft; int suspended; int irq; - int use_dma, dma_ch; + int dma_caps; + int dma_in_use; + int dma_ch; + void *dma_ctrl_buf; + dma_addr_t dma_ctrl_buf_phy; int dma_line_tx, dma_line_rx; int slot_id; int got_dbclk; @@ -768,7 +779,7 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd, OMAP_HSMMC_WRITE(host->base, STAT, STAT_CLEAR); OMAP_HSMMC_WRITE(host->base, ISE, INT_EN_MASK); - if (host->use_dma) + if (host->dma_in_use) OMAP_HSMMC_WRITE(host->base, IE, INT_EN_MASK & ~(BRR_ENABLE | BWR_ENABLE));