From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vikram Narayanan Date: Mon, 09 Apr 2012 20:00:32 +0530 Subject: [U-Boot] [PATCH 1/3] imx: Add GPIO_TO_PORT macro In-Reply-To: <4F8274BE.1030507@googlemail.com> References: <4F7C7153.3040601@gmail.com> <4F7EAFAA.9020502@denx.de> <4F8274BE.1030507@googlemail.com> Message-ID: <4F82F288.80603@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Dirk, On 4/9/2012 11:03 AM, Dirk Behme wrote: > Dear Vikram , > > On 06.04.2012 10:56, Stefano Babic wrote: >> On 04/04/2012 18:05, Vikram Narayanan wrote: >>> imx: Add GPIO_TO_PORT macro >>> >>> Signed-off-by: Vikram Narayanan >> >> Hi, >> >>> --- >>> 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; >> >> NAK. We have already (and probably too many) GPIO_TO_PORT: >> >> arch/arm/include/asm/arch-mx6/imx-regs.h:#define GPIO_TO_PORT(number) >> (((number)/32)+1) >> arch/arm/include/asm/arch-mx5/mx5x_pins.h:#define GPIO_TO_PORT(n) >> (n / GPIO_NUM_PIN) >> >> Are they not enough ? @Stefano: Yeah. Just didn't notice it. Will resend it. > Vikram, it seems to me you sent the already NAKed patch to me > > https://github.com/dirkbehme/u-boot-imx6/pull/2 > > again? > Sorry, something went wrong with my filter settings in my mailbox. I wasn't aware that it got NACked. Sorry for sending a pull req anyways. > Please send U-Boot patches only to this U-Boot mailing list. Sure. From now on! > Dirk ~Vikram