From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Wed, 08 Feb 2012 12:23:13 +0100 Subject: [U-Boot] [PATCH V6 - Part 1 - 1/1] mx6q: define GPIO macros for translating between ordinals and port:index In-Reply-To: <1328032330-20883-1-git-send-email-eric.nelson@boundarydevices.com> References: <1328032330-20883-1-git-send-email-eric.nelson@boundarydevices.com> Message-ID: <4F325B21.30900@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 31/01/2012 18:52, Eric Nelson wrote: > The interface to the mxc_gpio driver uses integer (ordinal) values to > refer to all GPIOs on the i.MX processors. The registers themselves > and much of the i.MX documentation are banked in groups of 32, and these > macros allow the use of the port:index numbering for clarity. > > GPIO_NUMBER() converts to ordinal value from port:index > GPIO_PORT() returns the port of an ordinal value > GPIO_INDEX() returns the index or offset of the ordinal. > > Discussion on the mailing list at > http://lists.denx.de/pipermail/u-boot/2012-January/116927.html > > Signed-off-by: Eric Nelson > --- Applied to u-boot-imx, thanks. Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================