[U-Boot] [PATCH 3/3] mx6q: mx6qsabrelite: Add ECSPI support to the Sabrelite platform

Stefano Babic sbabic at denx.de
Tue Jan 31 16:00:09 CET 2012


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
=====================================================================


More information about the U-Boot mailing list