From patchwork Fri Aug 12 07:55:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 3404 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 2A94423F41 for ; Fri, 12 Aug 2011 07:43:21 +0000 (UTC) Received: from mail-qw0-f52.google.com (mail-qw0-f52.google.com [209.85.216.52]) by fiordland.canonical.com (Postfix) with ESMTP id EDA4BA18746 for ; Fri, 12 Aug 2011 07:43:20 +0000 (UTC) Received: by mail-qw0-f52.google.com with SMTP id 8so2136278qwb.11 for ; Fri, 12 Aug 2011 00:43:20 -0700 (PDT) Received: by 10.229.62.150 with SMTP id x22mr403982qch.136.1313135000641; Fri, 12 Aug 2011 00:43:20 -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.229.190.71 with SMTP id dh7cs140484qcb; Fri, 12 Aug 2011 00:43:20 -0700 (PDT) Received: from mr.google.com ([10.91.48.6]) by 10.91.48.6 with SMTP id a6mr102562agk.23.1313135000394 (num_hops = 1); Fri, 12 Aug 2011 00:43:20 -0700 (PDT) Received: by 10.91.48.6 with SMTP id a6mr69311agk.23.1313135000067; Fri, 12 Aug 2011 00:43:20 -0700 (PDT) Received: from mail-yi0-f50.google.com (mail-yi0-f50.google.com [209.85.218.50]) by mx.google.com with ESMTPS id d18si3296684anc.141.2011.08.12.00.43.19 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Aug 2011 00:43:20 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.218.50 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=209.85.218.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.218.50 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) smtp.mail=shawn.guo@linaro.org Received: by yib18 with SMTP id 18so2004763yib.37 for ; Fri, 12 Aug 2011 00:43:19 -0700 (PDT) Received: by 10.143.62.18 with SMTP id p18mr361714wfk.244.1313134999426; Fri, 12 Aug 2011 00:43:19 -0700 (PDT) Received: from localhost.localdomain ([58.208.99.22]) by mx.google.com with ESMTPS id 14sm1379325wfl.5.2011.08.12.00.43.10 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Aug 2011 00:43:18 -0700 (PDT) From: Shawn Guo To: linux-arm-kernel@lists.infradead.org Cc: Russell King - ARM Linux , Grant Likely , Nicolas Pitre , Sascha Hauer , patches@linaro.org, Shawn Guo Subject: [PATCH 6/6] arm/mxc: move IMX_GPIO_NR into mach/hardware.h Date: Fri, 12 Aug 2011 15:55:01 +0800 Message-Id: <1313135701-22456-7-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1313135701-22456-1-git-send-email-shawn.guo@linaro.org> References: <1313135701-22456-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 Cc: Sascha Hauer --- arch/arm/plat-mxc/include/mach/gpio.h | 8 -------- arch/arm/plat-mxc/include/mach/hardware.h | 4 ++++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h index 8e5276c..54fe5cb 100644 --- a/arch/arm/plat-mxc/include/mach/gpio.h +++ b/arch/arm/plat-mxc/include/mach/gpio.h @@ -19,12 +19,4 @@ #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 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__ */