From patchwork Sat Aug 13 16:14:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 109938 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C878BB6F6B for ; Sun, 14 Aug 2011 02:02:56 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QsGfS-0007WV-Gf; Sat, 13 Aug 2011 16:02:36 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QsGfQ-0002YO-CM; Sat, 13 Aug 2011 16:02:32 +0000 Received: from mail-iy0-f171.google.com ([209.85.210.171]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QsGeJ-00025K-7P for linux-arm-kernel@lists.infradead.org; Sat, 13 Aug 2011 16:01:24 +0000 Received: by mail-iy0-f171.google.com with SMTP id 13so4060672iyf.16 for ; Sat, 13 Aug 2011 09:01:22 -0700 (PDT) Received: by 10.42.169.198 with SMTP id c6mr2127191icz.271.1313251282835; Sat, 13 Aug 2011 09:01:22 -0700 (PDT) Received: from localhost.localdomain ([114.216.156.140]) by mx.google.com with ESMTPS id bv10sm1351925icb.1.2011.08.13.09.01.15 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 13 Aug 2011 09:01:22 -0700 (PDT) From: Shawn Guo To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 6/8] arm/mxc: move IMX_GPIO_NR into mach/hardware.h Date: Sun, 14 Aug 2011 00:14:05 +0800 Message-Id: <1313252047-8820-7-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1313252047-8820-1-git-send-email-shawn.guo@linaro.org> References: <1313252047-8820-1-git-send-email-shawn.guo@linaro.org> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110813_120123_513082_51B9C61F X-CRM114-Status: GOOD ( 16.49 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.171 listed in list.dnswl.org] Cc: Russell King - ARM Linux , patches@linaro.org, Sascha Hauer , Nicolas Pitre , Grant Likely , Shawn Guo X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org The patch moves IMX_GPIO_NR into mach/hardware.h, so that mach/gpio.h becomes an empty header and can wait for a global removal from asm/gpio.h. Signed-off-by: Shawn Guo --- arch/arm/plat-mxc/include/mach/gpio.h | 31 +---------------------------- arch/arm/plat-mxc/include/mach/hardware.h | 4 +++ 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h index 8e5276c..40a8c17 100644 --- a/arch/arm/plat-mxc/include/mach/gpio.h +++ b/arch/arm/plat-mxc/include/mach/gpio.h @@ -1,30 +1 @@ -/* - * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved. - * Copyright 2008 Juergen Beisert, kernel@pengutronix.de - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __ASM_ARCH_MXC_GPIO_H__ -#define __ASM_ARCH_MXC_GPIO_H__ - -#include -#include - - -/* There's a off-by-one betweem the gpio bank number and the gpiochip */ -/* range e.g. GPIO_1_5 is gpio 5 under linux */ -#define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr)) - -#endif +/* empty */ diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h index 77f6556..f57ec47 100644 --- a/arch/arm/plat-mxc/include/mach/hardware.h +++ b/arch/arm/plat-mxc/include/mach/hardware.h @@ -116,6 +116,10 @@ .type = _type, \ } +/* There's a off-by-one betweem the gpio bank number and the gpiochip */ +/* range e.g. GPIO_1_5 is gpio 5 under linux */ +#define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr)) + #define IMX_GPIO_TO_IRQ(gpio) (MXC_GPIO_IRQ_START + (gpio)) #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */