From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Tue, 31 Jan 2012 16:00:09 +0100 Subject: [U-Boot] [PATCH 3/3] mx6q: mx6qsabrelite: Add ECSPI support to the Sabrelite platform In-Reply-To: <4F27F7C6.9020507@boundarydevices.com> References: <1327953179-4143-1-git-send-email-eric.nelson@boundarydevices.com> <1327953179-4143-4-git-send-email-eric.nelson@boundarydevices.com> <4F27F7C6.9020507@boundarydevices.com> Message-ID: <4F2801F9.20006@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 15:16, Eric Nelson wrote: > On 01/31/2012 02:31 AM, Jason Hui wrote: >> Eric, >> Hi Eric, > Ouch! It's all about the GPIO numbers... > > This occurred when I re-based to Stefano's tree and will require > another patch to keep the BANK:OFFSET numbering scheme. There's a > patch lingering in Dirk's tree that defines IMX_GPIO_NR() in gpio.h. > > See http://lists.denx.de/pipermail/u-boot/2012-January/116866.html > for details. Extending the thread you report: the only macro defined in MX I can find is for MX27: #define MXC_GPIO_PORT_TO_NUM(port, bit) (((port - 1) << 5) + (bit & 0x1f)) but we do not need to stick with it ;-). Using a more general GPIO_ as you proposed is better because we could extend the same macros to other family. > > I was hoping to get some feedback before generating a patch and > revising this patch (and removing GPIO_3_19 macro): > > http://lists.denx.de/pipermail/u-boot/2012-January/116874.html > > That said, I'll revise and re-send along with a patch adding > support for: > GPIO_NUMBER(port,index) > GPIO_PORT(number) > GPIO_INDEX(number) Agree with your proposal, good idea ! 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 =====================================================================