aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@marvell.com>2011-11-08 01:15:59 -0500
committerHaojian Zhuang <haojian.zhuang@marvell.com>2011-11-14 08:07:59 -0500
commit1a8d5fab16ed9401d99d0c463b5e57bdd744c8d3 (patch)
tree4765d57cd3c18a6a24746faec196e660cb4b0385 /arch/arm/mach-mmp
parent478e223cc39ee98f9f9f0c87cb971a2fe0ce8d12 (diff)
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>
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r--arch/arm/mach-mmp/include/mach/gpio-pxa.h2
-rw-r--r--arch/arm/mach-mmp/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-mmp/include/mach/irqs.h5
-rw-r--r--arch/arm/mach-mmp/tavorevb.c1
-rw-r--r--arch/arm/mach-mmp/ttc_dkb.c7
5 files changed, 7 insertions, 9 deletions
diff --git a/arch/arm/mach-mmp/include/mach/gpio-pxa.h b/arch/arm/mach-mmp/include/mach/gpio-pxa.h
index a462d1ca214e..9b79937d7817 100644
--- a/arch/arm/mach-mmp/include/mach/gpio-pxa.h
+++ b/arch/arm/mach-mmp/include/mach/gpio-pxa.h
@@ -10,8 +10,6 @@
10#define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) 10#define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
11#define GPIO_REG(x) (GPIO_REGS_VIRT + (x)) 11#define GPIO_REG(x) (GPIO_REGS_VIRT + (x))
12 12
13#define NR_BUILTIN_GPIO IRQ_GPIO_NUM
14
15#define gpio_to_bank(gpio) ((gpio) >> 5) 13#define gpio_to_bank(gpio) ((gpio) >> 5)
16 14
17/* NOTE: these macros are defined here to make optimization of 15/* NOTE: these macros are defined here to make optimization of
diff --git a/arch/arm/mach-mmp/include/mach/gpio.h b/arch/arm/mach-mmp/include/mach/gpio.h
index 32b684aacea8..904466d7eb95 100644
--- a/arch/arm/mach-mmp/include/mach/gpio.h
+++ b/arch/arm/mach-mmp/include/mach/gpio.h
@@ -6,5 +6,4 @@
6#define __gpio_is_inverted(gpio) (0) 6#define __gpio_is_inverted(gpio) (0)
7#define __gpio_is_occupied(gpio) (0) 7#define __gpio_is_occupied(gpio) (0)
8 8
9#include <plat/gpio.h>
10#endif /* __ASM_MACH_GPIO_H */ 9#endif /* __ASM_MACH_GPIO_H */
diff --git a/arch/arm/mach-mmp/include/mach/irqs.h b/arch/arm/mach-mmp/include/mach/irqs.h
index ec95951f0983..34635a0bbb59 100644
--- a/arch/arm/mach-mmp/include/mach/irqs.h
+++ b/arch/arm/mach-mmp/include/mach/irqs.h
@@ -219,11 +219,10 @@
219#define IRQ_MMP2_MUX_END (IRQ_MMP2_SSP_BASE + 2) 219#define IRQ_MMP2_MUX_END (IRQ_MMP2_SSP_BASE + 2)
220 220
221#define IRQ_GPIO_START 128 221#define IRQ_GPIO_START 128
222#define IRQ_GPIO_NUM 192 222#define MMP_NR_BUILTIN_GPIO 192
223#define IRQ_GPIO(x) (IRQ_GPIO_START + (x))
224#define MMP_GPIO_TO_IRQ(gpio) (IRQ_GPIO_START + (gpio)) 223#define MMP_GPIO_TO_IRQ(gpio) (IRQ_GPIO_START + (gpio))
225 224
226#define IRQ_BOARD_START (IRQ_GPIO_START + IRQ_GPIO_NUM) 225#define IRQ_BOARD_START (IRQ_GPIO_START + MMP_NR_BUILTIN_GPIO)
227 226
228#define NR_IRQS (IRQ_BOARD_START) 227#define NR_IRQS (IRQ_BOARD_START)
229 228
diff --git a/arch/arm/mach-mmp/tavorevb.c b/arch/arm/mach-mmp/tavorevb.c
index 0afe3a39982f..331f5f358b59 100644
--- a/arch/arm/mach-mmp/tavorevb.c
+++ b/arch/arm/mach-mmp/tavorevb.c
@@ -19,6 +19,7 @@
19#include <mach/addr-map.h> 19#include <mach/addr-map.h>
20#include <mach/mfp-pxa910.h> 20#include <mach/mfp-pxa910.h>
21#include <mach/pxa910.h> 21#include <mach/pxa910.h>
22#include <mach/irqs.h>
22 23
23#include "common.h" 24#include "common.h"
24 25
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c
index 176515a76989..fac0d5d9d464 100644
--- a/arch/arm/mach-mmp/ttc_dkb.c
+++ b/arch/arm/mach-mmp/ttc_dkb.c
@@ -24,12 +24,13 @@
24#include <mach/addr-map.h> 24#include <mach/addr-map.h>
25#include <mach/mfp-pxa910.h> 25#include <mach/mfp-pxa910.h>
26#include <mach/pxa910.h> 26#include <mach/pxa910.h>
27#include <mach/irqs.h>
27 28
28#include "common.h" 29#include "common.h"
29 30
30#define TTCDKB_GPIO_EXT0(x) (NR_BUILTIN_GPIO + ((x < 0) ? 0 : \ 31#define TTCDKB_GPIO_EXT0(x) (MMP_NR_BUILTIN_GPIO + ((x < 0) ? 0 : \
31 ((x < 16) ? x : 15))) 32 ((x < 16) ? x : 15)))
32#define TTCDKB_GPIO_EXT1(x) (NR_BUILTIN_GPIO + 16 + ((x < 0) ? 0 : \ 33#define TTCDKB_GPIO_EXT1(x) (MMP_NR_BUILTIN_GPIO + 16 + ((x < 0) ? 0 : \
33 ((x < 16) ? x : 15))) 34 ((x < 16) ? x : 15)))
34 35
35/* 36/*
@@ -136,7 +137,7 @@ static struct i2c_board_info ttc_dkb_i2c_info[] = {
136 { 137 {
137 .type = "max7312", 138 .type = "max7312",
138 .addr = 0x23, 139 .addr = 0x23,
139 .irq = IRQ_GPIO(80), 140 .irq = MMP_GPIO_TO_IRQ(80),
140 .platform_data = &max7312_data, 141 .platform_data = &max7312_data,
141 }, 142 },
142}; 143};