From mboxrd@z Thu Jan 1 00:00:00 1970 From: Troy Kisky Date: Mon, 11 Jun 2012 12:56:00 -0700 Subject: [U-Boot] [PATCH 1/3] imx25: Move MXC_GPIO_PORT_TO_NUM to imx-regs.h In-Reply-To: <4FD6080D.1050509@gmail.com> References: <4FD49AA5.7000303@gmail.com> <4FD49AF4.2090506@gmail.com> <4FD6080D.1050509@gmail.com> Message-ID: <4FD64D50.9090104@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 6/11/2012 8:00 AM, Vikram Narayanan wrote: > On 6/10/2012 8:03 PM, Fabio Estevam wrote: >> Hi Vikram, >> >> On Sun, Jun 10, 2012 at 10:02 AM, Vikram >> Narayanan wrote: >> >>> + >>> +/* 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)) >> >> Just a minor comment: >> >> MXC_GPIO_PORT_TO_NUM looks like a very looong string. >> >> Couldn't we use the same macro as in the Linux kernel (IMX_GPIO_NR) >> instead? >> >> It is more concise and it would nice to have the same macro name for >> kernel and U-boot. >> >> What do you think? > > Yes. That should be a better option. I'll go with it. We have this line already arch/arm/include/asm/arch-mx6/imx-regs.h:#define GPIO_NUMBER(port, index) ((((port)-1)*32)+((index)&31)) > > ~Vikram > >> Thanks, >> >> Fabio Estevam > > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > . >