ARM: pxa: rename NR_BUILTIN_GPIO
NR_BUILTIN_GPIO is both defined in arch-pxa and arch-mmp. Now replace it with PXA_NR_BUILTIN_GPIO and MMP_NR_BUILTIN_GPIO. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
#ifndef __PLAT_GPIO_H
|
||||
#define __PLAT_GPIO_H
|
||||
|
||||
#define __ARM_GPIOLIB_COMPLEX
|
||||
|
||||
/* The individual machine provides register offsets and NR_BUILTIN_GPIO */
|
||||
#include <mach/gpio-pxa.h>
|
||||
|
||||
static inline int gpio_get_value(unsigned gpio)
|
||||
{
|
||||
if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO))
|
||||
return GPLR(gpio) & GPIO_bit(gpio);
|
||||
else
|
||||
return __gpio_get_value(gpio);
|
||||
}
|
||||
|
||||
static inline void gpio_set_value(unsigned gpio, int value)
|
||||
{
|
||||
if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO)) {
|
||||
if (value)
|
||||
GPSR(gpio) = GPIO_bit(gpio);
|
||||
else
|
||||
GPCR(gpio) = GPIO_bit(gpio);
|
||||
} else
|
||||
__gpio_set_value(gpio, value);
|
||||
}
|
||||
|
||||
#define gpio_cansleep __gpio_cansleep
|
||||
|
||||
#endif /* __PLAT_GPIO_H */
|
Reference in New Issue
Block a user