diff options
author | Haojian Zhuang <haojian.zhuang@marvell.com> | 2011-11-08 01:15:59 -0500 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@marvell.com> | 2011-11-14 08:07:59 -0500 |
commit | 1a8d5fab16ed9401d99d0c463b5e57bdd744c8d3 (patch) | |
tree | 4765d57cd3c18a6a24746faec196e660cb4b0385 | |
parent | 478e223cc39ee98f9f9f0c87cb971a2fe0ce8d12 (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>
-rw-r--r-- | arch/arm/mach-mmp/include/mach/gpio-pxa.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/gpio.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/irqs.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-mmp/tavorevb.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mmp/ttc_dkb.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/corgi.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/gpio-pxa.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/gpio.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/hx4700.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/irqs.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/littleton.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/magician.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/poodle.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/spitz.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/tosa.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pcm990-baseboard.c | 6 | ||||
-rw-r--r-- | arch/arm/plat-pxa/include/plat/gpio.h | 30 |
17 files changed, 23 insertions, 58 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 | }; |
diff --git a/arch/arm/mach-pxa/include/mach/corgi.h b/arch/arm/mach-pxa/include/mach/corgi.h index c9f86172520e..f3c3493b468d 100644 --- a/arch/arm/mach-pxa/include/mach/corgi.h +++ b/arch/arm/mach-pxa/include/mach/corgi.h | |||
@@ -98,7 +98,7 @@ | |||
98 | CORGI_SCP_MIC_BIAS ) | 98 | CORGI_SCP_MIC_BIAS ) |
99 | #define CORGI_SCOOP_IO_OUT ( CORGI_SCP_MUTE_L | CORGI_SCP_MUTE_R ) | 99 | #define CORGI_SCOOP_IO_OUT ( CORGI_SCP_MUTE_L | CORGI_SCP_MUTE_R ) |
100 | 100 | ||
101 | #define CORGI_SCOOP_GPIO_BASE (NR_BUILTIN_GPIO) | 101 | #define CORGI_SCOOP_GPIO_BASE (PXA_NR_BUILTIN_GPIO) |
102 | #define CORGI_GPIO_LED_GREEN (CORGI_SCOOP_GPIO_BASE + 0) | 102 | #define CORGI_GPIO_LED_GREEN (CORGI_SCOOP_GPIO_BASE + 0) |
103 | #define CORGI_GPIO_SWA (CORGI_SCOOP_GPIO_BASE + 1) /* Hinge Switch A */ | 103 | #define CORGI_GPIO_SWA (CORGI_SCOOP_GPIO_BASE + 1) /* Hinge Switch A */ |
104 | #define CORGI_GPIO_SWB (CORGI_SCOOP_GPIO_BASE + 2) /* Hinge Switch B */ | 104 | #define CORGI_GPIO_SWB (CORGI_SCOOP_GPIO_BASE + 2) /* Hinge Switch B */ |
diff --git a/arch/arm/mach-pxa/include/mach/gpio-pxa.h b/arch/arm/mach-pxa/include/mach/gpio-pxa.h index 41b4c93a96c2..134b3bc332cd 100644 --- a/arch/arm/mach-pxa/include/mach/gpio-pxa.h +++ b/arch/arm/mach-pxa/include/mach/gpio-pxa.h | |||
@@ -93,8 +93,6 @@ | |||
93 | #define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2)) | 93 | #define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2)) |
94 | 94 | ||
95 | 95 | ||
96 | #define NR_BUILTIN_GPIO PXA_GPIO_IRQ_NUM | ||
97 | |||
98 | #define gpio_to_bank(gpio) ((gpio) >> 5) | 96 | #define gpio_to_bank(gpio) ((gpio) >> 5) |
99 | 97 | ||
100 | #ifdef CONFIG_CPU_PXA26x | 98 | #ifdef CONFIG_CPU_PXA26x |
diff --git a/arch/arm/mach-pxa/include/mach/gpio.h b/arch/arm/mach-pxa/include/mach/gpio.h index 5cf0137e64d9..561cdbfd7ccf 100644 --- a/arch/arm/mach-pxa/include/mach/gpio.h +++ b/arch/arm/mach-pxa/include/mach/gpio.h | |||
@@ -28,5 +28,4 @@ | |||
28 | /* The defines for the driver are needed for the accelerated accessors */ | 28 | /* The defines for the driver are needed for the accelerated accessors */ |
29 | #include "gpio-pxa.h" | 29 | #include "gpio-pxa.h" |
30 | 30 | ||
31 | #include <plat/gpio.h> | ||
32 | #endif | 31 | #endif |
diff --git a/arch/arm/mach-pxa/include/mach/hx4700.h b/arch/arm/mach-pxa/include/mach/hx4700.h index 37408449ec25..8bc02913517c 100644 --- a/arch/arm/mach-pxa/include/mach/hx4700.h +++ b/arch/arm/mach-pxa/include/mach/hx4700.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
16 | #include <linux/mfd/asic3.h> | 16 | #include <linux/mfd/asic3.h> |
17 | 17 | ||
18 | #define HX4700_ASIC3_GPIO_BASE NR_BUILTIN_GPIO | 18 | #define HX4700_ASIC3_GPIO_BASE PXA_NR_BUILTIN_GPIO |
19 | #define HX4700_EGPIO_BASE (HX4700_ASIC3_GPIO_BASE + ASIC3_NUM_GPIOS) | 19 | #define HX4700_EGPIO_BASE (HX4700_ASIC3_GPIO_BASE + ASIC3_NUM_GPIOS) |
20 | #define HX4700_NR_IRQS (IRQ_BOARD_START + 70) | 20 | #define HX4700_NR_IRQS (IRQ_BOARD_START + 70) |
21 | 21 | ||
diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h index b83d8ff4eae8..32975adf3ca4 100644 --- a/arch/arm/mach-pxa/include/mach/irqs.h +++ b/arch/arm/mach-pxa/include/mach/irqs.h | |||
@@ -88,7 +88,7 @@ | |||
88 | #define IRQ_U2P PXA_IRQ(93) /* USB PHY D+/D- Lines (PXA935) */ | 88 | #define IRQ_U2P PXA_IRQ(93) /* USB PHY D+/D- Lines (PXA935) */ |
89 | 89 | ||
90 | #define PXA_GPIO_IRQ_BASE PXA_IRQ(96) | 90 | #define PXA_GPIO_IRQ_BASE PXA_IRQ(96) |
91 | #define PXA_GPIO_IRQ_NUM (192) | 91 | #define PXA_NR_BUILTIN_GPIO (192) |
92 | #define PXA_GPIO_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) | 92 | #define PXA_GPIO_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) |
93 | 93 | ||
94 | /* | 94 | /* |
@@ -98,7 +98,7 @@ | |||
98 | * By default, no board IRQ is reserved. It should be finished in | 98 | * By default, no board IRQ is reserved. It should be finished in |
99 | * custom board since sparse IRQ is already enabled. | 99 | * custom board since sparse IRQ is already enabled. |
100 | */ | 100 | */ |
101 | #define IRQ_BOARD_START (PXA_GPIO_IRQ_BASE + PXA_GPIO_IRQ_NUM) | 101 | #define IRQ_BOARD_START (PXA_GPIO_IRQ_BASE + PXA_NR_BUILTIN_GPIO) |
102 | 102 | ||
103 | #define NR_IRQS (IRQ_BOARD_START) | 103 | #define NR_IRQS (IRQ_BOARD_START) |
104 | 104 | ||
diff --git a/arch/arm/mach-pxa/include/mach/littleton.h b/arch/arm/mach-pxa/include/mach/littleton.h index b6238cbd8aea..e20ac1b64b00 100644 --- a/arch/arm/mach-pxa/include/mach/littleton.h +++ b/arch/arm/mach-pxa/include/mach/littleton.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | #define LITTLETON_GPIO_LCD_CS (17) | 8 | #define LITTLETON_GPIO_LCD_CS (17) |
9 | 9 | ||
10 | #define EXT0_GPIO_BASE (NR_BUILTIN_GPIO) | 10 | #define EXT0_GPIO_BASE (PXA_NR_BUILTIN_GPIO) |
11 | #define EXT0_GPIO(x) (EXT0_GPIO_BASE + (x)) | 11 | #define EXT0_GPIO(x) (EXT0_GPIO_BASE + (x)) |
12 | 12 | ||
13 | #define LITTLETON_NR_IRQS (IRQ_BOARD_START + 8) | 13 | #define LITTLETON_NR_IRQS (IRQ_BOARD_START + 8) |
diff --git a/arch/arm/mach-pxa/include/mach/magician.h b/arch/arm/mach-pxa/include/mach/magician.h index 7cbfc5d3f9df..ba6a6e1d29e9 100644 --- a/arch/arm/mach-pxa/include/mach/magician.h +++ b/arch/arm/mach-pxa/include/mach/magician.h | |||
@@ -78,7 +78,7 @@ | |||
78 | * CPLD EGPIOs | 78 | * CPLD EGPIOs |
79 | */ | 79 | */ |
80 | 80 | ||
81 | #define MAGICIAN_EGPIO_BASE NR_BUILTIN_GPIO | 81 | #define MAGICIAN_EGPIO_BASE PXA_NR_BUILTIN_GPIO |
82 | #define MAGICIAN_EGPIO(reg,bit) \ | 82 | #define MAGICIAN_EGPIO(reg,bit) \ |
83 | (MAGICIAN_EGPIO_BASE + 8*reg + bit) | 83 | (MAGICIAN_EGPIO_BASE + 8*reg + bit) |
84 | 84 | ||
diff --git a/arch/arm/mach-pxa/include/mach/poodle.h b/arch/arm/mach-pxa/include/mach/poodle.h index 763fdc4f2b4b..f32ff75dcca8 100644 --- a/arch/arm/mach-pxa/include/mach/poodle.h +++ b/arch/arm/mach-pxa/include/mach/poodle.h | |||
@@ -71,7 +71,7 @@ | |||
71 | #define POODLE_SCOOP_IO_DIR ( POODLE_SCOOP_VPEN | POODLE_SCOOP_HS_OUT ) | 71 | #define POODLE_SCOOP_IO_DIR ( POODLE_SCOOP_VPEN | POODLE_SCOOP_HS_OUT ) |
72 | #define POODLE_SCOOP_IO_OUT ( 0 ) | 72 | #define POODLE_SCOOP_IO_OUT ( 0 ) |
73 | 73 | ||
74 | #define POODLE_SCOOP_GPIO_BASE (NR_BUILTIN_GPIO) | 74 | #define POODLE_SCOOP_GPIO_BASE (PXA_NR_BUILTIN_GPIO) |
75 | #define POODLE_GPIO_CHARGE_ON (POODLE_SCOOP_GPIO_BASE + 0) | 75 | #define POODLE_GPIO_CHARGE_ON (POODLE_SCOOP_GPIO_BASE + 0) |
76 | #define POODLE_GPIO_CP401 (POODLE_SCOOP_GPIO_BASE + 2) | 76 | #define POODLE_GPIO_CP401 (POODLE_SCOOP_GPIO_BASE + 2) |
77 | #define POODLE_GPIO_VPEN (POODLE_SCOOP_GPIO_BASE + 7) | 77 | #define POODLE_GPIO_VPEN (POODLE_SCOOP_GPIO_BASE + 7) |
diff --git a/arch/arm/mach-pxa/include/mach/spitz.h b/arch/arm/mach-pxa/include/mach/spitz.h index 273381a5c497..0bfe6507c95d 100644 --- a/arch/arm/mach-pxa/include/mach/spitz.h +++ b/arch/arm/mach-pxa/include/mach/spitz.h | |||
@@ -108,7 +108,7 @@ | |||
108 | #define SPITZ_SCP_SUS_CLR (SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON) | 108 | #define SPITZ_SCP_SUS_CLR (SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON) |
109 | #define SPITZ_SCP_SUS_SET 0 | 109 | #define SPITZ_SCP_SUS_SET 0 |
110 | 110 | ||
111 | #define SPITZ_SCP_GPIO_BASE (NR_BUILTIN_GPIO) | 111 | #define SPITZ_SCP_GPIO_BASE (PXA_NR_BUILTIN_GPIO) |
112 | #define SPITZ_GPIO_LED_GREEN (SPITZ_SCP_GPIO_BASE + 0) | 112 | #define SPITZ_GPIO_LED_GREEN (SPITZ_SCP_GPIO_BASE + 0) |
113 | #define SPITZ_GPIO_JK_B (SPITZ_SCP_GPIO_BASE + 1) | 113 | #define SPITZ_GPIO_JK_B (SPITZ_SCP_GPIO_BASE + 1) |
114 | #define SPITZ_GPIO_CHRG_ON (SPITZ_SCP_GPIO_BASE + 2) | 114 | #define SPITZ_GPIO_CHRG_ON (SPITZ_SCP_GPIO_BASE + 2) |
@@ -140,7 +140,7 @@ | |||
140 | SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS) | 140 | SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS) |
141 | #define SPITZ_SCP2_SUS_SET (SPITZ_SCP2_IR_ON | SPITZ_SCP2_RESERVED_1) | 141 | #define SPITZ_SCP2_SUS_SET (SPITZ_SCP2_IR_ON | SPITZ_SCP2_RESERVED_1) |
142 | 142 | ||
143 | #define SPITZ_SCP2_GPIO_BASE (NR_BUILTIN_GPIO + 12) | 143 | #define SPITZ_SCP2_GPIO_BASE (PXA_NR_BUILTIN_GPIO + 12) |
144 | #define SPITZ_GPIO_IR_ON (SPITZ_SCP2_GPIO_BASE + 0) | 144 | #define SPITZ_GPIO_IR_ON (SPITZ_SCP2_GPIO_BASE + 0) |
145 | #define SPITZ_GPIO_AKIN_PULLUP (SPITZ_SCP2_GPIO_BASE + 1) | 145 | #define SPITZ_GPIO_AKIN_PULLUP (SPITZ_SCP2_GPIO_BASE + 1) |
146 | #define SPITZ_GPIO_RESERVED_1 (SPITZ_SCP2_GPIO_BASE + 2) | 146 | #define SPITZ_GPIO_RESERVED_1 (SPITZ_SCP2_GPIO_BASE + 2) |
@@ -152,7 +152,7 @@ | |||
152 | #define SPITZ_GPIO_MIC_BIAS (SPITZ_SCP2_GPIO_BASE + 8) | 152 | #define SPITZ_GPIO_MIC_BIAS (SPITZ_SCP2_GPIO_BASE + 8) |
153 | 153 | ||
154 | /* Akita IO Expander GPIOs */ | 154 | /* Akita IO Expander GPIOs */ |
155 | #define AKITA_IOEXP_GPIO_BASE (NR_BUILTIN_GPIO + 12) | 155 | #define AKITA_IOEXP_GPIO_BASE (PXA_NR_BUILTIN_GPIO + 12) |
156 | #define AKITA_GPIO_RESERVED_0 (AKITA_IOEXP_GPIO_BASE + 0) | 156 | #define AKITA_GPIO_RESERVED_0 (AKITA_IOEXP_GPIO_BASE + 0) |
157 | #define AKITA_GPIO_RESERVED_1 (AKITA_IOEXP_GPIO_BASE + 1) | 157 | #define AKITA_GPIO_RESERVED_1 (AKITA_IOEXP_GPIO_BASE + 1) |
158 | #define AKITA_GPIO_MIC_BIAS (AKITA_IOEXP_GPIO_BASE + 2) | 158 | #define AKITA_GPIO_MIC_BIAS (AKITA_IOEXP_GPIO_BASE + 2) |
diff --git a/arch/arm/mach-pxa/include/mach/tosa.h b/arch/arm/mach-pxa/include/mach/tosa.h index 4653539a2acc..2bb0e862598c 100644 --- a/arch/arm/mach-pxa/include/mach/tosa.h +++ b/arch/arm/mach-pxa/include/mach/tosa.h | |||
@@ -24,7 +24,7 @@ | |||
24 | /* | 24 | /* |
25 | * SCOOP2 internal GPIOs | 25 | * SCOOP2 internal GPIOs |
26 | */ | 26 | */ |
27 | #define TOSA_SCOOP_GPIO_BASE NR_BUILTIN_GPIO | 27 | #define TOSA_SCOOP_GPIO_BASE PXA_NR_BUILTIN_GPIO |
28 | #define TOSA_SCOOP_PXA_VCORE1 SCOOP_GPCR_PA11 | 28 | #define TOSA_SCOOP_PXA_VCORE1 SCOOP_GPCR_PA11 |
29 | #define TOSA_GPIO_TC6393XB_REST_IN (TOSA_SCOOP_GPIO_BASE + 1) | 29 | #define TOSA_GPIO_TC6393XB_REST_IN (TOSA_SCOOP_GPIO_BASE + 1) |
30 | #define TOSA_GPIO_IR_POWERDWN (TOSA_SCOOP_GPIO_BASE + 2) | 30 | #define TOSA_GPIO_IR_POWERDWN (TOSA_SCOOP_GPIO_BASE + 2) |
@@ -42,7 +42,7 @@ | |||
42 | /* | 42 | /* |
43 | * SCOOP2 jacket GPIOs | 43 | * SCOOP2 jacket GPIOs |
44 | */ | 44 | */ |
45 | #define TOSA_SCOOP_JC_GPIO_BASE (NR_BUILTIN_GPIO + 12) | 45 | #define TOSA_SCOOP_JC_GPIO_BASE (PXA_NR_BUILTIN_GPIO + 12) |
46 | #define TOSA_GPIO_BT_LED (TOSA_SCOOP_JC_GPIO_BASE + 0) | 46 | #define TOSA_GPIO_BT_LED (TOSA_SCOOP_JC_GPIO_BASE + 0) |
47 | #define TOSA_GPIO_NOTE_LED (TOSA_SCOOP_JC_GPIO_BASE + 1) | 47 | #define TOSA_GPIO_NOTE_LED (TOSA_SCOOP_JC_GPIO_BASE + 1) |
48 | #define TOSA_GPIO_CHRG_ERR_LED (TOSA_SCOOP_JC_GPIO_BASE + 2) | 48 | #define TOSA_GPIO_CHRG_ERR_LED (TOSA_SCOOP_JC_GPIO_BASE + 2) |
@@ -59,7 +59,7 @@ | |||
59 | /* | 59 | /* |
60 | * TC6393XB GPIOs | 60 | * TC6393XB GPIOs |
61 | */ | 61 | */ |
62 | #define TOSA_TC6393XB_GPIO_BASE (NR_BUILTIN_GPIO + 2 * 12) | 62 | #define TOSA_TC6393XB_GPIO_BASE (PXA_NR_BUILTIN_GPIO + 2 * 12) |
63 | 63 | ||
64 | #define TOSA_GPIO_TG_ON (TOSA_TC6393XB_GPIO_BASE + 0) | 64 | #define TOSA_GPIO_TG_ON (TOSA_TC6393XB_GPIO_BASE + 0) |
65 | #define TOSA_GPIO_L_MUTE (TOSA_TC6393XB_GPIO_BASE + 1) | 65 | #define TOSA_GPIO_L_MUTE (TOSA_TC6393XB_GPIO_BASE + 1) |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index 6d38c6548b3d..abab4e2b122c 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
@@ -378,7 +378,7 @@ struct pxacamera_platform_data pcm990_pxacamera_platform_data = { | |||
378 | #include <linux/i2c/pca953x.h> | 378 | #include <linux/i2c/pca953x.h> |
379 | 379 | ||
380 | static struct pca953x_platform_data pca9536_data = { | 380 | static struct pca953x_platform_data pca9536_data = { |
381 | .gpio_base = NR_BUILTIN_GPIO, | 381 | .gpio_base = PXA_NR_BUILTIN_GPIO, |
382 | }; | 382 | }; |
383 | 383 | ||
384 | static int gpio_bus_switch = -EINVAL; | 384 | static int gpio_bus_switch = -EINVAL; |
@@ -406,9 +406,9 @@ static unsigned long pcm990_camera_query_bus_param(struct soc_camera_link *link) | |||
406 | int ret; | 406 | int ret; |
407 | 407 | ||
408 | if (gpio_bus_switch < 0) { | 408 | if (gpio_bus_switch < 0) { |
409 | ret = gpio_request(NR_BUILTIN_GPIO, "camera"); | 409 | ret = gpio_request(PXA_NR_BUILTIN_GPIO, "camera"); |
410 | if (!ret) { | 410 | if (!ret) { |
411 | gpio_bus_switch = NR_BUILTIN_GPIO; | 411 | gpio_bus_switch = PXA_NR_BUILTIN_GPIO; |
412 | gpio_direction_output(gpio_bus_switch, 0); | 412 | gpio_direction_output(gpio_bus_switch, 0); |
413 | } | 413 | } |
414 | } | 414 | } |
diff --git a/arch/arm/plat-pxa/include/plat/gpio.h b/arch/arm/plat-pxa/include/plat/gpio.h deleted file mode 100644 index 258f77210b02..000000000000 --- a/arch/arm/plat-pxa/include/plat/gpio.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | #ifndef __PLAT_GPIO_H | ||
2 | #define __PLAT_GPIO_H | ||
3 | |||
4 | #define __ARM_GPIOLIB_COMPLEX | ||
5 | |||
6 | /* The individual machine provides register offsets and NR_BUILTIN_GPIO */ | ||
7 | #include <mach/gpio-pxa.h> | ||
8 | |||
9 | static inline int gpio_get_value(unsigned gpio) | ||
10 | { | ||
11 | if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO)) | ||
12 | return GPLR(gpio) & GPIO_bit(gpio); | ||
13 | else | ||
14 | return __gpio_get_value(gpio); | ||
15 | } | ||
16 | |||
17 | static inline void gpio_set_value(unsigned gpio, int value) | ||
18 | { | ||
19 | if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO)) { | ||
20 | if (value) | ||
21 | GPSR(gpio) = GPIO_bit(gpio); | ||
22 | else | ||
23 | GPCR(gpio) = GPIO_bit(gpio); | ||
24 | } else | ||
25 | __gpio_set_value(gpio, value); | ||
26 | } | ||
27 | |||
28 | #define gpio_cansleep __gpio_cansleep | ||
29 | |||
30 | #endif /* __PLAT_GPIO_H */ | ||