From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vikram Narayanan Date: Sun, 10 Jun 2012 18:32:44 +0530 Subject: [U-Boot] [PATCH 1/3] imx25: Move MXC_GPIO_PORT_TO_NUM to imx-regs.h In-Reply-To: <4FD49AA5.7000303@gmail.com> References: <4FD49AA5.7000303@gmail.com> Message-ID: <4FD49AF4.2090506@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 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 */ -- 1.7.4.1