From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?= Date: Sun, 19 Aug 2012 02:25:12 +0200 (CEST) Subject: [U-Boot] [PATCH] MX: Set a common gpio.h for all i.MX In-Reply-To: <50301391.7010307@denx.de> Message-ID: <1610423122.2545097.1345335912530.JavaMail.root@advansee.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 to let you know, I've seen the following patch that will interfere: http://patchwork.ozlabs.org/patch/165311/ http://git.denx.de/?p=u-boot/u-boot-staging.git;a=commitdiff;h=72739219a12bf02820d29a89cb2b7fdc4d0e840f You may want to merge it to your imx tree and rebase after it for your patch. > >> > >> -/* GPIO registers */ > >> -struct gpio_regs { > >> - u32 gpio_dr; > >> - u32 gpio_dir; > >> - u32 gpio_psr; > >> -}; > >> +#include > >> > >> #endif /* __ASM_ARCH_MX6_GPIO_H */ > > > > Why do you keep all these old ? The new > > can > > be included instead everywhere needed. > > No. The GPIO is common for all SOCs in u-boot, not only i.MX. The > common > interface requires that a asm/gpio.h exists. See common/cmd_gpio.c. Right. Best regards, Beno?t