From patchwork Sat Jun 15 08:31:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 2726431 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 C45769F96B for ; Sat, 15 Jun 2013 08:39:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E09EF201AA for ; Sat, 15 Jun 2013 08:39:42 +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 72C45201A3 for ; Sat, 15 Jun 2013 08:39:41 +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 1UnlvV-00023r-0x; Sat, 15 Jun 2013 08:33:38 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Unlus-0002wc-No; Sat, 15 Jun 2013 08:32:58 +0000 Received: from bitmer.com ([213.157.87.50]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Unlu9-0002qv-NW for linux-arm-kernel@lists.infradead.org; Sat, 15 Jun 2013 08:32:14 +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 1Unltr-00015z-IL; Sat, 15 Jun 2013 11:31:55 +0300 From: Jarkko Nikula To: linux-omap@vger.kernel.org Subject: [PATCH 6/8] ARM: OMAP1: Remove duplicated DMA channel definitions Date: Sat, 15 Jun 2013 11:31:07 +0300 Message-Id: <1371285069-6834-7-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_043213_965257_BA6BBE71 X-CRM114-Status: GOOD ( 11.68 ) 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 Similarly than with OMAP2 there are many DMA channel definitions that have been moved or redefined in drivers using them and we can remove them from dma.h. There is exception with MMC that arch/arm/mach-omap1/devices.c is using MMC DMA channel definitions for setting platform data but those can be well replaced with numeric values. Remove dma.h include from arch/arm/mach-omap1/devices.c and use a script below for dropping duplicated definitions and for replacing definitions with DMA channel numbers. grep '#define OMAP_DMA' arch/arm/mach-omap1/dma.h | while read -r i; do \ DDEF=`echo $i |cut -d ' ' -f 1-2`; \ DEF=`echo $DDEF |cut -d ' ' -f 2`; \ CH=`echo $i |cut -d ' ' -f 3`; \ if [ `git grep -c "$DDEF" |wc -l` -gt 1 ]; then \ echo "removing" $DEF; \ sed -i "s/${DEF}/${CH}/" arch/arm/mach-omap1/devices.c; \ sed -i "/${DDEF}/d" arch/arm/mach-omap1/dma.h; \ fi; \ done Signed-off-by: Jarkko Nikula --- arch/arm/mach-omap1/devices.c | 9 ++++----- arch/arm/mach-omap1/dma.h | 8 -------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 0af635205..325e603 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c @@ -30,7 +30,6 @@ #include "common.h" #include "clock.h" -#include "dma.h" #include "mmc.h" #include "sram.h" @@ -223,16 +222,16 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, case 0: base = OMAP1_MMC1_BASE; irq = INT_MMC; - rx_req = OMAP_DMA_MMC_RX; - tx_req = OMAP_DMA_MMC_TX; + rx_req = 22; + tx_req = 21; break; case 1: if (!cpu_is_omap16xx()) return; base = OMAP1_MMC2_BASE; irq = INT_1610_MMC2; - rx_req = OMAP_DMA_MMC2_RX; - tx_req = OMAP_DMA_MMC2_TX; + rx_req = 55; + tx_req = 54; break; default: continue; diff --git a/arch/arm/mach-omap1/dma.h b/arch/arm/mach-omap1/dma.h index 1932e9a..dc33cd9 100644 --- a/arch/arm/mach-omap1/dma.h +++ b/arch/arm/mach-omap1/dma.h @@ -20,17 +20,9 @@ #define __OMAP1_DMA_CHANNEL_H /* DMA channels for omap1 */ -#define OMAP_DMA_NO_DEVICE 0 #define OMAP_DMA_UART3_TX 18 #define OMAP_DMA_UART3_RX 19 -#define OMAP_DMA_CAMERA_IF_RX 20 -#define OMAP_DMA_MMC_TX 21 -#define OMAP_DMA_MMC_RX 22 -#define OMAP_DMA_USB_W2FC_RX0 26 -#define OMAP_DMA_USB_W2FC_TX0 29 /* These are only for 1610 */ -#define OMAP_DMA_MMC2_TX 54 -#define OMAP_DMA_MMC2_RX 55 #endif /* __OMAP1_DMA_CHANNEL_H */