From patchwork Thu May 5 11:51:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 756552 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p45BpvaR020343 for ; Thu, 5 May 2011 11:51:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752925Ab1EELvz (ORCPT ); Thu, 5 May 2011 07:51:55 -0400 Received: from smtp.nokia.com ([147.243.128.24]:46923 "EHLO mgw-da01.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752226Ab1EELvx (ORCPT ); Thu, 5 May 2011 07:51:53 -0400 Received: from nokia.com (localhost [127.0.0.1]) by mgw-da01.nokia.com (Switch-3.4.4/Switch-3.4.3) with ESMTP id p45BpkEF024101; Thu, 5 May 2011 14:51:46 +0300 Received: from localhost.localdomain ([[172.21.24.109]]) by mgw-da01.nokia.com with RELAY id p45BpO6q023786 ; Thu, 5 May 2011 14:51:38 +0300 From: Adrian Hunter To: Tony Lindgren Cc: Madhusudhan Chikkature , linux-omap Mailing List , linux-mmc Mailing List , linux-arm Mailing List , Adrian Hunter , Venkatraman S , Shilimkar Santosh , Tony Lindgren Subject: [PATCH 02/22] OMAP: DMA: add omap_dma_has_sglist() Date: Thu, 5 May 2011 14:51:02 +0300 Message-Id: <1304596282-4095-3-git-send-email-adrian.hunter@nokia.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1304596282-4095-1-git-send-email-adrian.hunter@nokia.com> References: <1304596282-4095-1-git-send-email-adrian.hunter@nokia.com> X-Nokia-AV: Clean Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 05 May 2011 11:51:59 +0000 (UTC) Simplify detection of the sglist feature and add a define for the super block end event that occurs with sglist transfers. Signed-off-by: Adrian Hunter CC: Venkatraman S CC: Madhusudhan C CC: Shilimkar Santosh CC: Tony Lindgren --- arch/arm/plat-omap/dma.c | 5 +++++ arch/arm/plat-omap/include/plat/dma.h | 3 +++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 7f64366..32a923a 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -1862,6 +1862,11 @@ int omap_get_dma_chain_src_pos(int chain_id) EXPORT_SYMBOL(omap_get_dma_chain_src_pos); #endif /* ifndef CONFIG_ARCH_OMAP1 */ +int omap_dma_has_sglist_mode(void) +{ + return dma_caps0_status & DMA_CAPS_SGLIST_SUPPORT; +} + int omap_set_dma_sglist_mode(int lch, struct omap_dma_sglist_node *sgparams, dma_addr_t padd, int nelem, struct omap_dma_channel_params *chparams) { diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h index 4d73eb1..3536eb4 100644 --- a/arch/arm/plat-omap/include/plat/dma.h +++ b/arch/arm/plat-omap/include/plat/dma.h @@ -209,6 +209,7 @@ #define OMAP2_DMA_SECURE_ERR_IRQ (1 << 9) #define OMAP2_DMA_SUPERVISOR_ERR_IRQ (1 << 10) #define OMAP2_DMA_MISALIGNED_ERR_IRQ (1 << 11) +#define OMAP2_DMA_SUPER_BLOCK_IRQ (1 << 14) #define OMAP_DMA_CCR_EN (1 << 7) #define OMAP_DMA_CCR_RD_ACTIVE (1 << 9) @@ -616,6 +617,8 @@ static inline int omap_lcd_dma_running(void) } #endif +extern int omap_dma_has_sglist_mode(void); + /** * omap_set_dma_sglist_mode() Switch channel to scatter gather mode * @lch: Logical channel to switch to sglist mode