diff options
Diffstat (limited to 'arch/arm/mach-s5pc100/include/mach/gpio.h')
-rw-r--r-- | arch/arm/mach-s5pc100/include/mach/gpio.h | 95 |
1 files changed, 42 insertions, 53 deletions
diff --git a/arch/arm/mach-s5pc100/include/mach/gpio.h b/arch/arm/mach-s5pc100/include/mach/gpio.h index 2c4cbe8ee6b7..29a8a12d9b4f 100644 --- a/arch/arm/mach-s5pc100/include/mach/gpio.h +++ b/arch/arm/mach-s5pc100/include/mach/gpio.h | |||
@@ -12,6 +12,9 @@ | |||
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #ifndef __ASM_ARCH_GPIO_H | ||
16 | #define __ASM_ARCH_GPIO_H __FILE__ | ||
17 | |||
15 | #define gpio_get_value __gpio_get_value | 18 | #define gpio_get_value __gpio_get_value |
16 | #define gpio_set_value __gpio_set_value | 19 | #define gpio_set_value __gpio_set_value |
17 | #define gpio_cansleep __gpio_cansleep | 20 | #define gpio_cansleep __gpio_cansleep |
@@ -52,11 +55,6 @@ | |||
52 | #define S5PC100_GPIO_L2_NR (8) | 55 | #define S5PC100_GPIO_L2_NR (8) |
53 | #define S5PC100_GPIO_L3_NR (8) | 56 | #define S5PC100_GPIO_L3_NR (8) |
54 | #define S5PC100_GPIO_L4_NR (8) | 57 | #define S5PC100_GPIO_L4_NR (8) |
55 | #define S5PC100_GPIO_MP00_NR (8) | ||
56 | #define S5PC100_GPIO_MP01_NR (8) | ||
57 | #define S5PC100_GPIO_MP02_NR (8) | ||
58 | #define S5PC100_GPIO_MP03_NR (8) | ||
59 | #define S5PC100_GPIO_MP04_NR (5) | ||
60 | 58 | ||
61 | /* GPIO bank numbes */ | 59 | /* GPIO bank numbes */ |
62 | 60 | ||
@@ -65,50 +63,45 @@ | |||
65 | * change from one gpio bank to another can be caught. | 63 | * change from one gpio bank to another can be caught. |
66 | */ | 64 | */ |
67 | 65 | ||
68 | #define S5PC1XX_GPIO_NEXT(__gpio) \ | 66 | #define S5PC100_GPIO_NEXT(__gpio) \ |
69 | ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1) | 67 | ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1) |
70 | 68 | ||
71 | enum s3c_gpio_number { | 69 | enum s5p_gpio_number { |
72 | S5PC100_GPIO_A0_START = 0, | 70 | S5PC100_GPIO_A0_START = 0, |
73 | S5PC100_GPIO_A1_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_A0), | 71 | S5PC100_GPIO_A1_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_A0), |
74 | S5PC100_GPIO_B_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_A1), | 72 | S5PC100_GPIO_B_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_A1), |
75 | S5PC100_GPIO_C_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_B), | 73 | S5PC100_GPIO_C_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_B), |
76 | S5PC100_GPIO_D_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_C), | 74 | S5PC100_GPIO_D_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_C), |
77 | S5PC100_GPIO_E0_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_D), | 75 | S5PC100_GPIO_E0_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_D), |
78 | S5PC100_GPIO_E1_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_E0), | 76 | S5PC100_GPIO_E1_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_E0), |
79 | S5PC100_GPIO_F0_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_E1), | 77 | S5PC100_GPIO_F0_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_E1), |
80 | S5PC100_GPIO_F1_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_F0), | 78 | S5PC100_GPIO_F1_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_F0), |
81 | S5PC100_GPIO_F2_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_F1), | 79 | S5PC100_GPIO_F2_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_F1), |
82 | S5PC100_GPIO_F3_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_F2), | 80 | S5PC100_GPIO_F3_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_F2), |
83 | S5PC100_GPIO_G0_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_F3), | 81 | S5PC100_GPIO_G0_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_F3), |
84 | S5PC100_GPIO_G1_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_G0), | 82 | S5PC100_GPIO_G1_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_G0), |
85 | S5PC100_GPIO_G2_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_G1), | 83 | S5PC100_GPIO_G2_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_G1), |
86 | S5PC100_GPIO_G3_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_G2), | 84 | S5PC100_GPIO_G3_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_G2), |
87 | S5PC100_GPIO_H0_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_G3), | 85 | S5PC100_GPIO_H0_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_G3), |
88 | S5PC100_GPIO_H1_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_H0), | 86 | S5PC100_GPIO_H1_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_H0), |
89 | S5PC100_GPIO_H2_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_H1), | 87 | S5PC100_GPIO_H2_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_H1), |
90 | S5PC100_GPIO_H3_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_H2), | 88 | S5PC100_GPIO_H3_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_H2), |
91 | S5PC100_GPIO_I_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_H3), | 89 | S5PC100_GPIO_I_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_H3), |
92 | S5PC100_GPIO_J0_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_I), | 90 | S5PC100_GPIO_J0_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_I), |
93 | S5PC100_GPIO_J1_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_J0), | 91 | S5PC100_GPIO_J1_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_J0), |
94 | S5PC100_GPIO_J2_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_J1), | 92 | S5PC100_GPIO_J2_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_J1), |
95 | S5PC100_GPIO_J3_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_J2), | 93 | S5PC100_GPIO_J3_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_J2), |
96 | S5PC100_GPIO_J4_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_J3), | 94 | S5PC100_GPIO_J4_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_J3), |
97 | S5PC100_GPIO_K0_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_J4), | 95 | S5PC100_GPIO_K0_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_J4), |
98 | S5PC100_GPIO_K1_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_K0), | 96 | S5PC100_GPIO_K1_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_K0), |
99 | S5PC100_GPIO_K2_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_K1), | 97 | S5PC100_GPIO_K2_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_K1), |
100 | S5PC100_GPIO_K3_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_K2), | 98 | S5PC100_GPIO_K3_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_K2), |
101 | S5PC100_GPIO_L0_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_K3), | 99 | S5PC100_GPIO_L0_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_K3), |
102 | S5PC100_GPIO_L1_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_L0), | 100 | S5PC100_GPIO_L1_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_L0), |
103 | S5PC100_GPIO_L2_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_L1), | 101 | S5PC100_GPIO_L2_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_L1), |
104 | S5PC100_GPIO_L3_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_L2), | 102 | S5PC100_GPIO_L3_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_L2), |
105 | S5PC100_GPIO_L4_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_L3), | 103 | S5PC100_GPIO_L4_START = S5PC100_GPIO_NEXT(S5PC100_GPIO_L3), |
106 | S5PC100_GPIO_MP00_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_L4), | 104 | S5PC100_GPIO_END = S5PC100_GPIO_NEXT(S5PC100_GPIO_L4), |
107 | S5PC100_GPIO_MP01_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_MP00), | ||
108 | S5PC100_GPIO_MP02_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_MP01), | ||
109 | S5PC100_GPIO_MP03_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_MP02), | ||
110 | S5PC100_GPIO_MP04_START = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_MP03), | ||
111 | S5PC100_GPIO_END = S5PC1XX_GPIO_NEXT(S5PC100_GPIO_MP04), | ||
112 | }; | 105 | }; |
113 | 106 | ||
114 | /* S5PC100 GPIO number definitions. */ | 107 | /* S5PC100 GPIO number definitions. */ |
@@ -146,17 +139,13 @@ enum s3c_gpio_number { | |||
146 | #define S5PC100_GPL2(_nr) (S5PC100_GPIO_L2_START + (_nr)) | 139 | #define S5PC100_GPL2(_nr) (S5PC100_GPIO_L2_START + (_nr)) |
147 | #define S5PC100_GPL3(_nr) (S5PC100_GPIO_L3_START + (_nr)) | 140 | #define S5PC100_GPL3(_nr) (S5PC100_GPIO_L3_START + (_nr)) |
148 | #define S5PC100_GPL4(_nr) (S5PC100_GPIO_L4_START + (_nr)) | 141 | #define S5PC100_GPL4(_nr) (S5PC100_GPIO_L4_START + (_nr)) |
149 | #define S5PC100_MP00(_nr) (S5PC100_GPIO_MP00_START + (_nr)) | ||
150 | #define S5PC100_MP01(_nr) (S5PC100_GPIO_MP01_START + (_nr)) | ||
151 | #define S5PC100_MP02(_nr) (S5PC100_GPIO_MP02_START + (_nr)) | ||
152 | #define S5PC100_MP03(_nr) (S5PC100_GPIO_MP03_START + (_nr)) | ||
153 | #define S5PC100_MP04(_nr) (S5PC100_GPIO_MP04_START + (_nr)) | ||
154 | #define S5PC100_MP05(_nr) (S5PC100_GPIO_MP05_START + (_nr)) | ||
155 | 142 | ||
156 | /* It used the end of the S5PC1XX gpios */ | 143 | /* It used the end of the S5PC100 gpios */ |
157 | #define S3C_GPIO_END S5PC100_GPIO_END | 144 | #define S3C_GPIO_END S5PC100_GPIO_END |
158 | 145 | ||
159 | /* define the number of gpios we need to the one after the MP04() range */ | 146 | /* define the number of gpios we need to the one after the MP04() range */ |
160 | #define ARCH_NR_GPIOS (S5PC100_GPIO_END + 1) | 147 | #define ARCH_NR_GPIOS (S5PC100_GPIO_END + 1) |
161 | 148 | ||
162 | #include <asm-generic/gpio.h> | 149 | #include <asm-generic/gpio.h> |
150 | |||
151 | #endif /* __ASM_ARCH_GPIO_H */ | ||