]> git.sur5r.net Git - u-boot/blobdiff - include/mxc_gpio.h
omap4: increase SRAM budget to fix build error
[u-boot] / include / mxc_gpio.h
index 002ba61e00679ab4417a4d73db11e6e5f6eb3e99..f673dcecd690fb0c1e726a7ff3699a0837db61c6 100644 (file)
 #ifndef __MXC_GPIO_H
 #define __MXC_GPIO_H
 
+/* Converts a GPIO port number and the internal bit position
+ * to the GPIO number
+ */
+#define MXC_GPIO_PORT_TO_NUM(port, bit) (((port - 1) << 5) + (bit & 0x1f))
+
 enum mxc_gpio_direction {
        MXC_GPIO_DIRECTION_IN,
        MXC_GPIO_DIRECTION_OUT,