]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/arm/plat-mxc/include/mach/hardware.h
Merge branches 'cleanups/assorted' and 'cleanups/mm-tzic' into imx-cleanup
[karo-tx-linux.git] / arch / arm / plat-mxc / include / mach / hardware.h
index 264a2ee518f8d725a7b01fb8fc934083689aa906..eba3118adfbbe844acc98452c3561e76b958ed17 100644 (file)
        .type = _type,                                                  \
 }
 
+/* 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 IMX_GPIO_TO_IRQ(gpio)  (MXC_GPIO_IRQ_START + (gpio))
+
 #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */