From patchwork Sat Jun 15 08:31:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 2726411 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 27C0A9F967 for ; Sat, 15 Jun 2013 08:37:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 56265201AA for ; Sat, 15 Jun 2013 08:37:32 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 179C6201A3 for ; Sat, 15 Jun 2013 08:37:31 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Unlvx-0002A5-Cf; Sat, 15 Jun 2013 08:34:08 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Unlv8-0002xS-6Q; Sat, 15 Jun 2013 08:33:14 +0000 Received: from bitmer.com ([213.157.87.50]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UnluE-0002qw-Nk for linux-arm-kernel@lists.infradead.org; Sat, 15 Jun 2013 08:32:21 +0000 Received: from host-94-101-4-66.igua.fi ([94.101.4.66] helo=localhost.localdomain) by bitmer.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1Unltp-00015z-JX; Sat, 15 Jun 2013 11:31:53 +0300 From: Jarkko Nikula To: linux-omap@vger.kernel.org Subject: [PATCH 5/8] ARM: OMAP1: Remove McBSP DMA channel definitions Date: Sat, 15 Jun 2013 11:31:06 +0300 Message-Id: <1371285069-6834-6-git-send-email-jarkko.nikula@bitmer.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1371285069-6834-1-git-send-email-jarkko.nikula@bitmer.com> References: <1371285069-6834-1-git-send-email-jarkko.nikula@bitmer.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130615_043219_289552_265825F7 X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.2 (--) Cc: Tony Lindgren , Jarkko Nikula , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP arch/arm/mach-omap1/mcbsp.c is only place where OMAP1 McBSP DMA channel definitions are set. We may well use numerical values there and get rid of their definitions in arch/arm/mach-omap1/dma.h. Remove dma.h include from arch/arm/mach-omap1/mcbsp.c and use following script for replacing definitions with DMA channel number: egrep '#define OMAP_DMA_MCBSP' arch/arm/mach-omap1/dma.h | cut -f 1,3 \ | while read i; do \ DEF=`echo $i |cut -d ' ' -f 2`; \ CH=`echo $i |cut -d ' ' -f 3`; \ echo "removing" $DEF; \ sed -i "s/${DEF}/${CH}/" arch/arm/mach-omap1/mcbsp.c; \ sed -i "/${DEF}/d" arch/arm/mach-omap1/dma.h; \ done Signed-off-by: Jarkko Nikula --- arch/arm/mach-omap1/dma.h | 6 ------ arch/arm/mach-omap1/mcbsp.c | 33 ++++++++++++++++----------------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/arch/arm/mach-omap1/dma.h b/arch/arm/mach-omap1/dma.h index d05909c..1932e9a 100644 --- a/arch/arm/mach-omap1/dma.h +++ b/arch/arm/mach-omap1/dma.h @@ -21,12 +21,6 @@ /* DMA channels for omap1 */ #define OMAP_DMA_NO_DEVICE 0 -#define OMAP_DMA_MCBSP1_TX 8 -#define OMAP_DMA_MCBSP1_RX 9 -#define OMAP_DMA_MCBSP3_TX 10 -#define OMAP_DMA_MCBSP3_RX 11 -#define OMAP_DMA_MCBSP2_TX 16 -#define OMAP_DMA_MCBSP2_RX 17 #define OMAP_DMA_UART3_TX 18 #define OMAP_DMA_UART3_RX 19 #define OMAP_DMA_CAMERA_IF_RX 20 diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c index b0d4723..8ed67f8 100644 --- a/arch/arm/mach-omap1/mcbsp.c +++ b/arch/arm/mach-omap1/mcbsp.c @@ -27,7 +27,6 @@ #include #include "iomap.h" -#include "dma.h" #define DPS_RSTCT2_PER_EN (1 << 0) #define DSP_RSTCT2_WD_PER_EN (1 << 1) @@ -114,12 +113,12 @@ struct resource omap7xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP1_RX, + .start = 9, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP1_TX, + .start = 8, .flags = IORESOURCE_DMA, }, }, @@ -141,12 +140,12 @@ struct resource omap7xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP3_RX, + .start = 11, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP3_TX, + .start = 10, .flags = IORESOURCE_DMA, }, }, @@ -191,12 +190,12 @@ struct resource omap15xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP1_RX, + .start = 9, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP1_TX, + .start = 8, .flags = IORESOURCE_DMA, }, }, @@ -218,12 +217,12 @@ struct resource omap15xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP2_RX, + .start = 17, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP2_TX, + .start = 16, .flags = IORESOURCE_DMA, }, }, @@ -245,12 +244,12 @@ struct resource omap15xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP3_RX, + .start = 11, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP3_TX, + .start = 10, .flags = IORESOURCE_DMA, }, }, @@ -298,12 +297,12 @@ struct resource omap16xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP1_RX, + .start = 9, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP1_TX, + .start = 8, .flags = IORESOURCE_DMA, }, }, @@ -325,12 +324,12 @@ struct resource omap16xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP2_RX, + .start = 17, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP2_TX, + .start = 16, .flags = IORESOURCE_DMA, }, }, @@ -352,12 +351,12 @@ struct resource omap16xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP3_RX, + .start = 11, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP3_TX, + .start = 10, .flags = IORESOURCE_DMA, }, },