From patchwork Wed Apr 4 16:05:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vikram Narayanan X-Patchwork-Id: 150769 X-Patchwork-Delegate: sbabic@denx.de 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 4E046B705E for ; Thu, 5 Apr 2012 02:46:18 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 31163281D2; Wed, 4 Apr 2012 18:45:59 +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 4OJYf3PuZQmD; Wed, 4 Apr 2012 18:45:58 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 61951281D9; Wed, 4 Apr 2012 18:45:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 95B7C281B2 for ; Wed, 4 Apr 2012 18:12:11 +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 GGgvgQCreJ3q for ; Wed, 4 Apr 2012 18:12:10 +0200 (CEST) X-Greylist: delayed 380 seconds by postgrey-1.27 at theia; Wed, 04 Apr 2012 18:12:08 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-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by theia.denx.de (Postfix) with ESMTPS id 5F4C1281B0 for ; Wed, 4 Apr 2012 18:12:08 +0200 (CEST) Received: by dakh32 with SMTP id h32so428631dak.23 for ; Wed, 04 Apr 2012 09:12:07 -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:subject :content-type:content-transfer-encoding; bh=xHqNBUfoESk34H5iy58FKgcgEa811KVaQIjQE2odjNk=; b=i5nor3GaTpWYCYsm8+GekIqRsm85c4ExFoxz6NcaTHfbybUMFNZz9/9wWUARX93/or FvdXpjLBP96aJ9+FE2OZDGcz4R0cZUsTvajBNYEO7AQhTMGe6XbimNGv4BvFCTIHKFbC U/v4pO+lTmPXX5WarhWfmN/u77GR32qu/crqwrtiIPWJZo8WZJiz8rnvpImwlhkVe2bU CT3hPm6sUCzDOxGgtNVOdXFgJ8giIpLtlTfOpqt4Z508Y9Rk16EwH9o8g6l2avGvkoPz hXnkDuvv8jHDFNMZc9tX2o5gl2iv8Ti7g0k82dB5riyxRyVjVmX2XSxj9UVIGWWjQkpw rtoA== Received: by 10.68.203.132 with SMTP id kq4mr17455354pbc.83.1333555546363; Wed, 04 Apr 2012 09:05:46 -0700 (PDT) Received: from [115.242.148.239] ([115.242.148.239]) by mx.google.com with ESMTPS id b4sm914193pbc.7.2012.04.04.09.05.44 (version=SSLv3 cipher=OTHER); Wed, 04 Apr 2012 09:05:45 -0700 (PDT) Message-ID: <4F7C7153.3040601@gmail.com> Date: Wed, 04 Apr 2012 21:35:39 +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 X-Mailman-Approved-At: Wed, 04 Apr 2012 18:45:01 +0200 Subject: [U-Boot] [PATCH 1/3] imx: Add GPIO_TO_PORT macro 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 imx: Add GPIO_TO_PORT macro Signed-off-by: Vikram Narayanan --- arch/arm/include/asm/arch-mx5/gpio.h | 2 ++ arch/arm/include/asm/arch-mx6/gpio.h | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) 50.0% arch/arm/include/asm/arch-mx5/ 50.0% arch/arm/include/asm/arch-mx6/ diff --git a/arch/arm/include/asm/arch-mx5/gpio.h b/arch/arm/include/asm/arch-mx5/gpio.h index 1dc34e9..bcb5edb 100644 --- a/arch/arm/include/asm/arch-mx5/gpio.h +++ b/arch/arm/include/asm/arch-mx5/gpio.h @@ -25,6 +25,8 @@ #ifndef __ASM_ARCH_MX5_GPIO_H #define __ASM_ARCH_MX5_GPIO_H +#define GPIO_TO_PORT(number) (number/32) + /* GPIO registers */ struct gpio_regs { u32 gpio_dr; diff --git a/arch/arm/include/asm/arch-mx6/gpio.h b/arch/arm/include/asm/arch-mx6/gpio.h index 20c4e57..385d12d 100644 --- a/arch/arm/include/asm/arch-mx6/gpio.h +++ b/arch/arm/include/asm/arch-mx6/gpio.h @@ -25,6 +25,8 @@ #ifndef __ASM_ARCH_MX6_GPIO_H #define __ASM_ARCH_MX6_GPIO_H +#define GPIO_TO_PORT(number) (number/32) + /* GPIO registers */ struct gpio_regs { u32 gpio_dr;