From patchwork Sun Jun 10 13:02:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vikram Narayanan X-Patchwork-Id: 163994 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id D5FB1B6FD3 for ; Sun, 10 Jun 2012 23:02:59 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AE95E281C2; Sun, 10 Jun 2012 15:02:57 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ySTOnvMNFfmy; Sun, 10 Jun 2012 15:02:57 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B194B281B7; Sun, 10 Jun 2012 15:02:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 302E2281B7 for ; Sun, 10 Jun 2012 15:02:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3lCUMS6zTjHt for ; Sun, 10 Jun 2012 15:02:53 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by theia.denx.de (Postfix) with ESMTPS id 5C48E281AF for ; Sun, 10 Jun 2012 15:02:52 +0200 (CEST) Received: by dacx6 with SMTP id x6so3956250dac.3 for ; Sun, 10 Jun 2012 06:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ef1ZqDvLRso1+po4XYqTo1tfT/+Yv6GPCK+v1OPUx40=; b=NSTwN8g3IDLBieJH4STcBfzQhN+kCUkoNLiUv2iPIwtOIsWhZ8wbW58c5F/hyvj9vr V1Q06gDtQbAyQMcWHTbINp+oRIroDFio4JzzR49c0KtV/7xkez9pF6Se6ujVaEfaRaQs icdhPwB29zfDXUQfyi0L720fMktj5RJSAOsOxTWaK37vuqbeGCZpvoKHFgO9f/YmeKb0 NCPZRcHFmq/vPN93uCZQ17lkJ83EWIggUOVfUsuyr6SgGWqNelqFaDLUDw4pad9fefRY dmwIQ6DdXhbGqOWm8vMWO6ylgcCwiWlHdUthw4W5pR6yx3XjRjc0tvUJDWcpCzxKeIVX sdsg== Received: by 10.68.213.234 with SMTP id nv10mr16117607pbc.56.1339333370428; Sun, 10 Jun 2012 06:02:50 -0700 (PDT) Received: from [192.168.1.4] ([122.165.225.85]) by mx.google.com with ESMTPS id qc1sm14803805pbb.62.2012.06.10.06.02.47 (version=SSLv3 cipher=OTHER); Sun, 10 Jun 2012 06:02:49 -0700 (PDT) Message-ID: <4FD49AF4.2090506@gmail.com> Date: Sun, 10 Jun 2012 18:32:44 +0530 From: Vikram Narayanan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: u-boot@lists.denx.de References: <4FD49AA5.7000303@gmail.com> In-Reply-To: <4FD49AA5.7000303@gmail.com> Cc: Fabio Estevam , John Rigby Subject: [U-Boot] [PATCH 1/3] imx25: Move MXC_GPIO_PORT_TO_NUM to imx-regs.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Move the macro to imx-regs.h so that the other mx25 boards can make use of it. Signed-off-by: Vikram Narayanan --- arch/arm/include/asm/arch-mx25/gpio.h | 4 ---- arch/arm/include/asm/arch-mx25/imx-regs.h | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm/include/asm/arch-mx25/gpio.h b/arch/arm/include/asm/arch-mx25/gpio.h index dc6edc7..cc32d50 100644 --- a/arch/arm/include/asm/arch-mx25/gpio.h +++ b/arch/arm/include/asm/arch-mx25/gpio.h @@ -25,10 +25,6 @@ #ifndef __ASM_ARCH_MX25_GPIO_H #define __ASM_ARCH_MX25_GPIO_H -/* Converts a GPIO port number and the internal bit position - * to the GPIO number - */ -#define MXC_GPIO_PORT_TO_NUM(port, bit) (((port - 1) << 5) + (bit & 0x1f)) /* GPIO registers */ struct gpio_regs { diff --git a/arch/arm/include/asm/arch-mx25/imx-regs.h b/arch/arm/include/asm/arch-mx25/imx-regs.h index cf925d7..1f67abb 100644 --- a/arch/arm/include/asm/arch-mx25/imx-regs.h +++ b/arch/arm/include/asm/arch-mx25/imx-regs.h @@ -356,4 +356,10 @@ struct aips_regs { #define CHIP_REV_1_0 0x10 #define CHIP_REV_1_1 0x11 + +/* Converts a GPIO port number and the internal bit position + * to the GPIO number + */ +#define MXC_GPIO_PORT_TO_NUM(port, bit) (((port - 1) << 5) + (bit & 0x1f)) + #endif /* _IMX_REGS_H */