Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a8d5fab authored by Haojian Zhuang's avatar Haojian Zhuang
Browse files

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: default avatarHaojian Zhuang <haojian.zhuang@marvell.com>
parent 478e223c
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -10,8 +10,6 @@
#define BANK_OFF(n)	(((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
#define BANK_OFF(n)	(((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
#define GPIO_REG(x)	(GPIO_REGS_VIRT + (x))
#define GPIO_REG(x)	(GPIO_REGS_VIRT + (x))


#define NR_BUILTIN_GPIO		IRQ_GPIO_NUM

#define gpio_to_bank(gpio)	((gpio) >> 5)
#define gpio_to_bank(gpio)	((gpio) >> 5)


/* NOTE: these macros are defined here to make optimization of
/* NOTE: these macros are defined here to make optimization of
+0 −1
Original line number Original line Diff line number Diff line
@@ -6,5 +6,4 @@
#define __gpio_is_inverted(gpio)	(0)
#define __gpio_is_inverted(gpio)	(0)
#define __gpio_is_occupied(gpio)	(0)
#define __gpio_is_occupied(gpio)	(0)


#include <plat/gpio.h>
#endif /* __ASM_MACH_GPIO_H */
#endif /* __ASM_MACH_GPIO_H */
+2 −3
Original line number Original line Diff line number Diff line
@@ -219,11 +219,10 @@
#define IRQ_MMP2_MUX_END		(IRQ_MMP2_SSP_BASE + 2)
#define IRQ_MMP2_MUX_END		(IRQ_MMP2_SSP_BASE + 2)


#define IRQ_GPIO_START			128
#define IRQ_GPIO_START			128
#define IRQ_GPIO_NUM			192
#define MMP_NR_BUILTIN_GPIO		192
#define IRQ_GPIO(x)			(IRQ_GPIO_START + (x))
#define MMP_GPIO_TO_IRQ(gpio)		(IRQ_GPIO_START + (gpio))
#define MMP_GPIO_TO_IRQ(gpio)		(IRQ_GPIO_START + (gpio))


#define IRQ_BOARD_START			(IRQ_GPIO_START + IRQ_GPIO_NUM)
#define IRQ_BOARD_START			(IRQ_GPIO_START + MMP_NR_BUILTIN_GPIO)


#define NR_IRQS				(IRQ_BOARD_START)
#define NR_IRQS				(IRQ_BOARD_START)


+1 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@
#include <mach/addr-map.h>
#include <mach/addr-map.h>
#include <mach/mfp-pxa910.h>
#include <mach/mfp-pxa910.h>
#include <mach/pxa910.h>
#include <mach/pxa910.h>
#include <mach/irqs.h>


#include "common.h"
#include "common.h"


+4 −3
Original line number Original line Diff line number Diff line
@@ -24,12 +24,13 @@
#include <mach/addr-map.h>
#include <mach/addr-map.h>
#include <mach/mfp-pxa910.h>
#include <mach/mfp-pxa910.h>
#include <mach/pxa910.h>
#include <mach/pxa910.h>
#include <mach/irqs.h>


#include "common.h"
#include "common.h"


#define TTCDKB_GPIO_EXT0(x)	(NR_BUILTIN_GPIO + ((x < 0) ? 0 :	\
#define TTCDKB_GPIO_EXT0(x)	(MMP_NR_BUILTIN_GPIO + ((x < 0) ? 0 :	\
				((x < 16) ? x : 15)))
				((x < 16) ? x : 15)))
#define TTCDKB_GPIO_EXT1(x)	(NR_BUILTIN_GPIO + 16 + ((x < 0) ? 0 :	\
#define TTCDKB_GPIO_EXT1(x)	(MMP_NR_BUILTIN_GPIO + 16 + ((x < 0) ? 0 : \
				((x < 16) ? x : 15)))
				((x < 16) ? x : 15)))


/*
/*
@@ -136,7 +137,7 @@ static struct i2c_board_info ttc_dkb_i2c_info[] = {
	{
	{
		.type		= "max7312",
		.type		= "max7312",
		.addr		= 0x23,
		.addr		= 0x23,
		.irq		= IRQ_GPIO(80),
		.irq		= MMP_GPIO_TO_IRQ(80),
		.platform_data	= &max7312_data,
		.platform_data	= &max7312_data,
	},
	},
};
};
Loading