Re: [U-Boot] [PATCH] MX: Set a common gpio.h for all i.MX

2012-08-19 Thread Stefano Babic
On 19/08/2012 02:25, Benoît Thébaudeau wrote: > Hi Stefano, > #define MXC_GPIO_PORT_TO_NUM(port, bit) (((port - 1) << 5) + (bit & 0x1f)) >>> >>> Keeping this is also useless. GPIO_NUMBER() from the new >>> >>> can be used instead everywhere needed. >> >> That is right - I drop i

Re: [U-Boot] [PATCH] MX: Set a common gpio.h for all i.MX

2012-08-19 Thread stefano babic
Am 19/08/2012 00:59, schrieb Fabio Estevam: > Hi Stefano, > > On Sat, Aug 18, 2012 at 12:26 PM, Stefano Babic wrote: > >> +#define GPIO_NUMBER(port, index) >> port)-1)*32)+((index)&31)) > > What about calling this macro IMX_GPIO_NR instead? > > This way we can have the same

Re: [U-Boot] [PATCH] MX: Set a common gpio.h for all i.MX

2012-08-18 Thread Benoît Thébaudeau
Hi Stefano, > >> #define MXC_GPIO_PORT_TO_NUM(port, bit) (((port - 1) << 5) + (bit > >> & > >> 0x1f)) > > > > Keeping this is also useless. GPIO_NUMBER() from the new > > > > can be used instead everywhere needed. > > That is right - I drop it. I don't know if you are aware of it, but just

Re: [U-Boot] [PATCH] MX: Set a common gpio.h for all i.MX

2012-08-18 Thread Marek Vasut
Dear Fabio Estevam, > Hi Stefano, > > On Sat, Aug 18, 2012 at 12:26 PM, Stefano Babic wrote: > > +#define GPIO_NUMBER(port, index) > > port)-1)*32)+((index)&31)) > > What about calling this macro IMX_GPIO_NR instead? > > This way we can have the same macro name in U-boot and

Re: [U-Boot] [PATCH] MX: Set a common gpio.h for all i.MX

2012-08-18 Thread Fabio Estevam
Hi Stefano, On Sat, Aug 18, 2012 at 12:26 PM, Stefano Babic wrote: > +#define GPIO_NUMBER(port, index) port)-1)*32)+((index)&31)) What about calling this macro IMX_GPIO_NR instead? This way we can have the same macro name in U-boot and in the kernel. Thanks, Fabio Estevam _

Re: [U-Boot] [PATCH] MX: Set a common gpio.h for all i.MX

2012-08-18 Thread stefano babic
Am 18/08/2012 21:25, schrieb Benoît Thébaudeau: >> #define MXC_GPIO_PORT_TO_NUM(port, bit) (((port - 1) << 5) + (bit & >> 0x1f)) > > Keeping this is also useless. GPIO_NUMBER() from the new > > can be used instead everywhere needed. That is right - I drop it. >> >> -/* GPIO registers */ >

Re: [U-Boot] [PATCH] MX: Set a common gpio.h for all i.MX

2012-08-18 Thread Marek Vasut
Dear Matt Sealey, > On Sat, Aug 18, 2012 at 2:25 PM, Benoît Thébaudeau > > wrote: > > Hi Stefano, > > > > This is a bit off topic, but shouldn't the iomux-v3 stuff be moved to a > > common location for all these i.MXs too? As to the header file, it's > > already done, but the C file is under ar

Re: [U-Boot] [PATCH] MX: Set a common gpio.h for all i.MX

2012-08-18 Thread Matt Sealey
On Sat, Aug 18, 2012 at 2:25 PM, Benoît Thébaudeau wrote: > Hi Stefano, > > This is a bit off topic, but shouldn't the iomux-v3 stuff be moved to a common > location for all these i.MXs too? As to the header file, it's already done, > but > the C file is under arch/arm/cpu/armv7/imx-common/ while

Re: [U-Boot] [PATCH] MX: Set a common gpio.h for all i.MX

2012-08-18 Thread Benoît Thébaudeau
Hi Stefano, > Each i.MX has its own gpio.h, defining the same structure. > The internal GPIO controller has the same layout > (at least for the register used by u-boot) and can be shared. Good! > > Signed-off-by: Stefano Babic > CC: Matt Sealey > CC: Marek Vasut > CC: Benoit Thebaudeau > CC

[U-Boot] [PATCH] MX: Set a common gpio.h for all i.MX

2012-08-18 Thread Stefano Babic
Each i.MX has its own gpio.h, defining the same structure. The internal GPIO controller has the same layout (at least for the register used by u-boot) and can be shared. Signed-off-by: Stefano Babic CC: Matt Sealey CC: Marek Vasut CC: Benoit Thebaudeau CC: Jason Liu --- arch/arm/include/asm/