aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-08-13 12:14:05 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-17 02:31:57 -0400
commit1dfa86bb9d3fe7581d3182c24a812c8910cbee37 (patch)
tree6b2d36cd994c322e5ee4534f3c36a0cb7eed3a73
parenta4395612290c7b70041952add7ad75b534c8b40c (diff)
arm/mxc: move IMX_GPIO_NR into mach/hardware.h
The patch moves IMX_GPIO_NR into mach/hardware.h, so that we only use standard gpiolib helpers in mach/gpio.h. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/plat-mxc/include/mach/gpio.h5
-rw-r--r--arch/arm/plat-mxc/include/mach/hardware.h4
2 files changed, 4 insertions, 5 deletions
diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h
index 72c3ed1cddd5..44af0064ba1a 100644
--- a/arch/arm/plat-mxc/include/mach/gpio.h
+++ b/arch/arm/plat-mxc/include/mach/gpio.h
@@ -23,11 +23,6 @@
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <asm-generic/gpio.h> 24#include <asm-generic/gpio.h>
25 25
26
27/* There's a off-by-one betweem the gpio bank number and the gpiochip */
28/* range e.g. GPIO_1_5 is gpio 5 under linux */
29#define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr))
30
31/* use gpiolib dispatchers */ 26/* use gpiolib dispatchers */
32#define gpio_get_value __gpio_get_value 27#define gpio_get_value __gpio_get_value
33#define gpio_set_value __gpio_set_value 28#define gpio_set_value __gpio_set_value
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
index 77f6556f59a7..f57ec47d6fd5 100644
--- a/arch/arm/plat-mxc/include/mach/hardware.h
+++ b/arch/arm/plat-mxc/include/mach/hardware.h
@@ -116,6 +116,10 @@
116 .type = _type, \ 116 .type = _type, \
117} 117}
118 118
119/* There's a off-by-one betweem the gpio bank number and the gpiochip */
120/* range e.g. GPIO_1_5 is gpio 5 under linux */
121#define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr))
122
119#define IMX_GPIO_TO_IRQ(gpio) (MXC_GPIO_IRQ_START + (gpio)) 123#define IMX_GPIO_TO_IRQ(gpio) (MXC_GPIO_IRQ_START + (gpio))
120 124
121#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */ 125#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */