Commit 3b8e285c authored by Eric Miao's avatar Eric Miao

[ARM] pxa: move declaration of 'pxa_last_gpio' into <mach/gpio.h>

Signed-off-by: default avatarEric Miao <eric.miao@marvell.com>
parent da065a0b
...@@ -20,7 +20,6 @@ extern void __init pxa3xx_init_irq(void); ...@@ -20,7 +20,6 @@ extern void __init pxa3xx_init_irq(void);
extern void __init pxa_map_io(void); extern void __init pxa_map_io(void);
extern unsigned int get_clk_frequency_khz(int info); extern unsigned int get_clk_frequency_khz(int info);
extern int pxa_last_gpio;
#define SET_BANK(__nr,__start,__size) \ #define SET_BANK(__nr,__start,__size) \
mi->bank[__nr].start = (__start), \ mi->bank[__nr].start = (__start), \
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include <mach/gpio.h> #include <mach/gpio.h>
int pxa_last_gpio;
#define GPIO0_BASE (GPIO_REGS_VIRT + 0x0000) #define GPIO0_BASE (GPIO_REGS_VIRT + 0x0000)
#define GPIO1_BASE (GPIO_REGS_VIRT + 0x0004) #define GPIO1_BASE (GPIO_REGS_VIRT + 0x0004)
#define GPIO2_BASE (GPIO_REGS_VIRT + 0x0008) #define GPIO2_BASE (GPIO_REGS_VIRT + 0x0008)
...@@ -38,8 +40,6 @@ struct pxa_gpio_chip { ...@@ -38,8 +40,6 @@ struct pxa_gpio_chip {
void __iomem *regbase; void __iomem *regbase;
}; };
int pxa_last_gpio;
static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset) static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
{ {
unsigned long flags; unsigned long flags;
......
...@@ -100,8 +100,11 @@ ...@@ -100,8 +100,11 @@
/* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85). /* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85).
* Those cases currently cause holes in the GPIO number space. * Those cases currently cause holes in the GPIO number space, the
* actual number of the last GPIO is recorded by 'pxa_last_gpio'.
*/ */
extern int pxa_last_gpio;
#define NR_BUILTIN_GPIO 128 #define NR_BUILTIN_GPIO 128
static inline int gpio_get_value(unsigned gpio) static inline int gpio_get_value(unsigned gpio)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment