diff options
author | Eric Miao <eric.miao@marvell.com> | 2009-01-20 04:20:56 -0500 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2009-03-22 22:11:34 -0400 |
commit | a7a89d9621ba877ae45784cf7d000182075df9c1 (patch) | |
tree | a6baf058a43f72088750af59c3d78ee3f512a69d /arch/arm/mach-mmp | |
parent | e2bb6650ef94c64723e2dd35ab92410b9477bc64 (diff) |
[ARM] pxa: add MFP support for pxa168
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r-- | arch/arm/mach-mmp/include/mach/mfp-pxa168.h | 258 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/mfp.h | 37 | ||||
-rw-r--r-- | arch/arm/mach-mmp/pxa168.c | 15 |
3 files changed, 310 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h new file mode 100644 index 000000000000..d0bdb6e3682b --- /dev/null +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h | |||
@@ -0,0 +1,258 @@ | |||
1 | #ifndef __ASM_MACH_MFP_PXA168_H | ||
2 | #define __ASM_MACH_MFP_PXA168_H | ||
3 | |||
4 | #include <mach/mfp.h> | ||
5 | |||
6 | /* GPIO */ | ||
7 | #define GPIO0_GPIO MFP_CFG(GPIO0, AF5) | ||
8 | #define GPIO1_GPIO MFP_CFG(GPIO1, AF5) | ||
9 | #define GPIO2_GPIO MFP_CFG(GPIO2, AF5) | ||
10 | #define GPIO3_GPIO MFP_CFG(GPIO3, AF5) | ||
11 | #define GPIO4_GPIO MFP_CFG(GPIO4, AF5) | ||
12 | #define GPIO5_GPIO MFP_CFG(GPIO5, AF5) | ||
13 | #define GPIO6_GPIO MFP_CFG(GPIO6, AF5) | ||
14 | #define GPIO7_GPIO MFP_CFG(GPIO7, AF5) | ||
15 | #define GPIO8_GPIO MFP_CFG(GPIO8, AF5) | ||
16 | #define GPIO9_GPIO MFP_CFG(GPIO9, AF5) | ||
17 | #define GPIO10_GPIO MFP_CFG(GPIO10, AF5) | ||
18 | #define GPIO11_GPIO MFP_CFG(GPIO11, AF5) | ||
19 | #define GPIO12_GPIO MFP_CFG(GPIO12, AF5) | ||
20 | #define GPIO13_GPIO MFP_CFG(GPIO13, AF5) | ||
21 | #define GPIO14_GPIO MFP_CFG(GPIO14, AF5) | ||
22 | #define GPIO15_GPIO MFP_CFG(GPIO15, AF5) | ||
23 | #define GPIO16_GPIO MFP_CFG(GPIO16, AF0) | ||
24 | #define GPIO17_GPIO MFP_CFG(GPIO17, AF5) | ||
25 | #define GPIO18_GPIO MFP_CFG(GPIO18, AF0) | ||
26 | #define GPIO19_GPIO MFP_CFG(GPIO19, AF5) | ||
27 | #define GPIO20_GPIO MFP_CFG(GPIO20, AF0) | ||
28 | #define GPIO21_GPIO MFP_CFG(GPIO21, AF5) | ||
29 | #define GPIO22_GPIO MFP_CFG(GPIO22, AF5) | ||
30 | #define GPIO23_GPIO MFP_CFG(GPIO23, AF5) | ||
31 | #define GPIO24_GPIO MFP_CFG(GPIO24, AF5) | ||
32 | #define GPIO25_GPIO MFP_CFG(GPIO25, AF5) | ||
33 | #define GPIO26_GPIO MFP_CFG(GPIO26, AF0) | ||
34 | #define GPIO27_GPIO MFP_CFG(GPIO27, AF5) | ||
35 | #define GPIO28_GPIO MFP_CFG(GPIO28, AF5) | ||
36 | #define GPIO29_GPIO MFP_CFG(GPIO29, AF5) | ||
37 | #define GPIO30_GPIO MFP_CFG(GPIO30, AF5) | ||
38 | #define GPIO31_GPIO MFP_CFG(GPIO31, AF5) | ||
39 | #define GPIO32_GPIO MFP_CFG(GPIO32, AF5) | ||
40 | #define GPIO33_GPIO MFP_CFG(GPIO33, AF5) | ||
41 | #define GPIO34_GPIO MFP_CFG(GPIO34, AF0) | ||
42 | #define GPIO35_GPIO MFP_CFG(GPIO35, AF0) | ||
43 | #define GPIO36_GPIO MFP_CFG(GPIO36, AF0) | ||
44 | #define GPIO37_GPIO MFP_CFG(GPIO37, AF0) | ||
45 | #define GPIO38_GPIO MFP_CFG(GPIO38, AF0) | ||
46 | #define GPIO39_GPIO MFP_CFG(GPIO39, AF0) | ||
47 | #define GPIO40_GPIO MFP_CFG(GPIO40, AF0) | ||
48 | #define GPIO41_GPIO MFP_CFG(GPIO41, AF0) | ||
49 | #define GPIO42_GPIO MFP_CFG(GPIO42, AF0) | ||
50 | #define GPIO43_GPIO MFP_CFG(GPIO43, AF0) | ||
51 | #define GPIO44_GPIO MFP_CFG(GPIO44, AF0) | ||
52 | #define GPIO45_GPIO MFP_CFG(GPIO45, AF0) | ||
53 | #define GPIO46_GPIO MFP_CFG(GPIO46, AF0) | ||
54 | #define GPIO47_GPIO MFP_CFG(GPIO47, AF0) | ||
55 | #define GPIO48_GPIO MFP_CFG(GPIO48, AF0) | ||
56 | #define GPIO49_GPIO MFP_CFG(GPIO49, AF0) | ||
57 | #define GPIO50_GPIO MFP_CFG(GPIO50, AF0) | ||
58 | #define GPIO51_GPIO MFP_CFG(GPIO51, AF0) | ||
59 | #define GPIO52_GPIO MFP_CFG(GPIO52, AF0) | ||
60 | #define GPIO53_GPIO MFP_CFG(GPIO53, AF0) | ||
61 | #define GPIO54_GPIO MFP_CFG(GPIO54, AF0) | ||
62 | #define GPIO55_GPIO MFP_CFG(GPIO55, AF0) | ||
63 | #define GPIO56_GPIO MFP_CFG(GPIO56, AF0) | ||
64 | #define GPIO57_GPIO MFP_CFG(GPIO57, AF0) | ||
65 | #define GPIO58_GPIO MFP_CFG(GPIO58, AF0) | ||
66 | #define GPIO59_GPIO MFP_CFG(GPIO59, AF0) | ||
67 | #define GPIO60_GPIO MFP_CFG(GPIO60, AF0) | ||
68 | #define GPIO61_GPIO MFP_CFG(GPIO61, AF0) | ||
69 | #define GPIO62_GPIO MFP_CFG(GPIO62, AF0) | ||
70 | #define GPIO63_GPIO MFP_CFG(GPIO63, AF0) | ||
71 | #define GPIO64_GPIO MFP_CFG(GPIO64, AF0) | ||
72 | #define GPIO65_GPIO MFP_CFG(GPIO65, AF0) | ||
73 | #define GPIO66_GPIO MFP_CFG(GPIO66, AF0) | ||
74 | #define GPIO67_GPIO MFP_CFG(GPIO67, AF0) | ||
75 | #define GPIO68_GPIO MFP_CFG(GPIO68, AF0) | ||
76 | #define GPIO69_GPIO MFP_CFG(GPIO69, AF0) | ||
77 | #define GPIO70_GPIO MFP_CFG(GPIO70, AF0) | ||
78 | #define GPIO71_GPIO MFP_CFG(GPIO71, AF0) | ||
79 | #define GPIO72_GPIO MFP_CFG(GPIO72, AF0) | ||
80 | #define GPIO73_GPIO MFP_CFG(GPIO73, AF0) | ||
81 | #define GPIO74_GPIO MFP_CFG(GPIO74, AF0) | ||
82 | #define GPIO75_GPIO MFP_CFG(GPIO75, AF0) | ||
83 | #define GPIO76_GPIO MFP_CFG(GPIO76, AF0) | ||
84 | #define GPIO77_GPIO MFP_CFG(GPIO77, AF0) | ||
85 | #define GPIO78_GPIO MFP_CFG(GPIO78, AF0) | ||
86 | #define GPIO79_GPIO MFP_CFG(GPIO79, AF0) | ||
87 | #define GPIO80_GPIO MFP_CFG(GPIO80, AF0) | ||
88 | #define GPIO81_GPIO MFP_CFG(GPIO81, AF0) | ||
89 | #define GPIO82_GPIO MFP_CFG(GPIO82, AF0) | ||
90 | #define GPIO83_GPIO MFP_CFG(GPIO83, AF0) | ||
91 | #define GPIO84_GPIO MFP_CFG(GPIO84, AF0) | ||
92 | #define GPIO85_GPIO MFP_CFG(GPIO85, AF0) | ||
93 | #define GPIO86_GPIO MFP_CFG(GPIO86, AF0) | ||
94 | #define GPIO87_GPIO MFP_CFG(GPIO87, AF0) | ||
95 | #define GPIO88_GPIO MFP_CFG(GPIO88, AF0) | ||
96 | #define GPIO89_GPIO MFP_CFG(GPIO89, AF0) | ||
97 | #define GPIO90_GPIO MFP_CFG(GPIO90, AF0) | ||
98 | #define GPIO91_GPIO MFP_CFG(GPIO91, AF0) | ||
99 | #define GPIO92_GPIO MFP_CFG(GPIO92, AF0) | ||
100 | #define GPIO93_GPIO MFP_CFG(GPIO93, AF0) | ||
101 | #define GPIO94_GPIO MFP_CFG(GPIO94, AF0) | ||
102 | #define GPIO95_GPIO MFP_CFG(GPIO95, AF0) | ||
103 | #define GPIO96_GPIO MFP_CFG(GPIO96, AF0) | ||
104 | #define GPIO97_GPIO MFP_CFG(GPIO97, AF0) | ||
105 | #define GPIO98_GPIO MFP_CFG(GPIO98, AF0) | ||
106 | #define GPIO99_GPIO MFP_CFG(GPIO99, AF0) | ||
107 | #define GPIO100_GPIO MFP_CFG(GPIO100, AF0) | ||
108 | #define GPIO101_GPIO MFP_CFG(GPIO101, AF0) | ||
109 | #define GPIO102_GPIO MFP_CFG(GPIO102, AF0) | ||
110 | #define GPIO103_GPIO MFP_CFG(GPIO103, AF0) | ||
111 | #define GPIO104_GPIO MFP_CFG(GPIO104, AF0) | ||
112 | #define GPIO105_GPIO MFP_CFG(GPIO105, AF0) | ||
113 | #define GPIO106_GPIO MFP_CFG(GPIO106, AF0) | ||
114 | #define GPIO107_GPIO MFP_CFG(GPIO107, AF0) | ||
115 | #define GPIO108_GPIO MFP_CFG(GPIO108, AF0) | ||
116 | #define GPIO109_GPIO MFP_CFG(GPIO109, AF0) | ||
117 | #define GPIO110_GPIO MFP_CFG(GPIO110, AF0) | ||
118 | #define GPIO111_GPIO MFP_CFG(GPIO111, AF0) | ||
119 | #define GPIO112_GPIO MFP_CFG(GPIO112, AF0) | ||
120 | #define GPIO113_GPIO MFP_CFG(GPIO113, AF0) | ||
121 | #define GPIO114_GPIO MFP_CFG(GPIO114, AF0) | ||
122 | #define GPIO115_GPIO MFP_CFG(GPIO115, AF0) | ||
123 | #define GPIO116_GPIO MFP_CFG(GPIO116, AF0) | ||
124 | #define GPIO117_GPIO MFP_CFG(GPIO117, AF0) | ||
125 | #define GPIO118_GPIO MFP_CFG(GPIO118, AF0) | ||
126 | #define GPIO119_GPIO MFP_CFG(GPIO119, AF0) | ||
127 | #define GPIO120_GPIO MFP_CFG(GPIO120, AF0) | ||
128 | #define GPIO121_GPIO MFP_CFG(GPIO121, AF0) | ||
129 | #define GPIO122_GPIO MFP_CFG(GPIO122, AF0) | ||
130 | |||
131 | /* DFI */ | ||
132 | #define GPIO0_DFI_D15 MFP_CFG(GPIO0, AF0) | ||
133 | #define GPIO1_DFI_D14 MFP_CFG(GPIO1, AF0) | ||
134 | #define GPIO2_DFI_D13 MFP_CFG(GPIO2, AF0) | ||
135 | #define GPIO3_DFI_D12 MFP_CFG(GPIO3, AF0) | ||
136 | #define GPIO4_DFI_D11 MFP_CFG(GPIO4, AF0) | ||
137 | #define GPIO5_DFI_D10 MFP_CFG(GPIO5, AF0) | ||
138 | #define GPIO6_DFI_D9 MFP_CFG(GPIO6, AF0) | ||
139 | #define GPIO7_DFI_D8 MFP_CFG(GPIO7, AF0) | ||
140 | #define GPIO8_DFI_D7 MFP_CFG(GPIO8, AF0) | ||
141 | #define GPIO9_DFI_D6 MFP_CFG(GPIO9, AF0) | ||
142 | #define GPIO10_DFI_D5 MFP_CFG(GPIO10, AF0) | ||
143 | #define GPIO11_DFI_D4 MFP_CFG(GPIO11, AF0) | ||
144 | #define GPIO12_DFI_D3 MFP_CFG(GPIO12, AF0) | ||
145 | #define GPIO13_DFI_D2 MFP_CFG(GPIO13, AF0) | ||
146 | #define GPIO14_DFI_D1 MFP_CFG(GPIO14, AF0) | ||
147 | #define GPIO15_DFI_D0 MFP_CFG(GPIO15, AF0) | ||
148 | |||
149 | #define GPIO30_DFI_ADDR0 MFP_CFG(GPIO30, AF0) | ||
150 | #define GPIO31_DFI_ADDR1 MFP_CFG(GPIO31, AF0) | ||
151 | #define GPIO32_DFI_ADDR2 MFP_CFG(GPIO32, AF0) | ||
152 | #define GPIO33_DFI_ADDR3 MFP_CFG(GPIO33, AF0) | ||
153 | |||
154 | /* NAND */ | ||
155 | #define GPIO16_ND_nCS0 MFP_CFG(GPIO16, AF1) | ||
156 | #define GPIO17_ND_nWE MFP_CFG(GPIO17, AF0) | ||
157 | #define GPIO21_ND_ALE MFP_CFG(GPIO21, AF0) | ||
158 | #define GPIO22_ND_CLE MFP_CFG(GPIO22, AF0) | ||
159 | #define GPIO24_ND_nRE MFP_CFG(GPIO24, AF0) | ||
160 | #define GPIO26_ND_RnB1 MFP_CFG(GPIO26, AF1) | ||
161 | #define GPIO27_ND_RnB2 MFP_CFG(GPIO27, AF1) | ||
162 | |||
163 | /* Static Memory Controller */ | ||
164 | #define GPIO18_SMC_nCS0 MFP_CFG(GPIO18, AF3) | ||
165 | #define GPIO18_SMC_nCS1 MFP_CFG(GPIO18, AF2) | ||
166 | #define GPIO16_SMC_nCS0 MFP_CFG(GPIO16, AF2) | ||
167 | #define GPIO16_SMC_nCS1 MFP_CFG(GPIO16, AF3) | ||
168 | #define GPIO19_SMC_nCS0 MFP_CFG(GPIO19, AF0) | ||
169 | #define GPIO20_SMC_nCS1 MFP_CFG(GPIO20, AF2) | ||
170 | #define GPIO23_SMC_nLUA MFP_CFG(GPIO23, AF0) | ||
171 | #define GPIO25_SMC_nLLA MFP_CFG(GPIO25, AF0) | ||
172 | #define GPIO27_SMC_IRQ MFP_CFG(GPIO27, AF0) | ||
173 | #define GPIO28_SMC_RDY MFP_CFG(GPIO28, AF0) | ||
174 | #define GPIO29_SMC_SCLK MFP_CFG(GPIO29, AF0) | ||
175 | #define GPIO34_SMC_nCS1 MFP_CFG(GPIO34, AF2) | ||
176 | #define GPIO35_SMC_BE1 MFP_CFG(GPIO35, AF2) | ||
177 | #define GPIO36_SMC_BE2 MFP_CFG(GPIO36, AF2) | ||
178 | |||
179 | /* Compact Flash */ | ||
180 | #define GPIO19_CF_nCE1 MFP_CFG(GPIO19, AF3) | ||
181 | #define GPIO20_CF_nCE2 MFP_CFG(GPIO20, AF3) | ||
182 | #define GPIO23_CF_nALE MFP_CFG(GPIO23, AF3) | ||
183 | #define GPIO25_CF_nRESET MFP_CFG(GPIO25, AF3) | ||
184 | #define GPIO28_CF_RDY MFP_CFG(GPIO28, AF3) | ||
185 | #define GPIO29_CF_STSCH MFP_CFG(GPIO29, AF3) | ||
186 | #define GPIO30_CF_nREG MFP_CFG(GPIO30, AF3) | ||
187 | #define GPIO31_CF_nIOIS16 MFP_CFG(GPIO31, AF3) | ||
188 | #define GPIO32_CF_nCD1 MFP_CFG(GPIO32, AF3) | ||
189 | #define GPIO33_CF_nCD2 MFP_CFG(GPIO33, AF3) | ||
190 | |||
191 | /* UART1 */ | ||
192 | #define GPIO107_UART1_TXD MFP_CFG_DRV(GPIO107, AF1, FAST) | ||
193 | #define GPIO107_UART1_RXD MFP_CFG_DRV(GPIO107, AF2, FAST) | ||
194 | #define GPIO108_UART1_RXD MFP_CFG_DRV(GPIO108, AF1, FAST) | ||
195 | #define GPIO108_UART1_TXD MFP_CFG_DRV(GPIO108, AF2, FAST) | ||
196 | #define GPIO109_UART1_CTS MFP_CFG(GPIO109, AF1) | ||
197 | #define GPIO109_UART1_RTS MFP_CFG(GPIO109, AF2) | ||
198 | #define GPIO110_UART1_RTS MFP_CFG(GPIO110, AF1) | ||
199 | #define GPIO110_UART1_CTS MFP_CFG(GPIO110, AF2) | ||
200 | #define GPIO111_UART1_RI MFP_CFG(GPIO111, AF1) | ||
201 | #define GPIO111_UART1_DSR MFP_CFG(GPIO111, AF2) | ||
202 | #define GPIO112_UART1_DTR MFP_CFG(GPIO111, AF1) | ||
203 | #define GPIO112_UART1_DCD MFP_CFG(GPIO112, AF2) | ||
204 | |||
205 | /* MMC1 */ | ||
206 | #define GPIO37_MMC1_DAT7 MFP_CFG(GPIO37, AF1) | ||
207 | #define GPIO38_MMC1_DAT6 MFP_CFG(GPIO38, AF1) | ||
208 | #define GPIO54_MMC1_DAT5 MFP_CFG(GPIO54, AF1) | ||
209 | #define GPIO48_MMC1_DAT4 MFP_CFG(GPIO48, AF1) | ||
210 | #define GPIO51_MMC1_DAT3 MFP_CFG(GPIO51, AF1) | ||
211 | #define GPIO52_MMC1_DAT2 MFP_CFG(GPIO52, AF1) | ||
212 | #define GPIO40_MMC1_DAT1 MFP_CFG(GPIO40, AF1) | ||
213 | #define GPIO41_MMC1_DAT0 MFP_CFG(GPIO41, AF1) | ||
214 | #define GPIO49_MMC1_CMD MFP_CFG(GPIO49, AF1) | ||
215 | #define GPIO43_MMC1_CLK MFP_CFG(GPIO43, AF1) | ||
216 | #define GPIO53_MMC1_CD MFP_CFG(GPIO53, AF1) | ||
217 | #define GPIO46_MMC1_WP MFP_CFG(GPIO46, AF1) | ||
218 | |||
219 | /* LCD */ | ||
220 | #define GPIO84_LCD_CS MFP_CFG(GPIO84, AF1) | ||
221 | #define GPIO60_LCD_DD0 MFP_CFG(GPIO60, AF1) | ||
222 | #define GPIO61_LCD_DD1 MFP_CFG(GPIO61, AF1) | ||
223 | #define GPIO70_LCD_DD10 MFP_CFG(GPIO70, AF1) | ||
224 | #define GPIO71_LCD_DD11 MFP_CFG(GPIO71, AF1) | ||
225 | #define GPIO72_LCD_DD12 MFP_CFG(GPIO72, AF1) | ||
226 | #define GPIO73_LCD_DD13 MFP_CFG(GPIO73, AF1) | ||
227 | #define GPIO74_LCD_DD14 MFP_CFG(GPIO74, AF1) | ||
228 | #define GPIO75_LCD_DD15 MFP_CFG(GPIO75, AF1) | ||
229 | #define GPIO76_LCD_DD16 MFP_CFG(GPIO76, AF1) | ||
230 | #define GPIO77_LCD_DD17 MFP_CFG(GPIO77, AF1) | ||
231 | #define GPIO78_LCD_DD18 MFP_CFG(GPIO78, AF1) | ||
232 | #define GPIO79_LCD_DD19 MFP_CFG(GPIO79, AF1) | ||
233 | #define GPIO62_LCD_DD2 MFP_CFG(GPIO62, AF1) | ||
234 | #define GPIO80_LCD_DD20 MFP_CFG(GPIO80, AF1) | ||
235 | #define GPIO81_LCD_DD21 MFP_CFG(GPIO81, AF1) | ||
236 | #define GPIO82_LCD_DD22 MFP_CFG(GPIO82, AF1) | ||
237 | #define GPIO83_LCD_DD23 MFP_CFG(GPIO83, AF1) | ||
238 | #define GPIO63_LCD_DD3 MFP_CFG(GPIO63, AF1) | ||
239 | #define GPIO64_LCD_DD4 MFP_CFG(GPIO64, AF1) | ||
240 | #define GPIO65_LCD_DD5 MFP_CFG(GPIO65, AF1) | ||
241 | #define GPIO66_LCD_DD6 MFP_CFG(GPIO66, AF1) | ||
242 | #define GPIO67_LCD_DD7 MFP_CFG(GPIO67, AF1) | ||
243 | #define GPIO68_LCD_DD8 MFP_CFG(GPIO68, AF1) | ||
244 | #define GPIO69_LCD_DD9 MFP_CFG(GPIO69, AF1) | ||
245 | #define GPIO59_LCD_DENA_BIAS MFP_CFG(GPIO59, AF1) | ||
246 | #define GPIO56_LCD_FCLK_RD MFP_CFG(GPIO56, AF1) | ||
247 | #define GPIO57_LCD_LCLK_A0 MFP_CFG(GPIO57, AF1) | ||
248 | #define GPIO58_LCD_PCLK_WR MFP_CFG(GPIO58, AF1) | ||
249 | #define GPIO85_LCD_VSYNC MFP_CFG(GPIO85, AF1) | ||
250 | |||
251 | /* I2S */ | ||
252 | #define GPIO113_I2S_MCLK MFP_CFG(GPIO113,AF6) | ||
253 | #define GPIO114_I2S_FRM MFP_CFG(GPIO114,AF1) | ||
254 | #define GPIO115_I2S_BCLK MFP_CFG(GPIO115,AF1) | ||
255 | #define GPIO116_I2S_RXD MFP_CFG(GPIO116,AF2) | ||
256 | #define GPIO117_I2S_TXD MFP_CFG(GPIO117,AF2) | ||
257 | |||
258 | #endif /* __ASM_MACH_MFP_PXA168_H */ | ||
diff --git a/arch/arm/mach-mmp/include/mach/mfp.h b/arch/arm/mach-mmp/include/mach/mfp.h new file mode 100644 index 000000000000..277ea4cd0f9f --- /dev/null +++ b/arch/arm/mach-mmp/include/mach/mfp.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef __ASM_MACH_MFP_H | ||
2 | #define __ASM_MACH_MFP_H | ||
3 | |||
4 | #include <plat/mfp.h> | ||
5 | |||
6 | /* | ||
7 | * NOTE: the MFPR register bit definitions on PXA168 processor lines are a | ||
8 | * bit different from those on PXA3xx. Bit [7:10] are now reserved, which | ||
9 | * were SLEEP_OE_N, SLEEP_DATA, SLEEP_SEL and the LSB of DRIVE bits. | ||
10 | * | ||
11 | * To cope with this difference and re-use the pxa3xx mfp code as much as | ||
12 | * possible, we make the following compromise: | ||
13 | * | ||
14 | * 1. SLEEP_OE_N will always be programmed to '1' (by MFP_LPM_FLOAT) | ||
15 | * 2. DRIVE strength definitions redefined to include the reserved bit10 | ||
16 | * 3. Override MFP_CFG() and MFP_CFG_DRV() | ||
17 | * 4. Drop the use of MFP_CFG_LPM() and MFP_CFG_X() | ||
18 | */ | ||
19 | |||
20 | #define MFP_DRIVE_VERY_SLOW (0x0 << 13) | ||
21 | #define MFP_DRIVE_SLOW (0x2 << 13) | ||
22 | #define MFP_DRIVE_MEDIUM (0x4 << 13) | ||
23 | #define MFP_DRIVE_FAST (0x8 << 13) | ||
24 | |||
25 | #undef MFP_CFG | ||
26 | #undef MFP_CFG_DRV | ||
27 | #undef MFP_CFG_LPM | ||
28 | #undef MFP_CFG_X | ||
29 | #undef MFP_CFG_DEFAULT | ||
30 | |||
31 | #define MFP_CFG(pin, af) \ | ||
32 | (MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_MEDIUM) | ||
33 | |||
34 | #define MFP_CFG_DRV(pin, af, drv) \ | ||
35 | (MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv) | ||
36 | |||
37 | #endif /* __ASM_MACH_MFP_H */ | ||
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 1774682e988e..ae924468658c 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c | |||
@@ -23,10 +23,23 @@ | |||
23 | #include <mach/gpio.h> | 23 | #include <mach/gpio.h> |
24 | #include <mach/dma.h> | 24 | #include <mach/dma.h> |
25 | #include <mach/devices.h> | 25 | #include <mach/devices.h> |
26 | #include <mach/mfp.h> | ||
26 | 27 | ||
27 | #include "common.h" | 28 | #include "common.h" |
28 | #include "clock.h" | 29 | #include "clock.h" |
29 | 30 | ||
31 | #define MFPR_VIRT_BASE (APB_VIRT_BASE + 0x1e000) | ||
32 | |||
33 | static struct mfp_addr_map pxa168_mfp_addr_map[] __initdata = | ||
34 | { | ||
35 | MFP_ADDR_X(GPIO0, GPIO36, 0x04c), | ||
36 | MFP_ADDR_X(GPIO37, GPIO55, 0x000), | ||
37 | MFP_ADDR_X(GPIO56, GPIO123, 0x0e0), | ||
38 | MFP_ADDR_X(GPIO124, GPIO127, 0x0f4), | ||
39 | |||
40 | MFP_ADDR_END, | ||
41 | }; | ||
42 | |||
30 | #define APMASK(i) (GPIO_REGS_VIRT + BANK_OFF(i) + 0x09c) | 43 | #define APMASK(i) (GPIO_REGS_VIRT + BANK_OFF(i) + 0x09c) |
31 | 44 | ||
32 | static void __init pxa168_init_gpio(void) | 45 | static void __init pxa168_init_gpio(void) |
@@ -62,6 +75,8 @@ static struct clk_lookup pxa168_clkregs[] = { | |||
62 | static int __init pxa168_init(void) | 75 | static int __init pxa168_init(void) |
63 | { | 76 | { |
64 | if (cpu_is_pxa168()) { | 77 | if (cpu_is_pxa168()) { |
78 | mfp_init_base(MFPR_VIRT_BASE); | ||
79 | mfp_init_addr(pxa168_mfp_addr_map); | ||
65 | pxa_init_dma(IRQ_PXA168_DMA_INT0, 32); | 80 | pxa_init_dma(IRQ_PXA168_DMA_INT0, 32); |
66 | clks_register(ARRAY_AND_SIZE(pxa168_clkregs)); | 81 | clks_register(ARRAY_AND_SIZE(pxa168_clkregs)); |
67 | } | 82 | } |