No subject
Fri Oct 22 17:57:35 EDT 2010
Signed-off-by: Marc Reilly <marc at cpdesign.com.au>
---
arch/arm/mach-imx/include/mach/imx-regs.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-imx/include/mach/imx-regs.h b/arch/arm/mach-imx/include/mach/imx-regs.h
index 605d320..a234621 100644
--- a/arch/arm/mach-imx/include/mach/imx-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx-regs.h
@@ -57,6 +57,10 @@
# error "unknown i.MX soc type"
#endif
+/* There's a off-by-one betweem the gpio bank number and the gpiochip */
+/* range e.g. GPIO_1_5 is gpio 5 under linux */
+#define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr))
+
#define GPIO_PIN_MASK 0x1f
#define GPIO_PORT_SHIFT 5
--
1.7.1
More information about the barebox
mailing list