Signed-off-by: Wolfgang Grandegger <w...@denx.de> CC: Stefano Babic <sba...@denx.de> --- arch/arm/include/asm/arch-mx5/mx5x_pins.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/arch-mx5/mx5x_pins.h b/arch/arm/include/asm/arch-mx5/mx5x_pins.h index 4e3a31b..3978bd5 100644 --- a/arch/arm/include/asm/arch-mx5/mx5x_pins.h +++ b/arch/arm/include/asm/arch-mx5/mx5x_pins.h @@ -25,6 +25,10 @@ #ifndef __ASSEMBLY__ +/* 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)) + /* * In order to identify pins more effectively, each mux-controlled pin's * enumerated value is constructed in the following way: -- 1.7.4.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot