From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Wed, 14 Sep 2011 09:25:28 +0200 Subject: [U-Boot] [PATCH 06/15] iMX28: Add GPIO control In-Reply-To: <1315800409-19876-7-git-send-email-marek.vasut@gmail.com> References: <1315800409-19876-1-git-send-email-marek.vasut@gmail.com> <1315800409-19876-7-git-send-email-marek.vasut@gmail.com> Message-ID: <4E7056E8.2050509@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 09/12/2011 06:06 AM, Marek Vasut wrote: > Signed-off-by: Marek Vasut > Cc: Stefano Babic > Cc: Wolfgang Denk > Cc: Detlev Zundel > --- Hi Marek, > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#if defined(CONFIG_MX23) > +#define PINCTRL_BANKS 3 > +#define PINCTRL_DOUT(n) (0x0500 + ((n) * 0x10)) > +#define PINCTRL_DIN(n) (0x0600 + ((n) * 0x10)) > +#define PINCTRL_DOE(n) (0x0700 + ((n) * 0x10)) > +#define PINCTRL_PIN2IRQ(n) (0x0800 + ((n) * 0x10)) > +#define PINCTRL_IRQEN(n) (0x0900 + ((n) * 0x10)) > +#define PINCTRL_IRQSTAT(n) (0x0c00 + ((n) * 0x10)) > +#elif defined(CONFIG_MX28) > +#define PINCTRL_BANKS 5 > +#define PINCTRL_DOUT(n) (0x0700 + ((n) * 0x10)) > +#define PINCTRL_DIN(n) (0x0900 + ((n) * 0x10)) > +#define PINCTRL_DOE(n) (0x0b00 + ((n) * 0x10)) > +#define PINCTRL_PIN2IRQ(n) (0x1000 + ((n) * 0x10)) > +#define PINCTRL_IRQEN(n) (0x1100 + ((n) * 0x10)) > +#define PINCTRL_IRQSTAT(n) (0x1400 + ((n) * 0x10)) > +#else > +#error "Please select CONFIG_MX23 or CONFIG_MX28" > +#endif Only to remark: I know that at the moment we have not CONFIG_MX23 in u-boot and the MX23 part is dead code. However, the added part is very small and clear visible, and I agree to let it in code even if it breaks this u-boot rule. Acked-by: Stefano Babic 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 =====================================================================