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: 3442 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C0CCA24198 for ; Sat, 13 Aug 2011 16:01:24 +0000 (UTC) Received: from mail-ew0-f52.google.com (mail-ew0-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id B6B1EA18352 for ; Sat, 13 Aug 2011 16:01:24 +0000 (UTC) Received: by mail-ew0-f52.google.com with SMTP id 28so2167074ewy.11 for ; Sat, 13 Aug 2011 09:01:24 -0700 (PDT) Received: by 10.213.32.131 with SMTP id c3mr138347ebd.94.1313251284423; Sat, 13 Aug 2011 09:01:24 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.213.102.5 with SMTP id e5cs22930ebo; Sat, 13 Aug 2011 09:01:24 -0700 (PDT) Received: from mr.google.com ([10.42.189.138]) by 10.42.189.138 with SMTP id de10mr2664103icb.399.1313251284094 (num_hops = 1); Sat, 13 Aug 2011 09:01:24 -0700 (PDT) Received: by 10.42.189.138 with SMTP id de10mr2201804icb.399.1313251283423; Sat, 13 Aug 2011 09:01:23 -0700 (PDT) Received: from mail-iy0-f170.google.com (mail-iy0-f170.google.com [209.85.210.170]) by mx.google.com with ESMTPS id md8si11039975icb.153.2011.08.13.09.01.22 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 13 Aug 2011 09:01:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.170 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=209.85.210.170; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.170 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) smtp.mail=shawn.guo@linaro.org Received: by mail-iy0-f170.google.com with SMTP id 16so3848137iye.1 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 Cc: Russell King - ARM Linux , Grant Likely , Sascha Hauer , Nicolas Pitre , patches@linaro.org, Shawn Guo 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> 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__ */